From 9b22994a684e044012bf667fddcf68bd75b665dd Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:11:17 -0600 Subject: [PATCH] Add restart.js --- commands/restart.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 commands/restart.js diff --git a/commands/restart.js b/commands/restart.js new file mode 100644 index 0000000..aca1d34 --- /dev/null +++ b/commands/restart.js @@ -0,0 +1,17 @@ + +module.exports = { + name: 'restart', + description: '(Owner Only) Shuts down the bot.', + execute(client, message, args) { + const token=("") + if (message.author.id == 309427567004483586) { + message.channel.send(" Restarting...").then + client.destroy() + .catch(console.error) + .then + client.login(token); + message.channel.send("<:NyabotSuccess:697211376740859914> Restart Successful") + } else { + message.channel.send("<:NyabotDenied:697145462565896194> Access Denied, You must be bot owner to execute this command."); + } + }} \ No newline at end of file