nyx/command/Owner/restart.js

15 lines
408 B
JavaScript
Raw Normal View History

2021-09-06 12:38:25 +02:00
module.exports = {
name: "restart",
category: "Owner",
description: "Restart the bot",
Owner: true,
run: async (client, interaction, args) => {
await interaction.deleteReply();
2021-09-06 12:38:25 +02:00
const msg = await interaction.channel.send("Restarting...");
await client.destroy();
await client.login(process.env.TOKEN);
await msg.delete();
await interaction.channel.send("Restarted");
2021-09-06 12:38:25 +02:00
},
};