14 lines
448 B
TypeScript
14 lines
448 B
TypeScript
import { Interaction } from "discord.js";
|
|
import Event from "@bot/components/event";
|
|
|
|
export default class interactionCreate extends Event {
|
|
name = "interactionCreate";
|
|
|
|
async execute(interaction: Interaction) {
|
|
if (!interaction.isChatInputCommand()) return;
|
|
|
|
await interaction.deferReply();
|
|
const command = this.client.interactions.get(interaction.commandName);
|
|
return command!.execute(interaction);
|
|
}
|
|
} |