diff options
| author | Fuwn <[email protected]> | 2025-10-15 15:27:00 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-10-15 15:27:00 -0700 |
| commit | c8a9b2e5c6641bc29e215e451d9a978eab7b466c (patch) | |
| tree | c1125fa528d2d1a0914cae3d2fd04ba8920b91b2 /packages/gateway | |
| parent | feat(gateway:react): Support multiple emoji at once (diff) | |
| download | umabotdiscord-c8a9b2e5c6641bc29e215e451d9a978eab7b466c.tar.xz umabotdiscord-c8a9b2e5c6641bc29e215e451d9a978eab7b466c.zip | |
feat(gateway:rtur): Track additional channel
Diffstat (limited to 'packages/gateway')
| -rw-r--r-- | packages/gateway/src/constants.ts | 1 | ||||
| -rw-r--r-- | packages/gateway/src/listeners/messageCreate/roleplayThumbsUpReaction.ts | 17 |
2 files changed, 12 insertions, 6 deletions
diff --git a/packages/gateway/src/constants.ts b/packages/gateway/src/constants.ts index b491370..64a17ff 100644 --- a/packages/gateway/src/constants.ts +++ b/packages/gateway/src/constants.ts @@ -38,6 +38,7 @@ export { DISCORD_ACTIVITY_TYPES, DISCORD_APPLICATION_COMMAND_OPTION_TYPES, DISCORD_INTERACTION_CONTEXTS, + CENTRAL_SERVER_STAFF_ANNOUNCEMENTS_CHANNEL_ID, } from "../../shared"; export const UMA_PERSONAS = [ diff --git a/packages/gateway/src/listeners/messageCreate/roleplayThumbsUpReaction.ts b/packages/gateway/src/listeners/messageCreate/roleplayThumbsUpReaction.ts index f5715ee..fb8b32b 100644 --- a/packages/gateway/src/listeners/messageCreate/roleplayThumbsUpReaction.ts +++ b/packages/gateway/src/listeners/messageCreate/roleplayThumbsUpReaction.ts @@ -1,17 +1,22 @@ import { Message } from "discord.js"; -import { ROLEPLAY_ANNOUNCEMENTS_CHANNEL_ID } from "../../constants"; +import { + ROLEPLAY_ANNOUNCEMENTS_CHANNEL_ID, + CENTRAL_SERVER_STAFF_ANNOUNCEMENTS_CHANNEL_ID, +} from "../../constants"; + +const THUMBS_UP_CHANNELS = [ + ROLEPLAY_ANNOUNCEMENTS_CHANNEL_ID, + CENTRAL_SERVER_STAFF_ANNOUNCEMENTS_CHANNEL_ID, +] as const; export const handleRoleplayThumbsUpReaction = async (message: Message) => { - if (message.channelId !== ROLEPLAY_ANNOUNCEMENTS_CHANNEL_ID) return; + if (!THUMBS_UP_CHANNELS.includes(message.channelId as any)) return; if (message.author.id === message.client.user?.id) return; try { await message.react("👍"); } catch (error) { - console.error( - "Failed to add thumbs up reaction to roleplay message:", - error, - ); + console.error("Failed to add thumbs up reaction to message:", error); } }; |