nyx/commands/Owner/restart.js
night0721 bc346138dd Bot
2021-06-12 18:53:51 +08:00

19 lines
502 B
JavaScript

const { Client, Message, MessageEmbed } = require("discord.js");
module.exports = {
name: "restart",
category: "Owner",
description: "Restart the bot",
Owner: true,
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
message.channel
.send("Restarting...")
.then(message => client.destroy())
.then(() => client.login(process.env.TOKEN));
message.channel.send("Restarted");
},
};