card-drop/src/client/events.ts
Ethan Lane 58d1541e47 feature/5-drop-command (#17)
#5

Reviewed-on: https://gitea.vylpes.xyz/External/card-drop/pulls/17
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2023-09-03 20:27:29 +01:00

22 lines
621 B
TypeScript

import { Interaction } from "discord.js";
import ChatInputCommand from "./interactionCreate/ChatInputCommand";
import Button from "./interactionCreate/Button";
export class Events {
public async onInteractionCreate(interaction: Interaction) {
if (!interaction.guildId) return;
if (interaction.isChatInputCommand()) {
ChatInputCommand.onChatInput(interaction);
}
if (interaction.isButton()) {
Button.onButtonClicked(interaction);
}
}
// Emit when bot is logged in and ready to use
public onReady() {
console.log("Ready");
}
}