nodbot/commands/pasta.js

20 lines
623 B
JavaScript
Raw Normal View History

2021-07-14 01:20:17 +00:00
const functions = require('../functions.js');
2021-06-30 22:59:24 +00:00
module.exports = {
name: 'pasta',
description: 'Send a copypasta.',
2021-07-19 02:23:40 +00:00
usage: '<Copypasta Name>',
2021-06-30 22:59:24 +00:00
execute(message, file) {
const client = message.client;
const replyHeader = `\'${file.name}\' requested by: ${message.author.username}\n`;
let replyBody = '';
2021-07-31 23:41:38 +00:00
let iconUrl;
2021-06-30 22:59:24 +00:00
if (!client.pastas.has(file.name)) {
replyBody = 'Sorry I couldn\'t find that pasta.';
} else {
replyBody = client.pastas.get(file.name).content;
2021-07-31 23:41:38 +00:00
iconUrl = client.pastas.get(file.name).iconUrl;
2021-06-30 22:59:24 +00:00
}
2021-07-31 23:41:38 +00:00
message.channel.send(functions.pastaEmbed(replyBody, iconUrl, message.author));
2021-06-30 22:59:24 +00:00
}
}