Typed log functions + more
This commit is contained in:
parent
d2ac700143
commit
bed6589d48
166 changed files with 4021 additions and 869 deletions
24
backend/src/plugins/Logs/logFunctions/logMassMute.ts
Normal file
24
backend/src/plugins/Logs/logFunctions/logMassMute.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { LogsPluginType } from "../types";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { log } from "../util/log";
|
||||
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { User } from "discord.js";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
|
||||
|
||||
interface LogMassMuteData {
|
||||
mod: User;
|
||||
count: number;
|
||||
}
|
||||
|
||||
export function logMassMute(pluginData: GuildPluginData<LogsPluginType>, data: LogMassMuteData) {
|
||||
return log(
|
||||
pluginData,
|
||||
LogType.MASSMUTE,
|
||||
createTypedTemplateSafeValueContainer({
|
||||
mod: userToTemplateSafeUser(data.mod),
|
||||
count: data.count,
|
||||
}),
|
||||
{},
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue