use interaction handler
This commit is contained in:
6 files changed
+38
-15
No files matched your search
@@ -0,0 +1,13 @@
|
||||
module.exports = async (client, interaction) => {
|
||||
if (interaction.isCommand()) return;
|
||||
|
||||
/*
|
||||
This file hanldes all button interactions from any command
|
||||
*/
|
||||
|
||||
let GuildDB = await client.GetGuild(interaction.guildId);
|
||||
const interactionName = interaction.customId.split('-')[0];
|
||||
let interactionHandler = client.interactionHandlers.get(interactionName);
|
||||
|
||||
interactionHandler.run(client, interaction, GuildDB);
|
||||
}
|
||||
Reference in new issue
Block a user