diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-03-08 19:37:57 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-03-08 19:37:57 -0500 |
commit | b86a05f4b21c62e18bf669e00646b715a409bdb0 (patch) | |
tree | 6d3623c45fd321ade5f8bbf6de37385f43123759 /src/listeners/client | |
parent | 57e47b8b84dee001c65c1ab43833c09fef056a4b (diff) | |
download | tanzanite-b86a05f4b21c62e18bf669e00646b715a409bdb0.tar.gz tanzanite-b86a05f4b21c62e18bf669e00646b715a409bdb0.tar.bz2 tanzanite-b86a05f4b21c62e18bf669e00646b715a409bdb0.zip |
feat: misc changes for extentions
Diffstat (limited to 'src/listeners/client')
-rw-r--r-- | src/listeners/client/interactionCreate.ts | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/listeners/client/interactionCreate.ts b/src/listeners/client/interactionCreate.ts deleted file mode 100644 index d123e09..0000000 --- a/src/listeners/client/interactionCreate.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { AutoMod, BushInteractionType, BushListener, type BushButtonInteraction, type BushClientEvents } from '#lib'; - -export default class InteractionCreateListener extends BushListener { - public constructor() { - super('interactionCreate', { - emitter: 'client', - event: 'interactionCreate', - category: 'client' - }); - } - - public override async exec(...[interaction]: BushClientEvents['interactionCreate']) { - if (!interaction) return; - if ('customId' in interaction && (interaction as any)['customId'].startsWith('test')) return; - void client.console.verbose( - 'interactionVerbose', - `An interaction of type <<${BushInteractionType[interaction.type]}>> was received from <<${interaction.user.tag}>>.` - ); - if (interaction.isCommand()) { - return; - } else if (interaction.isButton()) { - const id = interaction.customId; - if (['paginate_', 'command_', 'confirmationPrompt_', 'appeal'].some((s) => id.startsWith(s))) return; - else if (id.startsWith('automod;')) void AutoMod.handleInteraction(interaction as BushButtonInteraction); - else return await interaction.reply({ content: 'Buttons go brrr', ephemeral: true }); - } else if (interaction.isSelectMenu()) { - if (interaction.customId.startsWith('command_')) return; - return await interaction.reply({ - content: `You selected ${ - Array.isArray(interaction.values) - ? util.oxford(util.surroundArray(interaction.values, '`'), 'and', '') - : util.format.input(interaction.values) - }.`, - ephemeral: true - }); - } - } -} |