mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-09 03:57:19 +00:00
Merge f9c566b243
into 3e18e6c124
This commit is contained in:
commit
835516b864
2 changed files with 2 additions and 8 deletions
|
@ -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);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue