mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-15 06:05:03 +00:00
26 lines
776 B
TypeScript
26 lines
776 B
TypeScript
import { User } from "discord.js";
|
|
import { GuildPluginData } from "knub";
|
|
import { LogType } from "../../../data/LogType.js";
|
|
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter.js";
|
|
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects.js";
|
|
import { LogsPluginType } from "../types.js";
|
|
import { log } from "../util/log.js";
|
|
|
|
interface LogMassUnbanData {
|
|
mod: User;
|
|
count: number;
|
|
reason: string;
|
|
}
|
|
|
|
export function logMassUnban(pluginData: GuildPluginData<LogsPluginType>, data: LogMassUnbanData) {
|
|
return log(
|
|
pluginData,
|
|
LogType.MASSUNBAN,
|
|
createTypedTemplateSafeValueContainer({
|
|
mod: userToTemplateSafeUser(data.mod),
|
|
count: data.count,
|
|
reason: data.reason,
|
|
}),
|
|
{},
|
|
);
|
|
}
|