const { Events } = require('discord.js');
module.exports = {
name: Events.InteractionCreate,
eventCallback: async (interaction, client) => {
if (interaction.isChatInputCommand()) {
for (const command of interaction.client.commands) {
if (command.name === interaction.commandName) {
await command.callback(interaction)
}
}
}
else {
const ticketHandler = require("./ticketInteraction.js");
await ticketHandler(interaction);
}
}
};
const { Events } = require('discord.js');
module.exports = {
name: Events.InteractionCreate,
eventCallback: async (interaction, client) => {
if (interaction.isChatInputCommand()) {
for (const command of interaction.client.commands) {
if (command.name === interaction.commandName) {
await command.callback(interaction)
}
}
}
else {
const ticketHandler = require("./ticketInteraction.js");
await ticketHandler(interaction);
}
}
};