mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-15 14:15:03 +00:00
Used guildPluginSlashCommand instead of raw blueprints
This commit is contained in:
parent
7eff7bcaa6
commit
cbec6101e0
27 changed files with 168 additions and 121 deletions
|
@ -1,5 +1,7 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { actualCasesCmd } from "../../functions/actualCommands/actualCasesCmd";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
|
||||
const opts = [
|
||||
slashOptions.user({ name: "user", description: "The user to show cases for", required: false }),
|
||||
|
@ -21,7 +23,7 @@ const opts = [
|
|||
slashOptions.boolean({ name: "show", description: "To make the result visible to everyone", required: false }),
|
||||
];
|
||||
|
||||
export const CasesSlashCmd = {
|
||||
export const CasesSlashCmd = modActionsSlashCmd({
|
||||
name: "cases",
|
||||
configPermission: "can_view",
|
||||
description: "Show a list of cases the specified user has or the specified mod made",
|
||||
|
@ -35,9 +37,9 @@ export const CasesSlashCmd = {
|
|||
return actualCasesCmd(
|
||||
pluginData,
|
||||
interaction,
|
||||
options.mod,
|
||||
options.mod?.id ?? null,
|
||||
options.user,
|
||||
interaction.member,
|
||||
interaction.member as GuildMember,
|
||||
options.notes,
|
||||
options.warns,
|
||||
options.mutes,
|
||||
|
@ -51,4 +53,4 @@ export const CasesSlashCmd = {
|
|||
options.show,
|
||||
);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue