23 lines
587 B
JavaScript
23 lines
587 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("[NEW] Redémarre intégralement le Bot !"),
|
||
|
|
||
|
async execute(client, interaction) {
|
||
|
|
||
|
const membed = new EmbedBuilder()
|
||
|
.setColor(0xffffff)
|
||
|
.setTitle('Redémarrage du bot !')
|
||
|
|
||
|
interaction.reply({embeds: [membed]})
|
||
|
|
||
|
pm2.restart('SubSonics - Bot Discord')
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|