Stop should now end the process
This commit is contained in:
parent
268ceb9c4a
commit
55be4eb4f8
|
@ -1,26 +1,27 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "stop",
|
name: "stop",
|
||||||
description: "Stops the bot",
|
description: "IT'S TIME TO STOP!... the bot",
|
||||||
async execute(client, message, _, footerTxt) {
|
async execute(client, message, config) {
|
||||||
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
|
if (message.author.id == config.ownerID) {
|
||||||
await message.channel.send({embed: {
|
await message.channel.send({embed: {
|
||||||
"title": "<a:AnitroxWorking:697147309531594843> **Shutting Down...**",
|
"title": "<a:AnitroxWorking:697147309531594843> **Shutting Down...**",
|
||||||
"description": "See you next time!",
|
"description": "See you next time!",
|
||||||
"color": 9442302,
|
"color": 9442302,
|
||||||
"footer": {
|
"footer": {
|
||||||
"icon_url": message.author.displayAvatarURL(),
|
"icon_url": message.author.displayAvatarURL(),
|
||||||
"text": footerTxt
|
"text": config.footerTxt
|
||||||
},
|
},
|
||||||
}});
|
}});
|
||||||
client.destroy();
|
console.log("The bot is shutting down! Bye bye!")
|
||||||
|
process.exit();
|
||||||
} else {
|
} else {
|
||||||
await message.channel.send({embed: {
|
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!",
|
"description": "You need to be the bot owner to execute this command!",
|
||||||
"color": 13632027,
|
"color": 13632027,
|
||||||
"footer": {
|
"footer": {
|
||||||
"icon_url": message.author.displayAvatarURL(),
|
"icon_url": message.author.displayAvatarURL(),
|
||||||
"text": footerTxt
|
"text": config.footerTxt
|
||||||
},
|
},
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue