summaryrefslogtreecommitdiff
path: root/packages/gateway
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gateway')
-rw-r--r--packages/gateway/src/commands/say.ts4
-rw-r--r--packages/gateway/src/commands/utilities.ts6
-rw-r--r--packages/gateway/src/constants.ts1
-rw-r--r--packages/gateway/src/listeners/channelDeletion.ts6
-rw-r--r--packages/gateway/src/listeners/mediaModeration.ts4
-rw-r--r--packages/gateway/src/listeners/messageCreate/index.ts4
-rw-r--r--packages/gateway/src/listeners/roleProtection.ts4
7 files changed, 14 insertions, 15 deletions
diff --git a/packages/gateway/src/commands/say.ts b/packages/gateway/src/commands/say.ts
index 8a9ab5a..23c2880 100644
--- a/packages/gateway/src/commands/say.ts
+++ b/packages/gateway/src/commands/say.ts
@@ -1,5 +1,5 @@
import { Message } from "discord.js";
-import { GUILD_ID } from "../constants";
+import { CENTRAL_GUILD_ID } from "../constants";
import { replyWithCleanup } from "../utilities";
export const handleSayCommand = async (message: Message) => {
@@ -30,7 +30,7 @@ export const handleSayCommand = async (message: Message) => {
if (messageIdMatch) {
try {
- const guild = message.client.guilds.cache.get(GUILD_ID);
+ const guild = message.client.guilds.cache.get(CENTRAL_GUILD_ID);
if (!guild) {
await replyWithCleanup(message, "❌ Guild not found.");
diff --git a/packages/gateway/src/commands/utilities.ts b/packages/gateway/src/commands/utilities.ts
index fd3b84d..19f9e90 100644
--- a/packages/gateway/src/commands/utilities.ts
+++ b/packages/gateway/src/commands/utilities.ts
@@ -1,5 +1,5 @@
import { Client, ChannelType } from "discord.js";
-import { GUILD_ID } from "../constants";
+import { CENTRAL_GUILD_ID } from "../constants";
export const AUDIT_LOG_GUILD_ID = "1419211292396224575";
export const AUDIT_LOG_CHANNEL_ID = "1419211778793144411";
@@ -408,7 +408,7 @@ export const getAllChannelsInCategory = async (
client: Client,
categoryId: string,
): Promise<{ channels: string[]; channelNames: { [key: string]: string } }> => {
- const guild = client.guilds.cache.get(GUILD_ID);
+ const guild = client.guilds.cache.get(CENTRAL_GUILD_ID);
if (!guild) return { channels: [], channelNames: {} };
@@ -483,7 +483,7 @@ export const executeBulkRoleAssignment = async (
categoryId?: string,
): Promise<void> => {
try {
- const guild = client.guilds.cache.get(GUILD_ID);
+ const guild = client.guilds.cache.get(CENTRAL_GUILD_ID);
if (!guild) {
await sendProgressUpdate(
diff --git a/packages/gateway/src/constants.ts b/packages/gateway/src/constants.ts
index 117598c..e544c05 100644
--- a/packages/gateway/src/constants.ts
+++ b/packages/gateway/src/constants.ts
@@ -1,5 +1,4 @@
export {
- GUILD_ID,
CENTRAL_GUILD_ID,
ROLEPLAY_GUILD_ID,
CENTRAL_MESSAGE_LOG_CHANNEL_ID,
diff --git a/packages/gateway/src/listeners/channelDeletion.ts b/packages/gateway/src/listeners/channelDeletion.ts
index c99fb51..44c58f6 100644
--- a/packages/gateway/src/listeners/channelDeletion.ts
+++ b/packages/gateway/src/listeners/channelDeletion.ts
@@ -1,5 +1,5 @@
import { Client, Events } from "discord.js";
-import { GUILD_ID } from "../constants";
+import { CENTRAL_GUILD_ID } from "../constants";
const channelDeletionTracker = new Map<
string,
@@ -11,12 +11,12 @@ export const handleChannelDeletion = (client: Client) => {
if (
!("guildId" in deletedChannel) ||
!deletedChannel.guildId ||
- deletedChannel.guildId !== GUILD_ID
+ deletedChannel.guildId !== CENTRAL_GUILD_ID
)
return;
try {
- const guild = client.guilds.cache.get(GUILD_ID);
+ const guild = client.guilds.cache.get(CENTRAL_GUILD_ID);
if (!guild) return;
diff --git a/packages/gateway/src/listeners/mediaModeration.ts b/packages/gateway/src/listeners/mediaModeration.ts
index d208b75..1b63089 100644
--- a/packages/gateway/src/listeners/mediaModeration.ts
+++ b/packages/gateway/src/listeners/mediaModeration.ts
@@ -1,11 +1,11 @@
import { Client, Events, Message } from "discord.js";
-import { GUILD_ID, CENTRAL_ART_MEDIA_CHANNEL_ID } from "../constants";
+import { CENTRAL_GUILD_ID, CENTRAL_ART_MEDIA_CHANNEL_ID } from "../constants";
const MONITORED_CHANNEL_ID = CENTRAL_ART_MEDIA_CHANNEL_ID;
export const handleMediaModeration = (client: Client) => {
client.on(Events.MessageCreate, async (message: Message) => {
- if (message.guildId !== GUILD_ID) return;
+ if (message.guildId !== CENTRAL_GUILD_ID) return;
if (message.channelId !== MONITORED_CHANNEL_ID) return;
if (message.author.bot) return;
diff --git a/packages/gateway/src/listeners/messageCreate/index.ts b/packages/gateway/src/listeners/messageCreate/index.ts
index cd2d291..d736844 100644
--- a/packages/gateway/src/listeners/messageCreate/index.ts
+++ b/packages/gateway/src/listeners/messageCreate/index.ts
@@ -1,5 +1,5 @@
import { Client, Events, Message } from "discord.js";
-import { GUILD_ID } from "../../constants";
+import { CENTRAL_GUILD_ID } from "../../constants";
import { handleIqdbModeration } from "./iqdbModeration";
import { handleRoleplayUmagram } from "./roleplayUmagram";
// import { handleArtMediaModeration } from "./artMediaModeration";
@@ -15,7 +15,7 @@ export const handleMessageCreate = (client: Client) => {
await handleRandomEyesReaction(message);
await handleRoleplayThumbsUpReaction(message);
- if (message.guildId !== GUILD_ID) return;
+ if (message.guildId !== CENTRAL_GUILD_ID) return;
await Promise.allSettled([
handleIqdbModeration(message),
diff --git a/packages/gateway/src/listeners/roleProtection.ts b/packages/gateway/src/listeners/roleProtection.ts
index 2f9cf97..e2e8c2c 100644
--- a/packages/gateway/src/listeners/roleProtection.ts
+++ b/packages/gateway/src/listeners/roleProtection.ts
@@ -1,5 +1,5 @@
import { Client, Events } from "discord.js";
-import { GUILD_ID, CENTRAL_PROTECTED_ROLE_ID } from "../constants";
+import { CENTRAL_GUILD_ID, CENTRAL_PROTECTED_ROLE_ID } from "../constants";
const COLOR_ROLE_IDS = [
"1407075059830624406", // Nice Nature Red
"1407075160250650664", // Taiki Shuttle Green
@@ -32,7 +32,7 @@ const COLOR_ROLE_IDS = [
export const handleRoleProtection = (client: Client) => {
client.on(Events.GuildMemberUpdate, async (oldMember, newMember) => {
- if (newMember.guild.id !== GUILD_ID) return;
+ if (newMember.guild.id !== CENTRAL_GUILD_ID) return;
const oldRoles = oldMember.roles.cache;
const newRoles = newMember.roles.cache;