3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-09 03:57:19 +00:00
This commit is contained in:
seeyebe 2025-07-08 04:01:28 +00:00 committed by GitHub
commit 835516b864
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 8 deletions

View file

@ -2,10 +2,6 @@ import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
import { modActionsMsgCmd } from "../../types.js"; import { modActionsMsgCmd } from "../../types.js";
import { actualCaseCmd } from "./actualCaseCmd.js"; import { actualCaseCmd } from "./actualCaseCmd.js";
const opts = {
show: ct.switchOption({ def: false, shortcut: "sh" }),
};
export const CaseMsgCmd = modActionsMsgCmd({ export const CaseMsgCmd = modActionsMsgCmd({
trigger: "case", trigger: "case",
permission: "can_view", permission: "can_view",
@ -14,12 +10,10 @@ export const CaseMsgCmd = modActionsMsgCmd({
signature: [ signature: [
{ {
caseNumber: ct.number(), caseNumber: ct.number(),
...opts,
}, },
], ],
async run({ pluginData, message: msg, args }) { async run({ pluginData, message: msg, args }) {
actualCaseCmd(pluginData, msg, msg.author.id, args.caseNumber, args.show); actualCaseCmd(pluginData, msg, msg.author.id, args.caseNumber);
}, },
}); });

View file

@ -9,7 +9,7 @@ export async function actualCaseCmd(
context: Message | ChatInputCommandInteraction, context: Message | ChatInputCommandInteraction,
authorId: string, authorId: string,
caseNumber: number, caseNumber: number,
show: boolean | null, show?: boolean | null,
) { ) {
const theCase = await pluginData.state.cases.findByCaseNumber(caseNumber); const theCase = await pluginData.state.cases.findByCaseNumber(caseNumber);