mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-08 08:05: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,7 +1,9 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { CommonPlugin } from "../../../Common/CommonPlugin";
|
||||
import { actualMassBanCmd } from "../../functions/actualCommands/actualMassBanCmd";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
|
||||
const opts = [
|
||||
|
@ -12,7 +14,7 @@ const opts = [
|
|||
}),
|
||||
];
|
||||
|
||||
export const MassBanSlashCmd = {
|
||||
export const MassBanSlashCmd = modActionsSlashCmd({
|
||||
name: "massban",
|
||||
configPermission: "can_massban",
|
||||
description: "Mass-ban a list of user IDs",
|
||||
|
@ -39,10 +41,10 @@ export const MassBanSlashCmd = {
|
|||
actualMassBanCmd(
|
||||
pluginData,
|
||||
interaction,
|
||||
options["user-ids"].split(/[\s,\r\n]+/),
|
||||
interaction.member,
|
||||
options["user-ids"].split(/\D+/),
|
||||
interaction.member as GuildMember,
|
||||
options.reason || "",
|
||||
attachments,
|
||||
);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue