docker builds successfully, now need to figure out websocket connection

This commit is contained in:
GooeyTuxedo
2023-04-17 20:06:37 -07:00
parent a87549dfcd
commit 3dd291f394
11 changed files with 708 additions and 42 deletions

View File

@ -0,0 +1,24 @@
import { Events, Interaction } from 'discord.js';
import { DiscordClient } from '../discordClient';
module.exports = {
name: Events.InteractionCreate,
async execute(interaction: Interaction) {
if (!interaction.isChatInputCommand()) return;
const client = interaction.client as DiscordClient;
const command = client.commands.get(interaction.commandName);
if (!command) {
console.error(`No command matching ${interaction.commandName} was found.`);
return;
}
try {
await command.execute(interaction);
} catch (error) {
console.error(`Error executing ${interaction.commandName}`);
console.error(error);
}
},
};