Split into multiple files #18
3 changed files with 0 additions and 34 deletions
|
@ -1,10 +0,0 @@
|
|||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('ping')
|
||||
.setDescription('Replies with Pong!'),
|
||||
async execute(interaction) {
|
||||
return interaction.reply('Pong!');
|
||||
}
|
||||
};
|
|
@ -1,17 +0,0 @@
|
|||
module.exports = {
|
||||
name: 'interactionCreate',
|
||||
async execute(interaction) {
|
||||
if (!interaction.isCommand()) return;
|
||||
|
||||
const command = client.commands.get(interaction.commandName);
|
||||
|
||||
if (!command) return;
|
||||
|
||||
try {
|
||||
await command.execute(interaction);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
await interaction.reply({ content: 'Impossible de lancer cette commande.', ephemeral: true });
|
||||
}
|
||||
},
|
||||
};
|
|
@ -1,7 +0,0 @@
|
|||
module.exports = {
|
||||
name: 'ready',
|
||||
once: true,
|
||||
execute() {
|
||||
console.log('Prêt !');
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue