From 5aaf05265b63aec43fb2d5ed63fb04c9bb1c17f8 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 9 Mar 2022 15:54:14 +0000 Subject: [PATCH] better document consequence.ts --- src/protections/consequence.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/protections/consequence.ts b/src/protections/consequence.ts index a2e446d..7abf5dc 100644 --- a/src/protections/consequence.ts +++ b/src/protections/consequence.ts @@ -1,18 +1,23 @@ - +/* + * Distinct individual actions that can be caused as a result of detected abuse + */ export enum ConsequenceType { + // effectively a no-op. just tell the management room alert, + // redact the event that triggered this consequence redact, + // ban the user that sent the event that triggered this consequence ban } export class Consequence { /* - * A description of an action to take when a protection detects abuse + * Action to take upon detection of abuse and an optional explanation of the detection * * @param type Action to take * @param reason Brief explanation of why we're taking an action, printed to management room. - * this wil be HTML escaped before printing, just in case it has user-provided data + * this will be HTML escaped before printing, just in case it has user-provided data */ constructor(public readonly type: ConsequenceType, public readonly reason?: string) {} }