loader add

This commit is contained in:
VALOU3336
2024-02-13 21:45:11 +01:00
parent a0a674fcad
commit 804de4d5f0
6 changed files with 80 additions and 8 deletions
+14
View File
@@ -0,0 +1,14 @@
const { Events, InteractionType } = require("discord.js")
module.exports = {
name :Events.InteractionCreate,
async run(client, interaction) {
if(interaction.type === InteractionType.ApplicationCommand) {
const command = client.commands.get(interaction.commandName);
await command.execute(interaction, client);
};
}
};
+11
View File
@@ -0,0 +1,11 @@
const { Events, ActivityType } = require("discord.js")
module.exports = {
name : Events.ClientReady,
async run(client) {
client.application.commands.set(client.commands.map(command => command.data));
console.log(`${client.user.username} est en ligne`);
},
};