2021-09-24 00:08:29 +00:00
|
|
|
const fn = require('../functions.js');
|
2021-09-22 17:15:31 +00:00
|
|
|
const config = require('../config.json');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
name: 'spongebob',
|
2022-06-11 14:55:25 +00:00
|
|
|
alias: 'sb',
|
2021-09-22 17:15:31 +00:00
|
|
|
description: 'SpOnGeBoB-iFy AnYtHiNg AuToMaTiCaLly',
|
|
|
|
usage: '<text to convert>.spongebob',
|
|
|
|
execute(message, commandData) {
|
2022-12-16 19:56:00 +00:00
|
|
|
// message.reply(fn.spongebob(commandData)).then(() => {
|
|
|
|
// message.delete();
|
|
|
|
// });
|
2023-01-08 01:22:06 +00:00
|
|
|
if (message.reference != undefined) {
|
|
|
|
const repliedMessageId = message.reference.messageId;
|
|
|
|
message.channel.messages.fetch(repliedMessageId)
|
|
|
|
.then(repliedMessage => {
|
|
|
|
repliedMessage.reply(fn.spongebob({ args: repliedMessage.content })).then(() => {
|
|
|
|
message.delete();
|
|
|
|
});
|
|
|
|
})
|
|
|
|
.catch(err => {
|
|
|
|
console.error(err);
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
message.channel.send(fn.spongebob(commandData)).then(() => {
|
|
|
|
message.delete();
|
|
|
|
});
|
|
|
|
}
|
2021-09-22 17:15:31 +00:00
|
|
|
}
|
|
|
|
}
|