From 7ea46d86a98467a7e97d9a4b6d81c4aff625b0c0 Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Sat, 16 May 2026 02:11:16 -0700 Subject: [PATCH] feat: add Rhia as admin user for announcement command Add Rhia's Discord ID to the admin users list, allowing her to run the /announcement command alongside Naomi. Updated the permission check to use a shared adminUsers array. Co-Authored-By: Claude Sonnet 4.5 --- bot/src/commands/announcement.ts | 6 +++--- bot/src/config/entitlements.ts | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bot/src/commands/announcement.ts b/bot/src/commands/announcement.ts index 80bdbf8..6cf5b82 100644 --- a/bot/src/commands/announcement.ts +++ b/bot/src/commands/announcement.ts @@ -11,7 +11,7 @@ import { TextInputBuilder, TextInputStyle, } from "discord.js"; -import { naomiId } from "../config/entitlements.js"; +import { adminUsers } from "../config/entitlements.js"; import { errorHandler } from "../utils/errorHandler.js"; import type { Command } from "../interfaces/command.js"; @@ -24,9 +24,9 @@ import type { Command } from "../interfaces/command.js"; // eslint-disable-next-line max-lines-per-function -- Modal requires many input components export const announcement: Command = async(_hikari, interaction) => { try { - if (interaction.user.id !== naomiId) { + if (!adminUsers.includes(interaction.user.id)) { await interaction.reply({ - content: "This command is restricted to the owner.", + content: "This command is restricted to administrators.", ephemeral: true, }); return; diff --git a/bot/src/config/entitlements.ts b/bot/src/config/entitlements.ts index dada84a..41932f8 100644 --- a/bot/src/config/entitlements.ts +++ b/bot/src/config/entitlements.ts @@ -4,6 +4,7 @@ * @author Naomi Carrigan */ const naomiId = "465650873650118659"; +const rhiaId = "1086567250145841252"; const entitledGuilds = [ "1354624415861833870", @@ -11,4 +12,9 @@ const entitledGuilds = [ const entitledUsers = [ naomiId ]; -export { entitledGuilds, entitledUsers, naomiId }; +/** + * User IDs allowed to run administrative commands. + */ +const adminUsers = [ naomiId, rhiaId ]; + +export { adminUsers, entitledGuilds, entitledUsers, naomiId };