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

Fixes, refactoring and PR feedback

This commit is contained in:
Lily Bergonzat 2024-04-15 15:51:45 +02:00
parent 0be54912c4
commit 893a77d562
202 changed files with 1037 additions and 1069 deletions

View file

@ -1,8 +1,7 @@
import { GuildMember } from "discord.js";
import { slashOptions } from "knub";
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
import { CommonPlugin } from "../../../Common/CommonPlugin";
import { actualMassUnbanCmd } from "../../functions/actualCommands/actualMassUnbanCmd";
import { actualMassUnbanCmd } from "./actualMassUnbanCmd";
import { modActionsSlashCmd } from "../../types";
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
@ -31,9 +30,13 @@ export const MassUnbanSlashCmd = modActionsSlashCmd({
const attachments = retrieveMultipleOptions(NUMBER_ATTACHMENTS_CASE_CREATION, options, "attachment");
if ((!options.reason || options.reason.trim() === "") && attachments.length < 1) {
pluginData
.getPlugin(CommonPlugin)
.sendErrorMessage(interaction, "Text or attachment required", undefined, undefined, true);
pluginData.state.common.sendErrorMessage(
interaction,
"Text or attachment required",
undefined,
undefined,
true
);
return;
}