mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-14 13:55:03 +00:00
Added Discord attachment link reaction, fixed emoji configuration and moved util functions
This commit is contained in:
parent
a4c4b17a14
commit
592d037148
173 changed files with 1540 additions and 1170 deletions
|
@ -1,7 +1,8 @@
|
|||
import { slashOptions } from "knub";
|
||||
import { hasPermission, sendErrorMessage } from "../../../../pluginUtils";
|
||||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { convertDelayStringToMS } from "../../../../utils";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { CommonPlugin } from "../../../Common/CommonPlugin";
|
||||
import { actualForceBanCmd } from "../../functions/actualCommands/actualForceBanCmd";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
|
||||
|
@ -26,7 +27,9 @@ export const ForceBanSlashCmd = {
|
|||
const attachments = retrieveMultipleOptions(NUMBER_ATTACHMENTS_CASE_CREATION, options, "attachment");
|
||||
|
||||
if ((!options.reason || options.reason.trim() === "") && attachments.length < 1) {
|
||||
sendErrorMessage(pluginData, interaction, "Text or attachment required", undefined, undefined, true);
|
||||
pluginData
|
||||
.getPlugin(CommonPlugin)
|
||||
.sendErrorMessage(interaction, "Text or attachment required", undefined, undefined, true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -39,7 +42,9 @@ export const ForceBanSlashCmd = {
|
|||
|
||||
if (options.mod) {
|
||||
if (!canActAsOther) {
|
||||
sendErrorMessage(pluginData, interaction, "You don't have permission to act as another moderator");
|
||||
pluginData
|
||||
.getPlugin(CommonPlugin)
|
||||
.sendErrorMessage(interaction, "You don't have permission to act as another moderator");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -48,7 +53,7 @@ export const ForceBanSlashCmd = {
|
|||
|
||||
const convertedTime = options.time ? convertDelayStringToMS(options.time) : null;
|
||||
if (options.time && !convertedTime) {
|
||||
sendErrorMessage(pluginData, interaction, `Could not convert ${options.time} to a delay`);
|
||||
pluginData.getPlugin(CommonPlugin).sendErrorMessage(interaction, `Could not convert ${options.time} to a delay`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue