Skip to content

Commit b9e0b8e

Browse files
authored
Merge branch 'ZeppelinBot:master' into stock
2 parents 123aa6c + 3e18e6c commit b9e0b8e

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

backend/src/plugins/ModActions/commands/addcase/AddCaseSlashCmd.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export const AddCaseSlashCmd = modActionsSlashCmd({
2828
name: "type",
2929
description: "The type of case to add",
3030
required: true,
31-
choices: Object.keys(CaseTypes).map((type) => ({ name: type, value: type })),
31+
choices: Object.keys(CaseTypes)
32+
.filter((key) => isNaN(Number(key)))
33+
.map((key) => ({ name: key, value: key })),
3234
}),
3335
slashOptions.user({ name: "user", description: "The user to add a case to", required: true }),
3436

backend/src/plugins/ModActions/commands/unhidecase/UnhideCaseMsgCmd.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
22
import { modActionsMsgCmd } from "../../types.js";
3-
import { actualHideCaseCmd } from "../hidecase/actualHideCaseCmd.js";
3+
import { actualUnhideCaseCmd } from "./actualUnhideCaseCmd.js";
44

55
export const UnhideCaseMsgCmd = modActionsMsgCmd({
66
trigger: ["unhide", "unhidecase", "unhide_case"],
@@ -14,6 +14,6 @@ export const UnhideCaseMsgCmd = modActionsMsgCmd({
1414
],
1515

1616
async run({ pluginData, message: msg, args }) {
17-
actualHideCaseCmd(pluginData, msg, args.caseNum);
17+
actualUnhideCaseCmd(pluginData, msg, args.caseNum);
1818
},
1919
});

backend/src/utils/templateSafeObjects.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,11 @@ export function userToTemplateSafeUser(user: User | UnknownUser | PartialUser):
261261

262262
return new TemplateSafeUser({
263263
id: user.id,
264-
username: "Unknown",
265-
discriminator: "0000",
264+
username: user.username || "Unknown",
265+
discriminator: user.discriminator || "0000",
266266
mention: `<@${user.id}>`,
267-
tag: "Unknown#0000",
268-
renderedUsername: "Unknown",
267+
tag: user.tag || "Unknown#0000",
268+
renderedUsername: user.tag || "Unknown",
269269
});
270270
}
271271

0 commit comments

Comments
 (0)