nyx/commands/Owner/restart.js

14 lines
426 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,
run: async (client, message, args) => {
2021-06-24 09:53:19 +02:00
const msg = await message.channel.send("Restarting...");
await client.destroy();
await client.login(process.env.TOKEN);
await msg.delete().then(msg => message.channel.send("Restarted"));
2021-06-12 12:53:51 +02:00
},
};