Archived
Dateien nach "commands/info-search" hochladen
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
const Discord = require("discord.js")
|
||||
module.exports = {
|
||||
name: 'embedgen',
|
||||
aliases: ["emb"],
|
||||
description: 'Einbettungsgenerator',
|
||||
category: "info",
|
||||
run: async (client, message, args) => {
|
||||
|
||||
try {
|
||||
|
||||
const filter = msg => msg.author.id == message.author.id;
|
||||
const options = {
|
||||
max: 1
|
||||
};
|
||||
//===============================================================================================
|
||||
// Getting Started
|
||||
const embed = new Discord.MessageEmbed();
|
||||
message.channel.send("Antworten Sie mit `skip` oder `no` für die nächste Frage. Antworten Sie mit `cancel`, um den Befehl zu stoppen.");
|
||||
|
||||
|
||||
//===============================================================================================
|
||||
// Getting Title
|
||||
message.channel.send("Also, möchten Sie, dass Ihre Einbettung einen Titel hat?");
|
||||
let title = await message.channel.awaitMessages(filter, options);
|
||||
if (title.first().content == 'cancel') return message.channel.send('Einbettungsgenerator abgebrochen.')
|
||||
if (title.first().content !== 'skip' && title.first().content !== 'cancel') embed.setTitle(title.first().content);
|
||||
|
||||
//===============================================================================================
|
||||
// Getting Description
|
||||
message.channel.send("Toll, jetzt möchten Sie, dass Ihre Einbettung eine Beschreibung hat?");
|
||||
let Description = await message.channel.awaitMessages(filter, options);
|
||||
if (Description.first().content == 'cancel') return message.channel.send('Einbettungsgenerator abgebrochen.')
|
||||
if (Description.first().content !== 'skip' && Description.first().content !== 'cancel') embed.setDescription(Description.first().content);
|
||||
|
||||
//===============================================================================================
|
||||
// Getting Footer
|
||||
message.channel.send("Also, möchten Sie, dass Ihre Einbettung eine Fußzeile hat? Oder Abbrechen");
|
||||
let Footer = await message.channel.awaitMessages(filter, options);
|
||||
if (Footer.first().content == 'cancel') return message.channel.send('Einbettungsgenerator abgebrochen. ')
|
||||
if (Footer.first().content !== 'skip' && Footer.first().content !== 'cancel') embed.setFooter(Footer.first().content);
|
||||
|
||||
//===============================================================================================
|
||||
// Getting URL
|
||||
|
||||
|
||||
//===============================================================================================
|
||||
// Getting Color
|
||||
message.channel.send("Möchten Sie also, dass Ihre Einbettung eine bestimmte Farbe hat? Standard ist Schwarz");
|
||||
let Color = await message.channel.awaitMessages(filter, options);
|
||||
if (Color.first().content == 'cancel') return message.channel.send('Einbettungsgenerator abgebrochen.')
|
||||
if (Color.first().content !== 'skip' && Color.first().content !== 'cancel') embed.setColor(Color.first().content.toUpperCase() || "2f3136")
|
||||
|
||||
//===============================================================================================
|
||||
// Getting Author Field
|
||||
message.channel.send("Möchten Sie also, dass Ihre Einbettung ein Autorenfeld hat?");
|
||||
let Author = await message.channel.awaitMessages(filter, options);
|
||||
if (Author.first().content == 'cancel') return message.channel.send('Einbettungsgenerator abgebrochen.')
|
||||
if (Author.first().content !== 'skip' && Author.first().content !== 'cancel') embed.setAuthor(Author.first().content);
|
||||
|
||||
//===============================================================================================
|
||||
// Getting TimeStamp
|
||||
message.channel.send("Wollen Sie also, dass Ihre Einbettung einen TimeStamp hat? Antworten Sie mit `yes` oder `no`.");
|
||||
let TimeStamp = await message.channel.awaitMessages(filter, options);
|
||||
if (TimeStamp.first().content == 'cancel') return message.channel.send('Einbettungsgenerator abgebrochen.')
|
||||
if (TimeStamp.first().content !== 'yes') embed.setTimestamp();
|
||||
|
||||
message.channel.send(embed)
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user