This repository has been archived on 2024-01-30. You can view files and clone it, but cannot push or open issues or pull requests.
2021-01-26 14:03:02 -06:00
|
|
|
module.exports = {
|
2022-03-26 03:33:18 -05:00
|
|
|
name: 'restart',
|
|
|
|
description: '(Owner Only) Shuts down the bot.',
|
2022-03-26 03:58:15 -05:00
|
|
|
async execute(client, message) {
|
2022-03-26 03:33:18 -05:00
|
|
|
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
|
|
|
|
await message.channel.send("<a:NyabotWorking:697147309531594843> Restarting...")
|
|
|
|
try {
|
|
|
|
client.destroy();
|
2022-03-29 13:55:44 -05:00
|
|
|
await client.login(config.token);
|
2022-03-26 03:33:18 -05:00
|
|
|
await message.channel.send("<:NyabotSuccess:697211376740859914> Restart Successful")
|
2021-01-26 14:03:02 -06:00
|
|
|
console.log("All systems go")
|
2022-03-26 03:33:18 -05:00
|
|
|
} catch(e) {console.log(e);}
|
|
|
|
} else {
|
|
|
|
await message.channel.send("<:NyabotDenied:697145462565896194> Access Denied, You must be bot owner to execute this command.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|