3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-14 13:55:03 +00:00

Made cases commands ephemeral by default

This commit is contained in:
Lily Bergonzat 2024-02-17 23:57:01 +01:00
parent b428e18fc7
commit ba65ecb48f
8 changed files with 52 additions and 15 deletions

View file

@ -1,6 +1,10 @@
import { slashOptions } from "knub";
import { actualCaseCmd } from "../../functions/actualCommands/actualCaseCmd";
const opts = [
slashOptions.boolean({ name: "show", description: "To make the result visible to everyone", required: false }),
];
export const CaseSlashCmd = {
name: "case",
configPermission: "can_view",
@ -9,9 +13,11 @@ export const CaseSlashCmd = {
signature: [
slashOptions.number({ name: "case-number", description: "The number of the case to show", required: true }),
...opts,
],
async run({ interaction, options, pluginData }) {
actualCaseCmd(pluginData, interaction, interaction.user.id, options["case-number"]);
actualCaseCmd(pluginData, interaction, interaction.user.id, options["case-number"], options.show);
},
};