mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-17 08:07:44 +02:00
loader add
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -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`);
|
||||
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user