2022-11-17 12:58:19 -05:00
|
|
|
import Discord,{SlashCommandBuilder} from 'discord.js';
|
|
|
|
import { TClient } from 'src/client';
|
|
|
|
export default {
|
|
|
|
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
|
|
|
if (!client.config.eval.whitelist.includes(interaction.user.id)) return client.youNeedRole(interaction, 'bottech');
|
|
|
|
interaction.reply('Restarting...').then(()=>require('node:child_process').exec('pm2 restart Daggerbot'))
|
|
|
|
},
|
|
|
|
data: new SlashCommandBuilder()
|
|
|
|
.setName('restart')
|
|
|
|
.setDescription('Restart the bot for technical reasons')
|
2022-11-29 09:22:26 -05:00
|
|
|
.setDMPermission(false)
|
2022-11-17 12:58:19 -05:00
|
|
|
}
|