Adding Embeds for Text
This commit is contained in:
parent
259b0578d8
commit
304b4c1205
@ -10,6 +10,6 @@ module.exports = {
|
||||
} else {
|
||||
replyBody = client.pastas.get(file.name).content;
|
||||
}
|
||||
message.channel.send(replyHeader + replyBody);
|
||||
message.channel.send(functions.createTextEmbed({ content: replyBody }, message.author, `${file.name}.${file.extension}`));
|
||||
}
|
||||
}
|
@ -1,9 +1,10 @@
|
||||
const functions = require('../functions.js');
|
||||
|
||||
module.exports = {
|
||||
name: 'spongebob',
|
||||
description: 'SpOnGeBoB-iFy AnYtHiNg AuToMaTiCaLly',
|
||||
usage: '<text you want spongebob-ified',
|
||||
execute(message, file) {
|
||||
const replyHeader = `Requested by: ${message.author.username}\n`;
|
||||
let flipper = 0;
|
||||
let newText = '';
|
||||
for (const letter of file.name) {
|
||||
@ -15,6 +16,6 @@ module.exports = {
|
||||
flipper = 0;
|
||||
}
|
||||
}
|
||||
message.channel.send(replyHeader + newText);
|
||||
message.channel.send(functions.createTextEmbed({ content: newText }, message.author, `${file.name}.${file.extension}`));
|
||||
}
|
||||
}
|
@ -90,5 +90,12 @@ module.exports = {
|
||||
.setThumbnail(`https:${weather.condition.icon}`)
|
||||
.setTimestamp()
|
||||
.setFooter(`@${author.username}#${author.discriminator}`);
|
||||
},
|
||||
createTextEmbed(data, author, command) {
|
||||
return new Discord.MessageEmbed()
|
||||
.setAuthor(command)
|
||||
.setDescription(data.content)
|
||||
.setTimestamp()
|
||||
.setFooter(`@${author.username}#${author.discriminator}`);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user