mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-25 10:25:01 +00:00
Typed log functions + more
This commit is contained in:
parent
d2ac700143
commit
bed6589d48
166 changed files with 4021 additions and 869 deletions
|
@ -1,6 +1,6 @@
|
|||
import { Snowflake, TextChannel } from "discord.js";
|
||||
import { waitForReply } from "knub/dist/helpers";
|
||||
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
|
@ -10,6 +10,7 @@ import { formatReasonWithAttachments } from "../functions/formatReasonWithAttach
|
|||
import { ignoreEvent } from "../functions/ignoreEvent";
|
||||
import { isBanned } from "../functions/isBanned";
|
||||
import { IgnoredEventType, modActionsCmd } from "../types";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
|
||||
export const MassunbanCmd = modActionsCmd({
|
||||
trigger: "massunban",
|
||||
|
@ -83,8 +84,8 @@ export const MassunbanCmd = modActionsCmd({
|
|||
sendErrorMessage(pluginData, msg.channel, "All unbans failed. Make sure the IDs are valid and banned.");
|
||||
} else {
|
||||
// Some or all unbans were successful. Create a log entry for the mass unban and notify the user.
|
||||
pluginData.state.serverLogs.log(LogType.MASSUNBAN, {
|
||||
mod: userToConfigAccessibleUser(msg.author),
|
||||
pluginData.getPlugin(LogsPlugin).logMassUnban({
|
||||
mod: msg.author,
|
||||
count: successfulUnbanCount,
|
||||
reason: unbanReason,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue