Add restart.js

This commit is contained in:
Anthony M 2021-01-20 21:11:17 -06:00 committed by GitHub
parent d0c16e431b
commit 9b22994a68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 0 deletions

17
commands/restart.js Normal file
View File

@ -0,0 +1,17 @@
module.exports = {
name: 'restart',
description: '(Owner Only) Shuts down the bot.',
execute(client, message, args) {
const token=("<token>")
if (message.author.id == 309427567004483586) {
message.channel.send("<a:NyabotWorking:697147309531594843> 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.");
}
}}