blob: 3470450d7681ab72b22570be0307a8c91398e947 [file] [log] [blame]
pineafanad54d752022-04-18 19:01:43 +01001import { callback as roleMenu } from "../automations/roleMenu.js"
2import verify from "../automations/verify.js";
3import create from "../automations/tickets/create.js";
4import close from "../automations/tickets/delete.js";
5
6export const event = 'interactionCreate';
7
8async function interactionCreate(interaction) {
9 if (interaction.componentType === "BUTTON") {
10 if (interaction.customId === "rolemenu") return await roleMenu(interaction)
11 if (interaction.customId === "verifybutton") return verify(interaction)
12 if (interaction.customId === "createticket") return create(interaction)
13 if (interaction.customId === "closeticket") return close(interaction)
14 } else if (interaction.componentType === "MESSAGE_COMPONENT") {
15 console.table(interaction)
16 }
17}
18
19export async function callback(client, interaction) {
20 await interactionCreate(interaction)
21}