{"version":3,"file":"flag.mjs","names":[],"sources":["../../src/message/flag.ts"],"sourcesContent":["/**\n * Single instance of a twitch automod flagged word in a message string.\n *\n * **Note:** This is an undocumented Twitch IRC feature and may change at any time, use at your own risk.\n */\nexport class TwitchFlag {\n  /**\n   * inclusive start index in the original message text.\n   * Note that we count unicode code points, not bytes with this.\n   * If you use this, make sure your code splits or indexes strings by their\n   * unicode code points, and not their bytes.\n   */\n  public startIndex: number;\n\n  /**\n   * exclusive end index in the original message text.\n   * Note that we count unicode code points, not bytes with this.\n   * If you use this, make sure your code splits or indexes strings by their\n   * unicode code points, and not their bytes.\n   */\n  public endIndex: number;\n\n  /**\n   * The part of the original message string that was recognized as flagged, e.g. \"stfu\".\n   */\n  public word: string;\n\n  /**\n   * Flag category, as per the AutoMod moderation categories:\n   * **I:** Identity language - Words referring to race, religion, gender,\n   * orientation, disability, or similar. Hate speech falls under this category.\n   * **S:** Sexually explicit language - Words or phrases referring to\n   * sexual acts, sexual content, and body parts.\n   * **A:** Aggressive language - Hostility towards other people, often\n   * associated with bullying.\n   * **P:** Profanity - Expletives, curse words, and vulgarity. This\n   * filter especially helps those who wish to keep their community family-friendly.\n   *\n   * If this array is empty, this means that Twitch flagged it for a\n   * non-specified reason.\n   */\n  public categories: { category: string; score: number }[];\n\n  public constructor(\n    startIndex: number,\n    endIndex: number,\n    text: string,\n    category: { category: string; score: number }[],\n  ) {\n    this.startIndex = startIndex;\n    this.endIndex = endIndex;\n    this.word = text;\n    this.categories = category;\n  }\n}\n"],"mappings":";;;;;;AAKA,IAAa,aAAb,MAAwB;;;;;;;CAOtB;;;;;;;CAQA;;;;CAKA;;;;;;;;;;;;;;;CAgBA;CAEA,YACE,YACA,UACA,MACA,UACA;AACA,OAAK,aAAa;AAClB,OAAK,WAAW;AAChB,OAAK,OAAO;AACZ,OAAK,aAAa"}