mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-08 08:05:03 +00:00
Ran prettier to fix style issues
This commit is contained in:
parent
893a77d562
commit
1f0c7a4349
170 changed files with 396 additions and 453 deletions
|
@ -2,8 +2,8 @@ import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
|||
import { CaseTypes } from "../../../../data/CaseTypes";
|
||||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { resolveUser } from "../../../../utils";
|
||||
import { actualAddCaseCmd } from "./actualAddCaseCmd";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualAddCaseCmd } from "./actualAddCaseCmd";
|
||||
|
||||
const opts = {
|
||||
mod: ct.member({ option: true }),
|
||||
|
|
|
@ -4,9 +4,9 @@ import { CaseTypes } from "../../../../data/CaseTypes";
|
|||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { resolveMember } from "../../../../utils";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { actualAddCaseCmd } from "./actualAddCaseCmd";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualAddCaseCmd } from "./actualAddCaseCmd";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "reason", description: "The reason", required: false }),
|
||||
|
@ -48,10 +48,7 @@ export const AddCaseSlashCmd = modActionsSlashCmd({
|
|||
|
||||
if (options.mod) {
|
||||
if (!canActAsOther) {
|
||||
pluginData.state.common.sendErrorMessage(
|
||||
interaction,
|
||||
"You don't have permission to act as another moderator"
|
||||
);
|
||||
pluginData.state.common.sendErrorMessage(interaction, "You don't have permission to act as another moderator");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import { canActOn } from "../../../../pluginUtils";
|
|||
import { UnknownUser, renderUsername, resolveMember } from "../../../../utils";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "../../functions/formatReasonForAttachments";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
|
||||
export async function actualAddCaseCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
@ -27,10 +27,7 @@ export async function actualAddCaseCmd(
|
|||
// If the user exists as a guild member, make sure we can act on them first
|
||||
const member = await resolveMember(pluginData.client, pluginData.guild, user.id);
|
||||
if (member && !canActOn(pluginData, author, member)) {
|
||||
pluginData.state.common.sendErrorMessage(
|
||||
context,
|
||||
"Cannot add case on this user: insufficient permissions"
|
||||
);
|
||||
pluginData.state.common.sendErrorMessage(context, "Cannot add case on this user: insufficient permissions");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -49,7 +46,7 @@ export async function actualAddCaseCmd(
|
|||
if (user) {
|
||||
pluginData.state.common.sendSuccessMessage(
|
||||
context,
|
||||
`Case #${theCase.case_number} created for **${renderUsername(user)}**`
|
||||
`Case #${theCase.case_number} created for **${renderUsername(user)}**`,
|
||||
);
|
||||
} else {
|
||||
pluginData.state.common.sendSuccessMessage(context, `Case #${theCase.case_number} created`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue