mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
Allow Automod to distinguish whether mod actions are manual or automatic (#179)
This commit is contained in:
parent
90b6f4bc86
commit
51db942d97
18 changed files with 106 additions and 32 deletions
|
@ -247,7 +247,7 @@ export async function muteUser(
|
|||
|
||||
lock.unlock();
|
||||
|
||||
pluginData.state.events.emit("mute", user.id, reason);
|
||||
pluginData.state.events.emit("mute", user.id, reason, muteOptions.isAutomodAction);
|
||||
|
||||
return {
|
||||
case: theCase,
|
||||
|
|
|
@ -34,7 +34,7 @@ export const ConfigSchema = t.type({
|
|||
export type TConfigSchema = t.TypeOf<typeof ConfigSchema>;
|
||||
|
||||
export interface MutesEvents {
|
||||
mute: (userId: string, reason?: string) => void;
|
||||
mute: (userId: string, reason?: string, isAutomodAction?: boolean) => void;
|
||||
unmute: (userId: string, reason?: string) => void;
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,7 @@ export type UnmuteResult = {
|
|||
export interface MuteOptions {
|
||||
caseArgs?: Partial<CaseArgs>;
|
||||
contactMethods?: UserNotificationMethod[];
|
||||
isAutomodAction?: boolean;
|
||||
}
|
||||
|
||||
export const mutesCmd = guildCommand<MutesPluginType>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue