Allow overriding user notification method for mod actions via -notify and -notify-channel. Allow setting these settings for automod actions as well.

This commit is contained in:
Dragory 2020-01-29 02:44:11 +02:00
parent 77e5f429c5
commit 89f545eb62
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
12 changed files with 429 additions and 196 deletions

View file

@ -11,6 +11,7 @@ import { GuildLogs } from "../data/GuildLogs";
import { LogType } from "../data/LogType";
import * as t from "io-ts";
import { tNullable } from "../utils";
import { ERRORS } from "../RecoverablePluginError";
const ConfigSchema = t.type({
log_automatic_actions: t.boolean,
@ -146,7 +147,7 @@ export class CasesPlugin extends ZeppelinPlugin<TConfigSchema> {
public async createCaseNote(args: CaseNoteArgs): Promise<void> {
const theCase = await this.cases.find(this.resolveCaseId(args.caseId));
if (!theCase) {
this.throwPluginRuntimeError(`Unknown case ID: ${args.caseId}`);
this.throwRecoverablePluginError(ERRORS.UNKNOWN_NOTE_CASE);
}
const mod = await this.resolveUser(args.modId);