Adding Embeds for Text
This commit is contained in:
parent
259b0578d8
commit
304b4c1205
@ -10,6 +10,6 @@ module.exports = {
|
|||||||
} else {
|
} else {
|
||||||
replyBody = client.pastas.get(file.name).content;
|
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 = {
|
module.exports = {
|
||||||
name: 'spongebob',
|
name: 'spongebob',
|
||||||
description: 'SpOnGeBoB-iFy AnYtHiNg AuToMaTiCaLly',
|
description: 'SpOnGeBoB-iFy AnYtHiNg AuToMaTiCaLly',
|
||||||
usage: '<text you want spongebob-ified',
|
usage: '<text you want spongebob-ified',
|
||||||
execute(message, file) {
|
execute(message, file) {
|
||||||
const replyHeader = `Requested by: ${message.author.username}\n`;
|
|
||||||
let flipper = 0;
|
let flipper = 0;
|
||||||
let newText = '';
|
let newText = '';
|
||||||
for (const letter of file.name) {
|
for (const letter of file.name) {
|
||||||
@ -15,6 +16,6 @@ module.exports = {
|
|||||||
flipper = 0;
|
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}`)
|
.setThumbnail(`https:${weather.condition.icon}`)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter(`@${author.username}#${author.discriminator}`);
|
.setFooter(`@${author.username}#${author.discriminator}`);
|
||||||
|
},
|
||||||
|
createTextEmbed(data, author, command) {
|
||||||
|
return new Discord.MessageEmbed()
|
||||||
|
.setAuthor(command)
|
||||||
|
.setDescription(data.content)
|
||||||
|
.setTimestamp()
|
||||||
|
.setFooter(`@${author.username}#${author.discriminator}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
1
index.js
1
index.js
@ -26,6 +26,7 @@ client.once('ready', () => {
|
|||||||
// .catch(err => console.error(err));
|
// .catch(err => console.error(err));
|
||||||
// })
|
// })
|
||||||
// .catch(err => console.error(err));
|
// .catch(err => console.error(err));
|
||||||
|
client.users.fetch(process.env.ownerID)
|
||||||
});
|
});
|
||||||
|
|
||||||
client.login(process.env.TOKEN)
|
client.login(process.env.TOKEN)
|
||||||
|
Loading…
Reference in New Issue
Block a user