2021-01-23 18:08:47 -06:00
|
|
|
module.exports = {
|
2022-04-18 11:25:40 -05:00
|
|
|
|
|
|
|
name: require('path').parse(__filename).name,
|
2022-03-28 12:42:09 -05:00
|
|
|
description: "IT'S TIME TO STOP!... the bot",
|
2022-04-21 20:53:03 -05:00
|
|
|
options: [],
|
2022-04-21 18:09:21 -05:00
|
|
|
|
2022-04-23 13:07:50 -05:00
|
|
|
async parseMessage (client, config, message) {
|
|
|
|
await message.channel.send(await this.handle(client, config, message.author));
|
2022-04-21 23:44:02 -05:00
|
|
|
process.exit();
|
|
|
|
},
|
|
|
|
|
|
|
|
async parseInteraction (client, config, interaction) {
|
2022-04-23 13:07:50 -05:00
|
|
|
await interaction.reply(await this.handle(client, config, interaction.user));
|
2022-04-21 23:44:02 -05:00
|
|
|
process.exit();
|
|
|
|
},
|
|
|
|
|
|
|
|
async handle (_, config, user) {
|
|
|
|
if (user.id === config.ownerID) {
|
|
|
|
console.log('The bot is shutting down! Bye bye!');
|
|
|
|
return {
|
2022-04-21 18:09:21 -05:00
|
|
|
embeds: [{
|
|
|
|
title: '<a:AnitroxWorking:697147309531594843> **Shutting Down...**',
|
|
|
|
description: 'See you next time!',
|
|
|
|
color: 9442302,
|
|
|
|
footer: {
|
2022-04-21 23:44:02 -05:00
|
|
|
icon_url: user.displayAvatarURL(),
|
2022-04-21 18:09:21 -05:00
|
|
|
text: config.footerTxt
|
|
|
|
}
|
|
|
|
}]
|
2022-04-21 23:44:02 -05:00
|
|
|
};
|
2022-03-26 03:33:18 -05:00
|
|
|
} else {
|
2022-04-21 23:44:02 -05:00
|
|
|
return {
|
2022-04-21 18:09:21 -05:00
|
|
|
embeds: [{
|
|
|
|
title: '<:AnitroxDenied:809651936642203668> 403 Forbidden',
|
|
|
|
description: 'You need to be the bot owner to execute this command!',
|
|
|
|
color: 13632027,
|
|
|
|
footer: {
|
2022-04-21 23:44:02 -05:00
|
|
|
icon_url: user.displayAvatarURL(),
|
2022-04-21 18:09:21 -05:00
|
|
|
text: config.footerTxt
|
|
|
|
}
|
|
|
|
}]
|
2022-04-21 23:44:02 -05:00
|
|
|
};
|
2022-03-26 03:33:18 -05:00
|
|
|
}
|
|
|
|
}
|
2022-04-21 18:09:21 -05:00
|
|
|
};
|