refactor/project structure and indents for typescript

This commit is contained in:
SowinskiBraeden committed 2025-09-28 11:53:28 -07:00
1 parent df6b9140ec
commit cb84e63a69
105 files changed
+8725 -8721

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
const { InteractionType } = require("discord.js");
const { GetGuild } = require("../database/guild");
module.exports = async (client, interaction) => {
if (interaction.type == InteractionType.ApplicationCommand) return;
/*
This file routes any menu, modal & button interactions
from any command
*/
let GuildDB = await GetGuild(client, interaction.guildId);
const interactionName = interaction.customId.split("-")[0];
let interactionHandler = client.interactionHandlers.get(interactionName);
try {
interactionHandler.run(client, interaction, GuildDB);
} catch (err) {
client.sendInternalError(interaction, err);
}
}