Stop should now end the process

This commit is contained in:
IDeletedSystem64 2022-03-28 12:42:09 -05:00
parent 268ceb9c4a
commit 55be4eb4f8
1 changed files with 8 additions and 7 deletions

View File

@ -1,26 +1,27 @@
module.exports = {
name: "stop",
description: "Stops the bot",
async execute(client, message, _, footerTxt) {
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
description: "IT'S TIME TO STOP!... the bot",
async execute(client, message, config) {
if (message.author.id == config.ownerID) {
await message.channel.send({embed: {
"title": "<a:AnitroxWorking:697147309531594843> **Shutting Down...**",
"description": "See you next time!",
"color": 9442302,
"footer": {
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
"text": config.footerTxt
},
}});
client.destroy();
console.log("The bot is shutting down! Bye bye!")
process.exit();
} else {
await message.channel.send({embed: {
"title": ":AnitroxDenied: Access Denied",
"title": "<:AnitroxDenied:809651936642203668> 403 Forbidden",
"description": "You need to be the bot owner to execute this command!",
"color": 13632027,
"footer": {
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
"text": config.footerTxt
},
}});
}