summaryrefslogtreecommitdiff
path: root/packages/gateway
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-10-15 15:27:00 -0700
committerFuwn <[email protected]>2025-10-15 15:27:00 -0700
commitc8a9b2e5c6641bc29e215e451d9a978eab7b466c (patch)
treec1125fa528d2d1a0914cae3d2fd04ba8920b91b2 /packages/gateway
parentfeat(gateway:react): Support multiple emoji at once (diff)
downloadumabotdiscord-c8a9b2e5c6641bc29e215e451d9a978eab7b466c.tar.xz
umabotdiscord-c8a9b2e5c6641bc29e215e451d9a978eab7b466c.zip
feat(gateway:rtur): Track additional channel
Diffstat (limited to 'packages/gateway')
-rw-r--r--packages/gateway/src/constants.ts1
-rw-r--r--packages/gateway/src/listeners/messageCreate/roleplayThumbsUpReaction.ts17
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);
}
};