mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-09-30 00:50:59 -04:00
11 lines
577 B
TypeScript
11 lines
577 B
TypeScript
|
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')
|
||
|
}
|