3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 18:25:03 +00:00

feat: knub v32-next; related fixes

This commit is contained in:
Dragory 2023-04-01 02:16:15 +03:00
parent 448293d6ac
commit c36d47e0b8
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
89 changed files with 287 additions and 931 deletions

View file

@ -5,7 +5,7 @@ import { onGuildEvent } from "../../data/GuildEvents";
import { GuildLogs } from "../../data/GuildLogs";
import { GuildMutes } from "../../data/GuildMutes";
import { GuildTempbans } from "../../data/GuildTempbans";
import { mapToPublicFn } from "../../pluginUtils";
import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils";
import { Queue } from "../../Queue";
import { MINUTES, trimPluginDescription } from "../../utils";
import { CasesPlugin } from "../Cases/CasesPlugin";
@ -120,10 +120,11 @@ export const ModActionsPlugin = zeppelinGuildPlugin<ModActionsPluginType>()({
description: trimPluginDescription(`
This plugin contains the 'typical' mod actions such as warning, muting, kicking, banning, etc.
`),
configSchema: ConfigSchema,
},
dependencies: () => [TimeAndDatePlugin, CasesPlugin, MutesPlugin, LogsPlugin],
configSchema: ConfigSchema,
configParser: makeIoTsConfigParser(ConfigSchema),
defaultOptions,
events: [CreateBanCaseOnManualBanEvt, CreateUnbanCaseOnManualUnbanEvt, PostAlertOnMemberJoinEvt],
@ -223,7 +224,4 @@ export const ModActionsPlugin = zeppelinGuildPlugin<ModActionsPluginType>()({
state.unregisterGuildEventListener?.();
state.events.removeAllListeners();
},
// FIXME: Proper inherittance from ZeppelinPluginBlueprint
configParser: (o: any) => o,
});

View file

@ -1,5 +1,5 @@
import humanizeDuration from "humanize-duration";
import { getMemberLevel } from "knub/dist/helpers";
import { getMemberLevel } from "knub/helpers";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { CaseTypes } from "../../../data/CaseTypes";
import { clearExpiringTempban, registerExpiringTempban } from "../../../data/loops/expiringTempbansLoop";

View file

@ -1,5 +1,5 @@
import { Snowflake } from "discord.js";
import { waitForReply } from "knub/dist/helpers";
import { waitForReply } from "knub/helpers";
import { performance } from "perf_hooks";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { CaseTypes } from "../../../data/CaseTypes";

View file

@ -1,5 +1,5 @@
import { Snowflake } from "discord.js";
import { waitForReply } from "knub/dist/helpers";
import { waitForReply } from "knub/helpers";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { CaseTypes } from "../../../data/CaseTypes";
import { LogType } from "../../../data/LogType";

View file

@ -1,5 +1,5 @@
import { Snowflake } from "discord.js";
import { waitForReply } from "knub/dist/helpers";
import { waitForReply } from "knub/helpers";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { LogType } from "../../../data/LogType";
import { logger } from "../../../logger";

View file

@ -1,6 +1,6 @@
import { GuildMember, GuildTextBasedChannel } from "discord.js";
import { GuildPluginData } from "knub";
import { hasPermission } from "knub/dist/helpers";
import { hasPermission } from "knub/helpers";
import { LogType } from "../../../data/LogType";
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { DAYS, errorMessage, resolveMember, resolveUser, SECONDS } from "../../../utils";