web/src/commands/restart.js

25 lines
576 B
JavaScript

const { SlashCommandBuilder, EmbedBuilder, Client } = require("discord.js");
const { __glob } = require("../modules/global-variables");
const pm2 = require("pm2")
module.exports = {
data: new SlashCommandBuilder()
.setName("restart")
.setDescription("Redémarre intégralement le Bot !"),
async execute(client, interaction) {
const membed = new EmbedBuilder()
.setColor(0xffffff)
.setTitle('Redémarrage du bot !')
await interaction.reply({embeds: [membed]})
pm2.restart("Subsonics")
}
}