3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-13 21:35:02 +00:00
zeppelin/backend/src/plugins/ModActions/commands/update/UpdateMsgCmd.ts
2024-02-14 09:18:40 +01:00

24 lines
790 B
TypeScript

import { commandTypeHelpers as ct } from "../../../../commandTypes";
import { updateCase } from "../../functions/updateCase";
import { modActionsMsgCmd } from "../../types";
export const UpdateMsgCmd = modActionsMsgCmd({
trigger: ["update", "reason"],
permission: "can_note",
description:
"Update the specified case (or, if case number is omitted, your latest case) by adding more notes/details to it",
signature: [
{
caseNumber: ct.number(),
note: ct.string({ required: false, catchAll: true }),
},
{
note: ct.string({ required: false, catchAll: true }),
},
],
async run({ pluginData, message: msg, args }) {
await updateCase(pluginData, msg.channel, msg.author, args.caseNumber, args.note, [...msg.attachments.values()]);
},
});