diff options
| author | Fuwn <[email protected]> | 2025-09-28 00:03:12 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-09-28 00:03:12 -0700 |
| commit | 999ba817c68e3dd2b578b27f5f0f527d04be87c7 (patch) | |
| tree | d84ebf1830fb7b35c04129995512ebda4aed4e74 /packages/gateway/src/commands/crp.ts | |
| parent | feat(listeners:roleMentionCooldown): Remove expected behaviour logs (diff) | |
| download | umabotdiscord-999ba817c68e3dd2b578b27f5f0f527d04be87c7.tar.xz umabotdiscord-999ba817c68e3dd2b578b27f5f0f527d04be87c7.zip | |
refactor(gateway): Consolidate event handlers
Diffstat (limited to 'packages/gateway/src/commands/crp.ts')
| -rw-r--r-- | packages/gateway/src/commands/crp.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/gateway/src/commands/crp.ts b/packages/gateway/src/commands/crp.ts index 9f7c509..8503cb3 100644 --- a/packages/gateway/src/commands/crp.ts +++ b/packages/gateway/src/commands/crp.ts @@ -1,11 +1,10 @@ -import { Client, Events, Message, Role } from "discord.js"; +import { Message, Role } from "discord.js"; -export const handleCrpCommand = (client: Client) => { - client.on(Events.MessageCreate, async (message: Message) => { +export const handleCrpCommand = async (message: Message) => { if (message.author.bot) return; if (message.content.toLowerCase().startsWith("uma!crp")) { - const application = await client.application?.fetch(); + const application = await message.client.application?.fetch(); const ownerId = application?.owner?.id; if (message.author.id !== ownerId) { @@ -95,5 +94,4 @@ export const handleCrpCommand = (client: Client) => { ); } } - }); }; |