web/src/commands/restart.js

23 lines
594 B
JavaScript
Raw Normal View History

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 !')
2023-08-27 12:47:20 +00:00
await interaction.reply({embeds: [membed]})
pm2.restart('SubSonics - Bot Discord')
}
}