summaryrefslogtreecommitdiff
path: root/packages/interactions/server.ts
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-09-26 21:08:43 -0700
committerFuwn <[email protected]>2025-09-26 21:08:43 -0700
commita679552ff14991afac588e8ea90384c07f3e5541 (patch)
treecaa4f7f147fb982d3d963f2c0177b28ad0723d75 /packages/interactions/server.ts
parentfeat(gateway:moderationAgent): Overhaul agent (diff)
downloadumabotdiscord-a679552ff14991afac588e8ea90384c07f3e5541.tar.xz
umabotdiscord-a679552ff14991afac588e8ea90384c07f3e5541.zip
feat(interactions): Rename roleplay verification slash command
Diffstat (limited to 'packages/interactions/server.ts')
-rw-r--r--packages/interactions/server.ts24
1 files changed, 12 insertions, 12 deletions
diff --git a/packages/interactions/server.ts b/packages/interactions/server.ts
index 46bef06..8c8d3db 100644
--- a/packages/interactions/server.ts
+++ b/packages/interactions/server.ts
@@ -8,7 +8,7 @@ import {
COMPLAIN_COMMAND,
APPEAL_COMMAND,
COLOURS_COMMAND,
- ROLEPLAY_SERIOUS_COMMAND,
+ ROLEPLAY_VERIFY_COMMAND,
} from "./discord/commands";
import {
getCutePost,
@@ -31,7 +31,7 @@ import { GUILD_ID, COLOR_ROLE_IDS } from "../shared";
const router = AutoRouter();
const COMPLAINT_CHANNEL_ID = "1415868433714778204";
const APPEAL_CHANNEL_ID = "1420340807931531385";
-const SERIOUS_ROLEPLAY_ROLE_ID = "1418311833303122021";
+const VERIFIED_ROLEPLAY_ROLE_ID = "1418311833303122021";
const ROLE_MANAGER_ROLE_ID = "1410993207608873070";
const sendComplaintToChannel = async (
@@ -527,7 +527,7 @@ router.post("/", async (request: Request, environment: Environment) => {
}
}
- case ROLEPLAY_SERIOUS_COMMAND.name.toLowerCase(): {
+ case ROLEPLAY_VERIFY_COMMAND.name.toLowerCase(): {
try {
const member = interaction.member;
const hasAdminPermission =
@@ -578,7 +578,7 @@ router.post("/", async (request: Request, environment: Environment) => {
const targetMember = await guild.json();
const currentRoles = targetMember.roles || [];
- const hasRole = currentRoles.includes(SERIOUS_ROLEPLAY_ROLE_ID);
+ const hasRole = currentRoles.includes(VERIFIED_ROLEPLAY_ROLE_ID);
let newRoles = [...currentRoles];
let actionTaken = "";
@@ -589,12 +589,12 @@ router.post("/", async (request: Request, environment: Environment) => {
type: InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE,
data: {
content:
- "❌ The user already has the serious roleplay role.",
+ "❌ The user already has the verified roleplay role.",
flags: 64,
},
});
- newRoles.push(SERIOUS_ROLEPLAY_ROLE_ID);
+ newRoles.push(VERIFIED_ROLEPLAY_ROLE_ID);
actionTaken = "added";
@@ -606,13 +606,13 @@ router.post("/", async (request: Request, environment: Environment) => {
type: InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE,
data: {
content:
- "❌ The user doesn't have the serious roleplay role.",
+ "❌ The user doesn't have the verified roleplay role.",
flags: 64,
},
});
newRoles = newRoles.filter(
- (roleId) => roleId !== SERIOUS_ROLEPLAY_ROLE_ID,
+ (roleId) => roleId !== VERIFIED_ROLEPLAY_ROLE_ID,
);
actionTaken = "removed";
@@ -621,11 +621,11 @@ router.post("/", async (request: Request, environment: Environment) => {
case "toggle":
if (hasRole) {
newRoles = newRoles.filter(
- (roleId) => roleId !== SERIOUS_ROLEPLAY_ROLE_ID,
+ (roleId) => roleId !== VERIFIED_ROLEPLAY_ROLE_ID,
);
actionTaken = "removed";
} else {
- newRoles.push(SERIOUS_ROLEPLAY_ROLE_ID);
+ newRoles.push(VERIFIED_ROLEPLAY_ROLE_ID);
actionTaken = "added";
}
@@ -676,11 +676,11 @@ router.post("/", async (request: Request, environment: Environment) => {
return new JSONResponse({
type: InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE,
data: {
- content: `✅ Successfully ${actionTaken} the serious roleplay role for <@${targetUserID}>.`,
+ content: `✅ Successfully ${actionTaken} the verified roleplay role for <@${targetUserID}>.`,
},
});
} catch (error) {
- console.error("Error in roleplay-serious command:", error);
+ console.error("Error in roleplay-verify command:", error);
return new JSONResponse({
type: InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE,