essa.jpeg

This commit is contained in:
2022-12-30 12:15:49 +01:00
parent 47abbbc0a7
commit 1f22aa4061
18 changed files with 420 additions and 37 deletions

View File

@@ -0,0 +1,18 @@
import { CommandInteractionOptionResolver } from 'discord.js';
import { client } from '..';
import { Event } from '../structures/Event';
import { BotInteraction } from '../typings/Command';
export default new Event('interactionCreate', async (interaction) => {
if (interaction.isCommand()) {
await interaction.deferReply();
const command = client.commands.get(interaction.commandName);
if (!command)
return interaction.followUp("This command doesn't exist. Dork.");
command.run({
args: interaction.options as CommandInteractionOptionResolver,
client,
interaction: interaction as BotInteraction,
});
}
});