From e2e9e13f91b0e65c50cc53526a40adab7d4cf9ed Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 6 Oct 2025 19:51:43 -0700 Subject: refactor(gateway): Move all guild IDs to shared constants --- packages/gateway/src/constants.ts | 2 +- packages/gateway/src/listeners/clientReady/umagramCatchup.ts | 5 +++-- packages/gateway/src/listeners/clientReady/voiceConnection.ts | 5 +++-- packages/gateway/src/listeners/messageCreate/roleplayUmagram.ts | 5 +++-- packages/gateway/src/listeners/messageDeletion.ts | 5 +++-- packages/gateway/src/listeners/messageEdit.ts | 5 +++-- 6 files changed, 16 insertions(+), 11 deletions(-) (limited to 'packages/gateway') diff --git a/packages/gateway/src/constants.ts b/packages/gateway/src/constants.ts index c660644..52d1f24 100644 --- a/packages/gateway/src/constants.ts +++ b/packages/gateway/src/constants.ts @@ -1 +1 @@ -export { GUILD_ID } from "../../shared"; +export { GUILD_ID, CENTRAL_GUILD_ID, ROLEPLAY_GUILD_ID } from "../../shared"; diff --git a/packages/gateway/src/listeners/clientReady/umagramCatchup.ts b/packages/gateway/src/listeners/clientReady/umagramCatchup.ts index c8b7c5a..2f10b15 100644 --- a/packages/gateway/src/listeners/clientReady/umagramCatchup.ts +++ b/packages/gateway/src/listeners/clientReady/umagramCatchup.ts @@ -1,8 +1,9 @@ import { Client } from "discord.js"; +import { CENTRAL_GUILD_ID, ROLEPLAY_GUILD_ID } from "../../constants"; const GUILD_UMAGRAM_CHANNELS = { - "1406422617724026901": "1419523288001937458", // Central guild - "1423919136974835782": "1423923190953934960", // Roleplay guild + [CENTRAL_GUILD_ID]: "1419523288001937458", // Central guild + [ROLEPLAY_GUILD_ID]: "1423923190953934960", // Roleplay guild } as const; const processUmagramChannel = async ( diff --git a/packages/gateway/src/listeners/clientReady/voiceConnection.ts b/packages/gateway/src/listeners/clientReady/voiceConnection.ts index a6d697a..c0a7596 100644 --- a/packages/gateway/src/listeners/clientReady/voiceConnection.ts +++ b/packages/gateway/src/listeners/clientReady/voiceConnection.ts @@ -5,10 +5,11 @@ import { VoiceConnectionDisconnectReason, createAudioPlayer, } from "@discordjs/voice"; +import { CENTRAL_GUILD_ID, ROLEPLAY_GUILD_ID } from "../../constants"; const GUILD_VOICE_CHANNELS = { - "1406422617724026901": "1422049438863589487", // Central guild - "1423919136974835782": "1423919139394949221", // Roleplay guild + [CENTRAL_GUILD_ID]: "1422049438863589487", // Central guild + [ROLEPLAY_GUILD_ID]: "1423919139394949221", // Roleplay guild } as const; const createVoiceConnection = ( diff --git a/packages/gateway/src/listeners/messageCreate/roleplayUmagram.ts b/packages/gateway/src/listeners/messageCreate/roleplayUmagram.ts index 23f97bd..1328ca3 100644 --- a/packages/gateway/src/listeners/messageCreate/roleplayUmagram.ts +++ b/packages/gateway/src/listeners/messageCreate/roleplayUmagram.ts @@ -1,8 +1,9 @@ import { Message } from "discord.js"; +import { CENTRAL_GUILD_ID, ROLEPLAY_GUILD_ID } from "../../constants"; const GUILD_UMAGRAM_CHANNELS = { - "1406422617724026901": "1419523288001937458", // Central guild - "1423919136974835782": "1423923190953934960", // Roleplay guild + [CENTRAL_GUILD_ID]: "1419523288001937458", // Central guild + [ROLEPLAY_GUILD_ID]: "1423923190953934960", // Roleplay guild } as const; export const handleRoleplayUmagram = async (message: Message) => { diff --git a/packages/gateway/src/listeners/messageDeletion.ts b/packages/gateway/src/listeners/messageDeletion.ts index 4e6a315..906332f 100644 --- a/packages/gateway/src/listeners/messageDeletion.ts +++ b/packages/gateway/src/listeners/messageDeletion.ts @@ -1,9 +1,10 @@ import { Client, Events, EmbedBuilder } from "discord.js"; import { sendAuditLog } from "../commands/utilities"; +import { CENTRAL_GUILD_ID, ROLEPLAY_GUILD_ID } from "../constants"; const GUILD_CHANNEL_MAPPINGS = { - "1406422617724026901": "1422501525678198855", // Central guild - "1423919136974835782": "1423919143920603141", // Roleplay guild + [CENTRAL_GUILD_ID]: "1422501525678198855", + [ROLEPLAY_GUILD_ID]: "1423919143920603141", } as const; export const handleMessageDeletion = (client: Client) => { diff --git a/packages/gateway/src/listeners/messageEdit.ts b/packages/gateway/src/listeners/messageEdit.ts index f099632..9e3f45c 100644 --- a/packages/gateway/src/listeners/messageEdit.ts +++ b/packages/gateway/src/listeners/messageEdit.ts @@ -1,9 +1,10 @@ import { Client, Events, EmbedBuilder } from "discord.js"; import { sendAuditLog } from "../commands/utilities"; +import { CENTRAL_GUILD_ID, ROLEPLAY_GUILD_ID } from "../constants"; const GUILD_CHANNEL_MAPPINGS = { - "1406422617724026901": "1422501525678198855", // Central guild - "1423919136974835782": "1423919143920603141", // Roleplay guild + [CENTRAL_GUILD_ID]: "1422501525678198855", + [ROLEPLAY_GUILD_ID]: "1423919143920603141", } as const; export const handleMessageEdit = (client: Client) => { -- cgit v1.2.3