April/commands/dev/reload.mjs

16 lines
588 B
JavaScript
Raw Normal View History

2023-09-13 21:12:45 +02:00
import { SlashCommandBuilder } from 'discord.js';
import { deploy_commands } from '../../functions.mjs';
2023-09-13 21:26:16 +02:00
import config from '../../config.json' assert { type: 'json' };
2023-09-13 21:12:45 +02:00
const { devId } = config;
2023-09-13 21:12:45 +02:00
export default {
2022-12-16 08:26:32 +01:00
data: new SlashCommandBuilder()
.setName('reload')
.setDefaultMemberPermissions(0x8)
2022-12-16 08:26:32 +01:00
.setDescription('Recharge les commandes du bot (dev only).'),
async execute(interaction, client) {
if (!interaction.user.id == devId) return void interaction.reply({ content: "Permission denied" });
deploy_commands(client, false);
}
2022-12-16 08:26:32 +01:00
};