mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-08 08:05:03 +00:00
chore: esm imports
This will make merging this into 'next' much easier.
This commit is contained in:
parent
1f0c7a4349
commit
45e3fe2ef0
798 changed files with 3633 additions and 3633 deletions
|
@ -1,9 +1,9 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes";
|
||||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { resolveUser } from "../../../../utils";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualAddCaseCmd } from "./actualAddCaseCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes.js";
|
||||
import { hasPermission } from "../../../../pluginUtils.js";
|
||||
import { resolveUser } from "../../../../utils.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualAddCaseCmd } from "./actualAddCaseCmd.js";
|
||||
|
||||
const opts = {
|
||||
mod: ct.member({ option: true }),
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes";
|
||||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { resolveMember } from "../../../../utils";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualAddCaseCmd } from "./actualAddCaseCmd";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes.js";
|
||||
import { hasPermission } from "../../../../pluginUtils.js";
|
||||
import { resolveMember } from "../../../../utils.js";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualAddCaseCmd } from "./actualAddCaseCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "reason", description: "The reason", required: false }),
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { Attachment, ChatInputCommandInteraction, GuildMember, Message, User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes";
|
||||
import { Case } from "../../../../data/entities/Case";
|
||||
import { canActOn } from "../../../../pluginUtils";
|
||||
import { UnknownUser, renderUsername, resolveMember } from "../../../../utils";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "../../functions/formatReasonForAttachments";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes.js";
|
||||
import { Case } from "../../../../data/entities/Case.js";
|
||||
import { canActOn } from "../../../../pluginUtils.js";
|
||||
import { UnknownUser, renderUsername, resolveMember } from "../../../../utils.js";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction.js";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "../../functions/formatReasonForAttachments.js";
|
||||
import { ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualAddCaseCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { UserNotificationMethod, resolveUser } from "../../../../utils";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualBanCmd } from "./actualBanCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { hasPermission } from "../../../../pluginUtils.js";
|
||||
import { UserNotificationMethod, resolveUser } from "../../../../utils.js";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualBanCmd } from "./actualBanCmd.js";
|
||||
|
||||
const opts = {
|
||||
mod: ct.member({ option: true }),
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { ChannelType, GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { UserNotificationMethod, convertDelayStringToMS, resolveMember } from "../../../../utils";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualBanCmd } from "./actualBanCmd";
|
||||
import { hasPermission } from "../../../../pluginUtils.js";
|
||||
import { UserNotificationMethod, convertDelayStringToMS, resolveMember } from "../../../../utils.js";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualBanCmd } from "./actualBanCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "time", description: "The duration of the ban", required: false }),
|
||||
|
|
|
@ -2,22 +2,22 @@ import { Attachment, ChatInputCommandInteraction, GuildMember, Message, User } f
|
|||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { getMemberLevel } from "knub/helpers";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes";
|
||||
import { clearExpiringTempban, registerExpiringTempban } from "../../../../data/loops/expiringTempbansLoop";
|
||||
import { canActOn, getContextChannel } from "../../../../pluginUtils";
|
||||
import { UnknownUser, UserNotificationMethod, renderUsername, resolveMember } from "../../../../utils";
|
||||
import { banLock } from "../../../../utils/lockNameHelpers";
|
||||
import { waitForButtonConfirm } from "../../../../utils/waitForInteraction";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
import { banUserId } from "../../functions/banUserId";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes.js";
|
||||
import { clearExpiringTempban, registerExpiringTempban } from "../../../../data/loops/expiringTempbansLoop.js";
|
||||
import { canActOn, getContextChannel } from "../../../../pluginUtils.js";
|
||||
import { UnknownUser, UserNotificationMethod, renderUsername, resolveMember } from "../../../../utils.js";
|
||||
import { banLock } from "../../../../utils/lockNameHelpers.js";
|
||||
import { waitForButtonConfirm } from "../../../../utils/waitForInteraction.js";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction.js";
|
||||
import { banUserId } from "../../functions/banUserId.js";
|
||||
import {
|
||||
formatReasonWithAttachments,
|
||||
formatReasonWithMessageLinkForAttachments,
|
||||
} from "../../functions/formatReasonForAttachments";
|
||||
import { isBanned } from "../../functions/isBanned";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
} from "../../functions/formatReasonForAttachments.js";
|
||||
import { isBanned } from "../../functions/isBanned.js";
|
||||
import { ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualBanCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualCaseCmd } from "./actualCaseCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualCaseCmd } from "./actualCaseCmd.js";
|
||||
|
||||
const opts = {
|
||||
show: ct.switchOption({ def: false, shortcut: "sh" }),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { slashOptions } from "knub";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { actualCaseCmd } from "./actualCaseCmd";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { actualCaseCmd } from "./actualCaseCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.boolean({ name: "show", description: "To make the result visible to everyone", required: false }),
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { ChatInputCommandInteraction, Message } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { sendContextResponse } from "../../../../pluginUtils";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
import { sendContextResponse } from "../../../../pluginUtils.js";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin.js";
|
||||
import { ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualCaseCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualCasesCmd } from "./actualCasesCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualCasesCmd } from "./actualCasesCmd.js";
|
||||
|
||||
const opts = {
|
||||
mod: ct.userId({ option: true }),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { actualCasesCmd } from "./actualCasesCmd";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { actualCasesCmd } from "./actualCasesCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.user({ name: "user", description: "The user to show cases for", required: false }),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { resolveMember, resolveUser, UnknownUser } from "../../../../utils";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualCasesCmd } from "./actualCasesCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { resolveMember, resolveUser, UnknownUser } from "../../../../utils.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualCasesCmd } from "./actualCasesCmd.js";
|
||||
|
||||
const opts = {
|
||||
mod: ct.userId({ option: true }),
|
||||
|
|
|
@ -2,9 +2,9 @@ import { APIEmbed, ChatInputCommandInteraction, GuildMember, Message, User } fro
|
|||
import { GuildPluginData } from "knub";
|
||||
import { In } from "typeorm";
|
||||
import { FindOptionsWhere } from "typeorm/find-options/FindOptionsWhere";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes";
|
||||
import { Case } from "../../../../data/entities/Case";
|
||||
import { sendContextResponse } from "../../../../pluginUtils";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes.js";
|
||||
import { Case } from "../../../../data/entities/Case.js";
|
||||
import { sendContextResponse } from "../../../../pluginUtils.js";
|
||||
import {
|
||||
UnknownUser,
|
||||
chunkArray,
|
||||
|
@ -13,12 +13,12 @@ import {
|
|||
resolveMember,
|
||||
resolveUser,
|
||||
trimLines,
|
||||
} from "../../../../utils";
|
||||
import { asyncMap } from "../../../../utils/async";
|
||||
import { createPaginatedMessage } from "../../../../utils/createPaginatedMessage";
|
||||
import { getGuildPrefix } from "../../../../utils/getGuildPrefix";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
} from "../../../../utils.js";
|
||||
import { asyncMap } from "../../../../utils/async.js";
|
||||
import { createPaginatedMessage } from "../../../../utils/createPaginatedMessage.js";
|
||||
import { getGuildPrefix } from "../../../../utils/getGuildPrefix.js";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin.js";
|
||||
import { ModActionsPluginType } from "../../types.js";
|
||||
|
||||
const casesPerPage = 5;
|
||||
const maxExpandedCases = 8;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { trimLines } from "../../../../utils";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualDeleteCaseCmd } from "./actualDeleteCaseCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { trimLines } from "../../../../utils.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualDeleteCaseCmd } from "./actualDeleteCaseCmd.js";
|
||||
|
||||
export const DeleteCaseMsgCmd = modActionsMsgCmd({
|
||||
trigger: ["delete_case", "deletecase"],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { actualDeleteCaseCmd } from "./actualDeleteCaseCmd";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { actualDeleteCaseCmd } from "./actualDeleteCaseCmd.js";
|
||||
|
||||
const opts = [slashOptions.boolean({ name: "force", description: "Whether or not to force delete", required: false })];
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { ChatInputCommandInteraction, GuildMember, Message } from "discord.js";
|
||||
import { GuildPluginData, helpers } from "knub";
|
||||
import { Case } from "../../../../data/entities/Case";
|
||||
import { getContextChannel, sendContextResponse } from "../../../../pluginUtils";
|
||||
import { SECONDS, renderUsername } from "../../../../utils";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin";
|
||||
import { TimeAndDatePlugin } from "../../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
import { Case } from "../../../../data/entities/Case.js";
|
||||
import { getContextChannel, sendContextResponse } from "../../../../pluginUtils.js";
|
||||
import { SECONDS, renderUsername } from "../../../../utils.js";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin.js";
|
||||
import { TimeAndDatePlugin } from "../../../TimeAndDate/TimeAndDatePlugin.js";
|
||||
import { ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualDeleteCaseCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils";
|
||||
import { resolveMember, resolveUser } from "../../../../utils";
|
||||
import { isBanned } from "../../functions/isBanned";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualForceBanCmd } from "./actualForceBanCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils.js";
|
||||
import { resolveMember, resolveUser } from "../../../../utils.js";
|
||||
import { isBanned } from "../../functions/isBanned.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualForceBanCmd } from "./actualForceBanCmd.js";
|
||||
|
||||
const opts = {
|
||||
mod: ct.member({ option: true }),
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { convertDelayStringToMS, resolveMember } from "../../../../utils";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualForceBanCmd } from "./actualForceBanCmd";
|
||||
import { hasPermission } from "../../../../pluginUtils.js";
|
||||
import { convertDelayStringToMS, resolveMember } from "../../../../utils.js";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualForceBanCmd } from "./actualForceBanCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "reason", description: "The reason", required: false }),
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import { Attachment, ChatInputCommandInteraction, GuildMember, Message, Snowflake, User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes";
|
||||
import { LogType } from "../../../../data/LogType";
|
||||
import { DAYS, MINUTES, UnknownUser } from "../../../../utils";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes.js";
|
||||
import { LogType } from "../../../../data/LogType.js";
|
||||
import { DAYS, MINUTES, UnknownUser } from "../../../../utils.js";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction.js";
|
||||
import {
|
||||
formatReasonWithAttachments,
|
||||
formatReasonWithMessageLinkForAttachments,
|
||||
} from "../../functions/formatReasonForAttachments";
|
||||
import { ignoreEvent } from "../../functions/ignoreEvent";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../../types";
|
||||
} from "../../functions/formatReasonForAttachments.js";
|
||||
import { ignoreEvent } from "../../functions/ignoreEvent.js";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualForceBanCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils";
|
||||
import { resolveMember, resolveUser } from "../../../../utils";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualMuteCmd } from "../mute/actualMuteCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils.js";
|
||||
import { resolveMember, resolveUser } from "../../../../utils.js";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualMuteCmd } from "../mute/actualMuteCmd.js";
|
||||
|
||||
const opts = {
|
||||
mod: ct.member({ option: true }),
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { ChannelType, GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { UserNotificationMethod, convertDelayStringToMS, resolveMember } from "../../../../utils";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualMuteCmd } from "../mute/actualMuteCmd";
|
||||
import { hasPermission } from "../../../../pluginUtils.js";
|
||||
import { UserNotificationMethod, convertDelayStringToMS, resolveMember } from "../../../../utils.js";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualMuteCmd } from "../mute/actualMuteCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "time", description: "The duration of the mute", required: false }),
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils";
|
||||
import { resolveMember, resolveUser } from "../../../../utils";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualUnmuteCmd } from "../unmute/actualUnmuteCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils.js";
|
||||
import { resolveMember, resolveUser } from "../../../../utils.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualUnmuteCmd } from "../unmute/actualUnmuteCmd.js";
|
||||
|
||||
const opts = {
|
||||
mod: ct.member({ option: true }),
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { convertDelayStringToMS, resolveMember } from "../../../../utils";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualUnmuteCmd } from "../unmute/actualUnmuteCmd";
|
||||
import { hasPermission } from "../../../../pluginUtils.js";
|
||||
import { convertDelayStringToMS, resolveMember } from "../../../../utils.js";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualUnmuteCmd } from "../unmute/actualUnmuteCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "time", description: "The duration of the unmute", required: false }),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualHideCaseCmd } from "./actualHideCaseCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualHideCaseCmd } from "./actualHideCaseCmd.js";
|
||||
|
||||
export const HideCaseMsgCmd = modActionsMsgCmd({
|
||||
trigger: ["hide", "hidecase", "hide_case"],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { slashOptions } from "knub";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { actualHideCaseCmd } from "./actualHideCaseCmd";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { actualHideCaseCmd } from "./actualHideCaseCmd.js";
|
||||
|
||||
export const HideCaseSlashCmd = modActionsSlashCmd({
|
||||
name: "hidecase",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ChatInputCommandInteraction, Message } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
import { ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualHideCaseCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { hasPermission } from "knub/helpers";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { resolveUser } from "../../../../utils";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualKickCmd } from "./actualKickCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { resolveUser } from "../../../../utils.js";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualKickCmd } from "./actualKickCmd.js";
|
||||
|
||||
const opts = {
|
||||
mod: ct.member({ option: true }),
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { ChannelType, GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { UserNotificationMethod, resolveMember } from "../../../../utils";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualKickCmd } from "./actualKickCmd";
|
||||
import { hasPermission } from "../../../../pluginUtils.js";
|
||||
import { UserNotificationMethod, resolveMember } from "../../../../utils.js";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualKickCmd } from "./actualKickCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "reason", description: "The reason", required: false }),
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import { Attachment, ChatInputCommandInteraction, GuildMember, Message, User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { LogType } from "../../../../data/LogType";
|
||||
import { canActOn } from "../../../../pluginUtils";
|
||||
import { DAYS, SECONDS, UnknownUser, UserNotificationMethod, renderUsername, resolveMember } from "../../../../utils";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
import { LogType } from "../../../../data/LogType.js";
|
||||
import { canActOn } from "../../../../pluginUtils.js";
|
||||
import { DAYS, SECONDS, UnknownUser, UserNotificationMethod, renderUsername, resolveMember } from "../../../../utils.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction.js";
|
||||
import {
|
||||
formatReasonWithAttachments,
|
||||
formatReasonWithMessageLinkForAttachments,
|
||||
} from "../../functions/formatReasonForAttachments";
|
||||
import { ignoreEvent } from "../../functions/ignoreEvent";
|
||||
import { isBanned } from "../../functions/isBanned";
|
||||
import { kickMember } from "../../functions/kickMember";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../../types";
|
||||
} from "../../functions/formatReasonForAttachments.js";
|
||||
import { ignoreEvent } from "../../functions/ignoreEvent.js";
|
||||
import { isBanned } from "../../functions/isBanned.js";
|
||||
import { kickMember } from "../../functions/kickMember.js";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualKickCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { waitForReply } from "knub/helpers";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { getContextChannel, sendContextResponse } from "../../../../pluginUtils";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualMassBanCmd } from "./actualMassBanCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { getContextChannel, sendContextResponse } from "../../../../pluginUtils.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualMassBanCmd } from "./actualMassBanCmd.js";
|
||||
|
||||
export const MassBanMsgCmd = modActionsMsgCmd({
|
||||
trigger: "massban",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualMassBanCmd } from "./actualMassBanCmd";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualMassBanCmd } from "./actualMassBanCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "reason", description: "The reason", required: false }),
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import { Attachment, ChatInputCommandInteraction, GuildMember, Message, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes";
|
||||
import { LogType } from "../../../../data/LogType";
|
||||
import { humanizeDurationShort } from "../../../../humanizeDurationShort";
|
||||
import { canActOn, getContextChannel, isContextInteraction, sendContextResponse } from "../../../../pluginUtils";
|
||||
import { DAYS, MINUTES, SECONDS, noop } from "../../../../utils";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes.js";
|
||||
import { LogType } from "../../../../data/LogType.js";
|
||||
import { humanizeDurationShort } from "../../../../humanizeDurationShort.js";
|
||||
import { canActOn, getContextChannel, isContextInteraction, sendContextResponse } from "../../../../pluginUtils.js";
|
||||
import { DAYS, MINUTES, SECONDS, noop } from "../../../../utils.js";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction.js";
|
||||
import {
|
||||
formatReasonWithAttachments,
|
||||
formatReasonWithMessageLinkForAttachments,
|
||||
} from "../../functions/formatReasonForAttachments";
|
||||
import { ignoreEvent } from "../../functions/ignoreEvent";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../../types";
|
||||
} from "../../functions/formatReasonForAttachments.js";
|
||||
import { ignoreEvent } from "../../functions/ignoreEvent.js";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualMassBanCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { waitForReply } from "knub/helpers";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { getContextChannel, sendContextResponse } from "../../../../pluginUtils";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualMassMuteCmd } from "./actualMassMuteCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { getContextChannel, sendContextResponse } from "../../../../pluginUtils.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualMassMuteCmd } from "./actualMassMuteCmd.js";
|
||||
|
||||
export const MassMuteMsgCmd = modActionsMsgCmd({
|
||||
trigger: "massmute",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualMassMuteCmd } from "./actualMassMuteCmd";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualMassMuteCmd } from "./actualMassMuteCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "reason", description: "The reason", required: false }),
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
import { Attachment, ChatInputCommandInteraction, GuildMember, Message, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { LogType } from "../../../../data/LogType";
|
||||
import { logger } from "../../../../logger";
|
||||
import { canActOn, isContextInteraction, sendContextResponse } from "../../../../pluginUtils";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin";
|
||||
import { MutesPlugin } from "../../../Mutes/MutesPlugin";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
import { LogType } from "../../../../data/LogType.js";
|
||||
import { logger } from "../../../../logger.js";
|
||||
import { canActOn, isContextInteraction, sendContextResponse } from "../../../../pluginUtils.js";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin.js";
|
||||
import { MutesPlugin } from "../../../Mutes/MutesPlugin.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction.js";
|
||||
import {
|
||||
formatReasonWithAttachments,
|
||||
formatReasonWithMessageLinkForAttachments,
|
||||
} from "../../functions/formatReasonForAttachments";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
} from "../../functions/formatReasonForAttachments.js";
|
||||
import { ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualMassMuteCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { waitForReply } from "knub/helpers";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { getContextChannel, sendContextResponse } from "../../../../pluginUtils";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualMassUnbanCmd } from "./actualMassUnbanCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { getContextChannel, sendContextResponse } from "../../../../pluginUtils.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualMassUnbanCmd } from "./actualMassUnbanCmd.js";
|
||||
|
||||
export const MassUnbanMsgCmd = modActionsMsgCmd({
|
||||
trigger: "massunban",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualMassUnbanCmd } from "./actualMassUnbanCmd";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualMassUnbanCmd } from "./actualMassUnbanCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "reason", description: "The reason", required: false }),
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
import { Attachment, ChatInputCommandInteraction, GuildMember, Message, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes";
|
||||
import { LogType } from "../../../../data/LogType";
|
||||
import { isContextInteraction, sendContextResponse } from "../../../../pluginUtils";
|
||||
import { MINUTES, noop } from "../../../../utils";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "../../functions/formatReasonForAttachments";
|
||||
import { ignoreEvent } from "../../functions/ignoreEvent";
|
||||
import { isBanned } from "../../functions/isBanned";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../../types";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes.js";
|
||||
import { LogType } from "../../../../data/LogType.js";
|
||||
import { isContextInteraction, sendContextResponse } from "../../../../pluginUtils.js";
|
||||
import { MINUTES, noop } from "../../../../utils.js";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction.js";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "../../functions/formatReasonForAttachments.js";
|
||||
import { ignoreEvent } from "../../functions/ignoreEvent.js";
|
||||
import { isBanned } from "../../functions/isBanned.js";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualMassUnbanCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils";
|
||||
import { resolveMember, resolveUser } from "../../../../utils";
|
||||
import { waitForButtonConfirm } from "../../../../utils/waitForInteraction";
|
||||
import { isBanned } from "../../functions/isBanned";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualMuteCmd } from "./actualMuteCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils.js";
|
||||
import { resolveMember, resolveUser } from "../../../../utils.js";
|
||||
import { waitForButtonConfirm } from "../../../../utils/waitForInteraction.js";
|
||||
import { isBanned } from "../../functions/isBanned.js";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualMuteCmd } from "./actualMuteCmd.js";
|
||||
|
||||
const opts = {
|
||||
mod: ct.member({ option: true }),
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { ChannelType, GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils";
|
||||
import { UserNotificationMethod, convertDelayStringToMS, resolveMember } from "../../../../utils";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { waitForButtonConfirm } from "../../../../utils/waitForInteraction";
|
||||
import { isBanned } from "../../functions/isBanned";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualMuteCmd } from "./actualMuteCmd";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils.js";
|
||||
import { UserNotificationMethod, convertDelayStringToMS, resolveMember } from "../../../../utils.js";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { waitForButtonConfirm } from "../../../../utils/waitForInteraction.js";
|
||||
import { isBanned } from "../../functions/isBanned.js";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualMuteCmd } from "./actualMuteCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "time", description: "The duration of the mute", required: false }),
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
import { Attachment, ChatInputCommandInteraction, GuildMember, Message, User } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../../RecoverablePluginError";
|
||||
import { logger } from "../../../../logger";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../../RecoverablePluginError.js";
|
||||
import { logger } from "../../../../logger.js";
|
||||
import {
|
||||
UnknownUser,
|
||||
UserNotificationMethod,
|
||||
asSingleLine,
|
||||
isDiscordAPIError,
|
||||
renderUsername,
|
||||
} from "../../../../utils";
|
||||
import { MutesPlugin } from "../../../Mutes/MutesPlugin";
|
||||
import { MuteResult } from "../../../Mutes/types";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
} from "../../../../utils.js";
|
||||
import { MutesPlugin } from "../../../Mutes/MutesPlugin.js";
|
||||
import { MuteResult } from "../../../Mutes/types.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction.js";
|
||||
import {
|
||||
formatReasonWithAttachments,
|
||||
formatReasonWithMessageLinkForAttachments,
|
||||
} from "../../functions/formatReasonForAttachments";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
} from "../../functions/formatReasonForAttachments.js";
|
||||
import { ModActionsPluginType } from "../../types.js";
|
||||
|
||||
/**
|
||||
* The actual function run by both !mute and !forcemute.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { resolveUser } from "../../../../utils";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualNoteCmd } from "./actualNoteCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { resolveUser } from "../../../../utils.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualNoteCmd } from "./actualNoteCmd.js";
|
||||
|
||||
export const NoteMsgCmd = modActionsMsgCmd({
|
||||
trigger: "note",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { slashOptions } from "knub";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualNoteCmd } from "./actualNoteCmd";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualNoteCmd } from "./actualNoteCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "note", description: "The note to add to the user", required: false }),
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { Attachment, ChatInputCommandInteraction, Message, User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes";
|
||||
import { UnknownUser, renderUsername } from "../../../../utils";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "../../functions/formatReasonForAttachments";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes.js";
|
||||
import { UnknownUser, renderUsername } from "../../../../utils.js";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction.js";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "../../functions/formatReasonForAttachments.js";
|
||||
import { ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualNoteCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { resolveUser } from "../../../../utils";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualUnbanCmd } from "./actualUnbanCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { hasPermission } from "../../../../pluginUtils.js";
|
||||
import { resolveUser } from "../../../../utils.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualUnbanCmd } from "./actualUnbanCmd.js";
|
||||
|
||||
const opts = {
|
||||
mod: ct.member({ option: true }),
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { hasPermission } from "../../../../pluginUtils";
|
||||
import { resolveMember } from "../../../../utils";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualUnbanCmd } from "./actualUnbanCmd";
|
||||
import { hasPermission } from "../../../../pluginUtils.js";
|
||||
import { resolveMember } from "../../../../utils.js";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualUnbanCmd } from "./actualUnbanCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "reason", description: "The reason", required: false }),
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { Attachment, ChatInputCommandInteraction, GuildMember, Message, Snowflake, User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes";
|
||||
import { LogType } from "../../../../data/LogType";
|
||||
import { clearExpiringTempban } from "../../../../data/loops/expiringTempbansLoop";
|
||||
import { UnknownUser } from "../../../../utils";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "../../functions/formatReasonForAttachments";
|
||||
import { ignoreEvent } from "../../functions/ignoreEvent";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../../types";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes.js";
|
||||
import { LogType } from "../../../../data/LogType.js";
|
||||
import { clearExpiringTempban } from "../../../../data/loops/expiringTempbansLoop.js";
|
||||
import { UnknownUser } from "../../../../utils.js";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../../Logs/LogsPlugin.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction.js";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "../../functions/formatReasonForAttachments.js";
|
||||
import { ignoreEvent } from "../../functions/ignoreEvent.js";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualUnbanCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualHideCaseCmd } from "../hidecase/actualHideCaseCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualHideCaseCmd } from "../hidecase/actualHideCaseCmd.js";
|
||||
|
||||
export const UnhideCaseMsgCmd = modActionsMsgCmd({
|
||||
trigger: ["unhide", "unhidecase", "unhide_case"],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { slashOptions } from "knub";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { actualUnhideCaseCmd } from "./actualUnhideCaseCmd";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { actualUnhideCaseCmd } from "./actualUnhideCaseCmd.js";
|
||||
|
||||
export const UnhideCaseSlashCmd = modActionsSlashCmd({
|
||||
name: "unhidecase",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ChatInputCommandInteraction, Message } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
import { ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualUnhideCaseCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils";
|
||||
import { resolveMember, resolveUser } from "../../../../utils";
|
||||
import { waitForButtonConfirm } from "../../../../utils/waitForInteraction";
|
||||
import { MutesPlugin } from "../../../Mutes/MutesPlugin";
|
||||
import { isBanned } from "../../functions/isBanned";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualUnmuteCmd } from "./actualUnmuteCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils.js";
|
||||
import { resolveMember, resolveUser } from "../../../../utils.js";
|
||||
import { waitForButtonConfirm } from "../../../../utils/waitForInteraction.js";
|
||||
import { MutesPlugin } from "../../../Mutes/MutesPlugin.js";
|
||||
import { isBanned } from "../../functions/isBanned.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualUnmuteCmd } from "./actualUnmuteCmd.js";
|
||||
|
||||
const opts = {
|
||||
mod: ct.member({ option: true }),
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils";
|
||||
import { convertDelayStringToMS, resolveMember } from "../../../../utils";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { waitForButtonConfirm } from "../../../../utils/waitForInteraction";
|
||||
import { MutesPlugin } from "../../../Mutes/MutesPlugin";
|
||||
import { isBanned } from "../../functions/isBanned";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualUnmuteCmd } from "./actualUnmuteCmd";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils.js";
|
||||
import { convertDelayStringToMS, resolveMember } from "../../../../utils.js";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { waitForButtonConfirm } from "../../../../utils/waitForInteraction.js";
|
||||
import { MutesPlugin } from "../../../Mutes/MutesPlugin.js";
|
||||
import { isBanned } from "../../functions/isBanned.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualUnmuteCmd } from "./actualUnmuteCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "time", description: "The duration of the unmute", required: false }),
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { Attachment, ChatInputCommandInteraction, GuildMember, Message, User } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { UnknownUser, asSingleLine, renderUsername } from "../../../../utils";
|
||||
import { MutesPlugin } from "../../../Mutes/MutesPlugin";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "../../functions/formatReasonForAttachments";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
import { UnknownUser, asSingleLine, renderUsername } from "../../../../utils.js";
|
||||
import { MutesPlugin } from "../../../Mutes/MutesPlugin.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction.js";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "../../functions/formatReasonForAttachments.js";
|
||||
import { ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualUnmuteCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { updateCase } from "../../functions/updateCase";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { updateCase } from "../../functions/updateCase.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
|
||||
export const UpdateMsgCmd = modActionsMsgCmd({
|
||||
trigger: ["update", "reason"],
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { slashOptions } from "knub";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { updateCase } from "../../functions/updateCase";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_UPDATE } from "../constants";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { updateCase } from "../../functions/updateCase.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_UPDATE } from "../constants.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "case-number", description: "The number of the case to update", required: false }),
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { commandTypeHelpers as ct } from "../../../../commandTypes";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils";
|
||||
import { errorMessage, resolveMember, resolveUser } from "../../../../utils";
|
||||
import { isBanned } from "../../functions/isBanned";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs";
|
||||
import { modActionsMsgCmd } from "../../types";
|
||||
import { actualWarnCmd } from "./actualWarnCmd";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils.js";
|
||||
import { errorMessage, resolveMember, resolveUser } from "../../../../utils.js";
|
||||
import { isBanned } from "../../functions/isBanned.js";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualWarnCmd } from "./actualWarnCmd.js";
|
||||
|
||||
export const WarnMsgCmd = modActionsMsgCmd({
|
||||
trigger: "warn",
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { ChannelType, GuildMember } from "discord.js";
|
||||
import { slashOptions } from "knub";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils";
|
||||
import { UserNotificationMethod, resolveMember } from "../../../../utils";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions";
|
||||
import { isBanned } from "../../functions/isBanned";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs";
|
||||
import { modActionsSlashCmd } from "../../types";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants";
|
||||
import { actualWarnCmd } from "./actualWarnCmd";
|
||||
import { canActOn, hasPermission } from "../../../../pluginUtils.js";
|
||||
import { UserNotificationMethod, resolveMember } from "../../../../utils.js";
|
||||
import { generateAttachmentSlashOptions, retrieveMultipleOptions } from "../../../../utils/multipleSlashOptions.js";
|
||||
import { isBanned } from "../../functions/isBanned.js";
|
||||
import { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs.js";
|
||||
import { modActionsSlashCmd } from "../../types.js";
|
||||
import { NUMBER_ATTACHMENTS_CASE_CREATION } from "../constants.js";
|
||||
import { actualWarnCmd } from "./actualWarnCmd.js";
|
||||
|
||||
const opts = [
|
||||
slashOptions.string({ name: "reason", description: "The reason", required: false }),
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
import { Attachment, ChatInputCommandInteraction, GuildMember, Message } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes";
|
||||
import { UserNotificationMethod, renderUsername } from "../../../../utils";
|
||||
import { waitForButtonConfirm } from "../../../../utils/waitForInteraction";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction";
|
||||
import { CaseTypes } from "../../../../data/CaseTypes.js";
|
||||
import { UserNotificationMethod, renderUsername } from "../../../../utils.js";
|
||||
import { waitForButtonConfirm } from "../../../../utils/waitForInteraction.js";
|
||||
import { CasesPlugin } from "../../../Cases/CasesPlugin.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "../../functions/attachmentLinkReaction.js";
|
||||
import {
|
||||
formatReasonWithAttachments,
|
||||
formatReasonWithMessageLinkForAttachments,
|
||||
} from "../../functions/formatReasonForAttachments";
|
||||
import { warnMember } from "../../functions/warnMember";
|
||||
import { ModActionsPluginType } from "../../types";
|
||||
} from "../../functions/formatReasonForAttachments.js";
|
||||
import { warnMember } from "../../functions/warnMember.js";
|
||||
import { ModActionsPluginType } from "../../types.js";
|
||||
|
||||
export async function actualWarnCmd(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue