nyx/commands/Owner/restart.js

20 lines
502 B
JavaScript
Raw Normal View History

2021-06-12 12:53:51 +02:00
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");
},
};