mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-08 00:05:01 +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,78 +1,78 @@
|
|||
import { Message } from "discord.js";
|
||||
import { EventEmitter } from "events";
|
||||
import { guildPlugin } from "knub";
|
||||
import { Queue } from "../../Queue";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
import { onGuildEvent } from "../../data/GuildEvents";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildMutes } from "../../data/GuildMutes";
|
||||
import { GuildTempbans } from "../../data/GuildTempbans";
|
||||
import { makePublicFn, mapToPublicFn } from "../../pluginUtils";
|
||||
import { MINUTES } from "../../utils";
|
||||
import { CasesPlugin } from "../Cases/CasesPlugin";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { MutesPlugin } from "../Mutes/MutesPlugin";
|
||||
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
|
||||
import { AddCaseMsgCmd } from "./commands/addcase/AddCaseMsgCmd";
|
||||
import { AddCaseSlashCmd } from "./commands/addcase/AddCaseSlashCmd";
|
||||
import { BanMsgCmd } from "./commands/ban/BanMsgCmd";
|
||||
import { BanSlashCmd } from "./commands/ban/BanSlashCmd";
|
||||
import { CaseMsgCmd } from "./commands/case/CaseMsgCmd";
|
||||
import { CaseSlashCmd } from "./commands/case/CaseSlashCmd";
|
||||
import { CasesModMsgCmd } from "./commands/cases/CasesModMsgCmd";
|
||||
import { CasesSlashCmd } from "./commands/cases/CasesSlashCmd";
|
||||
import { CasesUserMsgCmd } from "./commands/cases/CasesUserMsgCmd";
|
||||
import { DeleteCaseMsgCmd } from "./commands/deletecase/DeleteCaseMsgCmd";
|
||||
import { DeleteCaseSlashCmd } from "./commands/deletecase/DeleteCaseSlashCmd";
|
||||
import { ForceBanMsgCmd } from "./commands/forceban/ForceBanMsgCmd";
|
||||
import { ForceBanSlashCmd } from "./commands/forceban/ForceBanSlashCmd";
|
||||
import { ForceMuteMsgCmd } from "./commands/forcemute/ForceMuteMsgCmd";
|
||||
import { ForceMuteSlashCmd } from "./commands/forcemute/ForceMuteSlashCmd";
|
||||
import { ForceUnmuteMsgCmd } from "./commands/forceunmute/ForceUnmuteMsgCmd";
|
||||
import { ForceUnmuteSlashCmd } from "./commands/forceunmute/ForceUnmuteSlashCmd";
|
||||
import { HideCaseMsgCmd } from "./commands/hidecase/HideCaseMsgCmd";
|
||||
import { HideCaseSlashCmd } from "./commands/hidecase/HideCaseSlashCmd";
|
||||
import { KickMsgCmd } from "./commands/kick/KickMsgCmd";
|
||||
import { KickSlashCmd } from "./commands/kick/KickSlashCmd";
|
||||
import { MassBanMsgCmd } from "./commands/massban/MassBanMsgCmd";
|
||||
import { MassBanSlashCmd } from "./commands/massban/MassBanSlashCmd";
|
||||
import { MassMuteMsgCmd } from "./commands/massmute/MassMuteMsgCmd";
|
||||
import { MassMuteSlashSlashCmd } from "./commands/massmute/MassMuteSlashCmd";
|
||||
import { MassUnbanMsgCmd } from "./commands/massunban/MassUnbanMsgCmd";
|
||||
import { MassUnbanSlashCmd } from "./commands/massunban/MassUnbanSlashCmd";
|
||||
import { MuteMsgCmd } from "./commands/mute/MuteMsgCmd";
|
||||
import { MuteSlashCmd } from "./commands/mute/MuteSlashCmd";
|
||||
import { NoteMsgCmd } from "./commands/note/NoteMsgCmd";
|
||||
import { NoteSlashCmd } from "./commands/note/NoteSlashCmd";
|
||||
import { UnbanMsgCmd } from "./commands/unban/UnbanMsgCmd";
|
||||
import { UnbanSlashCmd } from "./commands/unban/UnbanSlashCmd";
|
||||
import { UnhideCaseMsgCmd } from "./commands/unhidecase/UnhideCaseMsgCmd";
|
||||
import { UnhideCaseSlashCmd } from "./commands/unhidecase/UnhideCaseSlashCmd";
|
||||
import { UnmuteMsgCmd } from "./commands/unmute/UnmuteMsgCmd";
|
||||
import { UnmuteSlashCmd } from "./commands/unmute/UnmuteSlashCmd";
|
||||
import { UpdateMsgCmd } from "./commands/update/UpdateMsgCmd";
|
||||
import { UpdateSlashCmd } from "./commands/update/UpdateSlashCmd";
|
||||
import { WarnMsgCmd } from "./commands/warn/WarnMsgCmd";
|
||||
import { WarnSlashCmd } from "./commands/warn/WarnSlashCmd";
|
||||
import { AuditLogEvents } from "./events/AuditLogEvents";
|
||||
import { CreateBanCaseOnManualBanEvt } from "./events/CreateBanCaseOnManualBanEvt";
|
||||
import { CreateUnbanCaseOnManualUnbanEvt } from "./events/CreateUnbanCaseOnManualUnbanEvt";
|
||||
import { PostAlertOnMemberJoinEvt } from "./events/PostAlertOnMemberJoinEvt";
|
||||
import { banUserId } from "./functions/banUserId";
|
||||
import { clearTempban } from "./functions/clearTempban";
|
||||
import { Queue } from "../../Queue.js";
|
||||
import { GuildCases } from "../../data/GuildCases.js";
|
||||
import { onGuildEvent } from "../../data/GuildEvents.js";
|
||||
import { GuildLogs } from "../../data/GuildLogs.js";
|
||||
import { GuildMutes } from "../../data/GuildMutes.js";
|
||||
import { GuildTempbans } from "../../data/GuildTempbans.js";
|
||||
import { makePublicFn, mapToPublicFn } from "../../pluginUtils.js";
|
||||
import { MINUTES } from "../../utils.js";
|
||||
import { CasesPlugin } from "../Cases/CasesPlugin.js";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin.js";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin.js";
|
||||
import { MutesPlugin } from "../Mutes/MutesPlugin.js";
|
||||
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin.js";
|
||||
import { AddCaseMsgCmd } from "./commands/addcase/AddCaseMsgCmd.js";
|
||||
import { AddCaseSlashCmd } from "./commands/addcase/AddCaseSlashCmd.js";
|
||||
import { BanMsgCmd } from "./commands/ban/BanMsgCmd.js";
|
||||
import { BanSlashCmd } from "./commands/ban/BanSlashCmd.js";
|
||||
import { CaseMsgCmd } from "./commands/case/CaseMsgCmd.js";
|
||||
import { CaseSlashCmd } from "./commands/case/CaseSlashCmd.js";
|
||||
import { CasesModMsgCmd } from "./commands/cases/CasesModMsgCmd.js";
|
||||
import { CasesSlashCmd } from "./commands/cases/CasesSlashCmd.js";
|
||||
import { CasesUserMsgCmd } from "./commands/cases/CasesUserMsgCmd.js";
|
||||
import { DeleteCaseMsgCmd } from "./commands/deletecase/DeleteCaseMsgCmd.js";
|
||||
import { DeleteCaseSlashCmd } from "./commands/deletecase/DeleteCaseSlashCmd.js";
|
||||
import { ForceBanMsgCmd } from "./commands/forceban/ForceBanMsgCmd.js";
|
||||
import { ForceBanSlashCmd } from "./commands/forceban/ForceBanSlashCmd.js";
|
||||
import { ForceMuteMsgCmd } from "./commands/forcemute/ForceMuteMsgCmd.js";
|
||||
import { ForceMuteSlashCmd } from "./commands/forcemute/ForceMuteSlashCmd.js";
|
||||
import { ForceUnmuteMsgCmd } from "./commands/forceunmute/ForceUnmuteMsgCmd.js";
|
||||
import { ForceUnmuteSlashCmd } from "./commands/forceunmute/ForceUnmuteSlashCmd.js";
|
||||
import { HideCaseMsgCmd } from "./commands/hidecase/HideCaseMsgCmd.js";
|
||||
import { HideCaseSlashCmd } from "./commands/hidecase/HideCaseSlashCmd.js";
|
||||
import { KickMsgCmd } from "./commands/kick/KickMsgCmd.js";
|
||||
import { KickSlashCmd } from "./commands/kick/KickSlashCmd.js";
|
||||
import { MassBanMsgCmd } from "./commands/massban/MassBanMsgCmd.js";
|
||||
import { MassBanSlashCmd } from "./commands/massban/MassBanSlashCmd.js";
|
||||
import { MassMuteMsgCmd } from "./commands/massmute/MassMuteMsgCmd.js";
|
||||
import { MassMuteSlashSlashCmd } from "./commands/massmute/MassMuteSlashCmd.js";
|
||||
import { MassUnbanMsgCmd } from "./commands/massunban/MassUnbanMsgCmd.js";
|
||||
import { MassUnbanSlashCmd } from "./commands/massunban/MassUnbanSlashCmd.js";
|
||||
import { MuteMsgCmd } from "./commands/mute/MuteMsgCmd.js";
|
||||
import { MuteSlashCmd } from "./commands/mute/MuteSlashCmd.js";
|
||||
import { NoteMsgCmd } from "./commands/note/NoteMsgCmd.js";
|
||||
import { NoteSlashCmd } from "./commands/note/NoteSlashCmd.js";
|
||||
import { UnbanMsgCmd } from "./commands/unban/UnbanMsgCmd.js";
|
||||
import { UnbanSlashCmd } from "./commands/unban/UnbanSlashCmd.js";
|
||||
import { UnhideCaseMsgCmd } from "./commands/unhidecase/UnhideCaseMsgCmd.js";
|
||||
import { UnhideCaseSlashCmd } from "./commands/unhidecase/UnhideCaseSlashCmd.js";
|
||||
import { UnmuteMsgCmd } from "./commands/unmute/UnmuteMsgCmd.js";
|
||||
import { UnmuteSlashCmd } from "./commands/unmute/UnmuteSlashCmd.js";
|
||||
import { UpdateMsgCmd } from "./commands/update/UpdateMsgCmd.js";
|
||||
import { UpdateSlashCmd } from "./commands/update/UpdateSlashCmd.js";
|
||||
import { WarnMsgCmd } from "./commands/warn/WarnMsgCmd.js";
|
||||
import { WarnSlashCmd } from "./commands/warn/WarnSlashCmd.js";
|
||||
import { AuditLogEvents } from "./events/AuditLogEvents.js";
|
||||
import { CreateBanCaseOnManualBanEvt } from "./events/CreateBanCaseOnManualBanEvt.js";
|
||||
import { CreateUnbanCaseOnManualUnbanEvt } from "./events/CreateUnbanCaseOnManualUnbanEvt.js";
|
||||
import { PostAlertOnMemberJoinEvt } from "./events/PostAlertOnMemberJoinEvt.js";
|
||||
import { banUserId } from "./functions/banUserId.js";
|
||||
import { clearTempban } from "./functions/clearTempban.js";
|
||||
import {
|
||||
hasBanPermission,
|
||||
hasMutePermission,
|
||||
hasNotePermission,
|
||||
hasWarnPermission,
|
||||
} from "./functions/hasModActionPerm";
|
||||
import { kickMember } from "./functions/kickMember";
|
||||
import { offModActionsEvent } from "./functions/offModActionsEvent";
|
||||
import { onModActionsEvent } from "./functions/onModActionsEvent";
|
||||
import { updateCase } from "./functions/updateCase";
|
||||
import { warnMember } from "./functions/warnMember";
|
||||
import { AttachmentLinkReactionType, ModActionsPluginType, modActionsSlashGroup, zModActionsConfig } from "./types";
|
||||
} from "./functions/hasModActionPerm.js";
|
||||
import { kickMember } from "./functions/kickMember.js";
|
||||
import { offModActionsEvent } from "./functions/offModActionsEvent.js";
|
||||
import { onModActionsEvent } from "./functions/onModActionsEvent.js";
|
||||
import { updateCase } from "./functions/updateCase.js";
|
||||
import { warnMember } from "./functions/warnMember.js";
|
||||
import { AttachmentLinkReactionType, ModActionsPluginType, modActionsSlashGroup, zModActionsConfig } from "./types.js";
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { AuditLogChange, AuditLogEvent } from "discord.js";
|
||||
import moment from "moment-timezone";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { resolveUser } from "../../../utils";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { modActionsEvt } from "../types";
|
||||
import { CaseTypes } from "../../../data/CaseTypes.js";
|
||||
import { resolveUser } from "../../../utils.js";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin.js";
|
||||
import { modActionsEvt } from "../types.js";
|
||||
|
||||
export const AuditLogEvents = modActionsEvt({
|
||||
event: "guildAuditLogEntryCreate",
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { AuditLogEvent, User } from "discord.js";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { Case } from "../../../data/entities/Case";
|
||||
import { UnknownUser, resolveUser } from "../../../utils";
|
||||
import { findMatchingAuditLogEntry } from "../../../utils/findMatchingAuditLogEntry";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { clearIgnoredEvents } from "../functions/clearIgnoredEvents";
|
||||
import { isEventIgnored } from "../functions/isEventIgnored";
|
||||
import { IgnoredEventType, modActionsEvt } from "../types";
|
||||
import { CaseTypes } from "../../../data/CaseTypes.js";
|
||||
import { Case } from "../../../data/entities/Case.js";
|
||||
import { UnknownUser, resolveUser } from "../../../utils.js";
|
||||
import { findMatchingAuditLogEntry } from "../../../utils/findMatchingAuditLogEntry.js";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects.js";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { clearIgnoredEvents } from "../functions/clearIgnoredEvents.js";
|
||||
import { isEventIgnored } from "../functions/isEventIgnored.js";
|
||||
import { IgnoredEventType, modActionsEvt } from "../types.js";
|
||||
|
||||
/**
|
||||
* Create a BAN case automatically when a user is banned manually.
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { AuditLogEvent, User } from "discord.js";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { Case } from "../../../data/entities/Case";
|
||||
import { logger } from "../../../logger";
|
||||
import { UnknownUser, resolveUser } from "../../../utils";
|
||||
import { findMatchingAuditLogEntry } from "../../../utils/findMatchingAuditLogEntry";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { clearIgnoredEvents } from "../functions/clearIgnoredEvents";
|
||||
import { isEventIgnored } from "../functions/isEventIgnored";
|
||||
import { IgnoredEventType, modActionsEvt } from "../types";
|
||||
import { CaseTypes } from "../../../data/CaseTypes.js";
|
||||
import { Case } from "../../../data/entities/Case.js";
|
||||
import { logger } from "../../../logger.js";
|
||||
import { UnknownUser, resolveUser } from "../../../utils.js";
|
||||
import { findMatchingAuditLogEntry } from "../../../utils/findMatchingAuditLogEntry.js";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { clearIgnoredEvents } from "../functions/clearIgnoredEvents.js";
|
||||
import { isEventIgnored } from "../functions/isEventIgnored.js";
|
||||
import { IgnoredEventType, modActionsEvt } from "../types.js";
|
||||
|
||||
/**
|
||||
* Create a KICK case automatically when a user is kicked manually.
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { AuditLogEvent, User } from "discord.js";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { Case } from "../../../data/entities/Case";
|
||||
import { UnknownUser, resolveUser } from "../../../utils";
|
||||
import { findMatchingAuditLogEntry } from "../../../utils/findMatchingAuditLogEntry";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { clearIgnoredEvents } from "../functions/clearIgnoredEvents";
|
||||
import { isEventIgnored } from "../functions/isEventIgnored";
|
||||
import { IgnoredEventType, modActionsEvt } from "../types";
|
||||
import { CaseTypes } from "../../../data/CaseTypes.js";
|
||||
import { Case } from "../../../data/entities/Case.js";
|
||||
import { UnknownUser, resolveUser } from "../../../utils.js";
|
||||
import { findMatchingAuditLogEntry } from "../../../utils/findMatchingAuditLogEntry.js";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { clearIgnoredEvents } from "../functions/clearIgnoredEvents.js";
|
||||
import { isEventIgnored } from "../functions/isEventIgnored.js";
|
||||
import { IgnoredEventType, modActionsEvt } from "../types.js";
|
||||
|
||||
/**
|
||||
* Create an UNBAN case automatically when a user is unbanned manually.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { PermissionsBitField, Snowflake, TextChannel } from "discord.js";
|
||||
import { renderUsername, resolveMember } from "../../../utils";
|
||||
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { modActionsEvt } from "../types";
|
||||
import { renderUsername, resolveMember } from "../../../utils.js";
|
||||
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { modActionsEvt } from "../types.js";
|
||||
|
||||
/**
|
||||
* Show an alert if a member with prior notes joins the server
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ChatInputCommandInteraction, Message, TextBasedChannel } from "discord.js";
|
||||
import { AnyPluginData, GuildPluginData } from "knub";
|
||||
import { ModActionsPluginType } from "../types";
|
||||
import { ModActionsPluginType } from "../types.js";
|
||||
|
||||
export function shouldReactToAttachmentLink(pluginData: GuildPluginData<ModActionsPluginType>) {
|
||||
const config = pluginData.config.get();
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { DiscordAPIError, Snowflake } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { registerExpiringTempban } from "../../../data/loops/expiringTempbansLoop";
|
||||
import { logger } from "../../../logger";
|
||||
import { TemplateParseError, TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter";
|
||||
import { CaseTypes } from "../../../data/CaseTypes.js";
|
||||
import { LogType } from "../../../data/LogType.js";
|
||||
import { registerExpiringTempban } from "../../../data/loops/expiringTempbansLoop.js";
|
||||
import { logger } from "../../../logger.js";
|
||||
import { TemplateParseError, TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter.js";
|
||||
import {
|
||||
DAYS,
|
||||
SECONDS,
|
||||
|
@ -15,13 +15,13 @@ import {
|
|||
resolveMember,
|
||||
resolveUser,
|
||||
ucfirst,
|
||||
} from "../../../utils";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { BanOptions, BanResult, IgnoredEventType, ModActionsPluginType } from "../types";
|
||||
import { getDefaultContactMethods } from "./getDefaultContactMethods";
|
||||
import { ignoreEvent } from "./ignoreEvent";
|
||||
} from "../../../utils.js";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects.js";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { BanOptions, BanResult, IgnoredEventType, ModActionsPluginType } from "../types.js";
|
||||
import { getDefaultContactMethods } from "./getDefaultContactMethods.js";
|
||||
import { ignoreEvent } from "./ignoreEvent.js";
|
||||
|
||||
/**
|
||||
* Ban the specified user id, whether or not they're actually on the server at the time. Generates a case.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../types";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../types.js";
|
||||
|
||||
export function clearIgnoredEvents(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -2,16 +2,16 @@ import { Snowflake } from "discord.js";
|
|||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { Tempban } from "../../../data/entities/Tempban";
|
||||
import { logger } from "../../../logger";
|
||||
import { resolveUser } from "../../../utils";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../types";
|
||||
import { ignoreEvent } from "./ignoreEvent";
|
||||
import { isBanned } from "./isBanned";
|
||||
import { CaseTypes } from "../../../data/CaseTypes.js";
|
||||
import { LogType } from "../../../data/LogType.js";
|
||||
import { Tempban } from "../../../data/entities/Tempban.js";
|
||||
import { logger } from "../../../logger.js";
|
||||
import { resolveUser } from "../../../utils.js";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../types.js";
|
||||
import { ignoreEvent } from "./ignoreEvent.js";
|
||||
import { isBanned } from "./isBanned.js";
|
||||
|
||||
export async function clearTempban(pluginData: GuildPluginData<ModActionsPluginType>, tempban: Tempban) {
|
||||
if (!(await isBanned(pluginData, tempban.user_id))) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Attachment, ChatInputCommandInteraction, Message } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { isContextMessage } from "../../../pluginUtils";
|
||||
import { ModActionsPluginType } from "../types";
|
||||
import { isContextMessage } from "../../../pluginUtils.js";
|
||||
import { ModActionsPluginType } from "../types.js";
|
||||
|
||||
export async function formatReasonWithMessageLinkForAttachments(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Snowflake, TextChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { UserNotificationMethod } from "../../../utils";
|
||||
import { ModActionsPluginType } from "../types";
|
||||
import { UserNotificationMethod } from "../../../utils.js";
|
||||
import { ModActionsPluginType } from "../types.js";
|
||||
|
||||
export function getDefaultContactMethods(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { GuildMember, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { ModActionsPluginType } from "../types";
|
||||
import { ModActionsPluginType } from "../types.js";
|
||||
|
||||
export async function hasNotePermission(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { SECONDS } from "../../../utils";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../types";
|
||||
import { clearIgnoredEvents } from "./clearIgnoredEvents";
|
||||
import { SECONDS } from "../../../utils.js";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../types.js";
|
||||
import { clearIgnoredEvents } from "./clearIgnoredEvents.js";
|
||||
|
||||
const DEFAULT_TIMEOUT = 15 * SECONDS;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { PermissionsBitField, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { SECONDS, isDiscordAPIError, isDiscordHTTPError, sleep } from "../../../utils";
|
||||
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { ModActionsPluginType } from "../types";
|
||||
import { SECONDS, isDiscordAPIError, isDiscordHTTPError, sleep } from "../../../utils.js";
|
||||
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { ModActionsPluginType } from "../types.js";
|
||||
|
||||
export async function isBanned(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../types";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../types.js";
|
||||
|
||||
export function isEventIgnored(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { renderTemplate, TemplateParseError, TemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { createUserNotificationError, notifyUser, resolveUser, ucfirst, UserNotificationResult } from "../../../utils";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { IgnoredEventType, KickOptions, KickResult, ModActionsPluginType } from "../types";
|
||||
import { getDefaultContactMethods } from "./getDefaultContactMethods";
|
||||
import { ignoreEvent } from "./ignoreEvent";
|
||||
import { CaseTypes } from "../../../data/CaseTypes.js";
|
||||
import { LogType } from "../../../data/LogType.js";
|
||||
import { renderTemplate, TemplateParseError, TemplateSafeValueContainer } from "../../../templateFormatter.js";
|
||||
import { createUserNotificationError, notifyUser, resolveUser, ucfirst, UserNotificationResult } from "../../../utils.js";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects.js";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { IgnoredEventType, KickOptions, KickResult, ModActionsPluginType } from "../types.js";
|
||||
import { getDefaultContactMethods } from "./getDefaultContactMethods.js";
|
||||
import { ignoreEvent } from "./ignoreEvent.js";
|
||||
|
||||
/**
|
||||
* Kick the specified server member. Generates a case.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { ModActionsEvents, ModActionsPluginType } from "../types";
|
||||
import { ModActionsEvents, ModActionsPluginType } from "../types.js";
|
||||
|
||||
export function offModActionsEvent<TEvent extends keyof ModActionsEvents>(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { ModActionsEvents, ModActionsPluginType } from "../types";
|
||||
import { ModActionsEvents, ModActionsPluginType } from "../types.js";
|
||||
|
||||
export function onModActionsEvent<TEvent extends keyof ModActionsEvents>(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { GuildTextBasedChannel } from "discord.js";
|
||||
import { disableUserNotificationStrings, UserNotificationMethod } from "../../../utils";
|
||||
import { disableUserNotificationStrings, UserNotificationMethod } from "../../../utils.js";
|
||||
|
||||
export function readContactMethodsFromArgs(args: {
|
||||
notify?: string | null;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { Attachment, ChatInputCommandInteraction, Message, User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { Case } from "../../../data/entities/Case";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { ModActionsPluginType } from "../types";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "./attachmentLinkReaction";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "./formatReasonForAttachments";
|
||||
import { CaseTypes } from "../../../data/CaseTypes.js";
|
||||
import { Case } from "../../../data/entities/Case.js";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { ModActionsPluginType } from "../types.js";
|
||||
import { handleAttachmentLinkDetectionAndGetRestriction } from "./attachmentLinkReaction.js";
|
||||
import { formatReasonWithMessageLinkForAttachments } from "./formatReasonForAttachments.js";
|
||||
|
||||
export async function updateCase(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { GuildMember, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { TemplateParseError, TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter";
|
||||
import { UserNotificationResult, createUserNotificationError, notifyUser, resolveUser, ucfirst } from "../../../utils";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
|
||||
import { waitForButtonConfirm } from "../../../utils/waitForInteraction";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { ModActionsPluginType, WarnOptions, WarnResult } from "../types";
|
||||
import { getDefaultContactMethods } from "./getDefaultContactMethods";
|
||||
import { CaseTypes } from "../../../data/CaseTypes.js";
|
||||
import { TemplateParseError, TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter.js";
|
||||
import { UserNotificationResult, createUserNotificationError, notifyUser, resolveUser, ucfirst } from "../../../utils.js";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects.js";
|
||||
import { waitForButtonConfirm } from "../../../utils/waitForInteraction.js";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { ModActionsPluginType, WarnOptions, WarnResult } from "../types.js";
|
||||
import { getDefaultContactMethods } from "./getDefaultContactMethods.js";
|
||||
|
||||
export async function warnMember(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ZeppelinPluginInfo } from "../../types";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { zModActionsConfig } from "./types";
|
||||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zModActionsConfig } from "./types.js";
|
||||
|
||||
export const modActionsPluginInfo: ZeppelinPluginInfo = {
|
||||
prettyName: "Mod actions",
|
||||
|
|
|
@ -9,15 +9,15 @@ import {
|
|||
pluginUtils,
|
||||
} from "knub";
|
||||
import z from "zod";
|
||||
import { Queue } from "../../Queue";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildMutes } from "../../data/GuildMutes";
|
||||
import { GuildTempbans } from "../../data/GuildTempbans";
|
||||
import { Case } from "../../data/entities/Case";
|
||||
import { UserNotificationMethod, UserNotificationResult } from "../../utils";
|
||||
import { CaseArgs } from "../Cases/types";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
import { Queue } from "../../Queue.js";
|
||||
import { GuildCases } from "../../data/GuildCases.js";
|
||||
import { GuildLogs } from "../../data/GuildLogs.js";
|
||||
import { GuildMutes } from "../../data/GuildMutes.js";
|
||||
import { GuildTempbans } from "../../data/GuildTempbans.js";
|
||||
import { Case } from "../../data/entities/Case.js";
|
||||
import { UserNotificationMethod, UserNotificationResult } from "../../utils.js";
|
||||
import { CaseArgs } from "../Cases/types.js";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin.js";
|
||||
|
||||
export type AttachmentLinkReactionType = "none" | "warn" | "restrict" | null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue