Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TwitchFlag

Single instance of a twitch automod flagged word in a message string.

Note: This is an undocumented Twitch IRC feature and may change at any time, use at your own risk.

Hierarchy

  • TwitchFlag

Index

Constructors

Properties

Constructors

constructor

  • new TwitchFlag(startIndex: number, endIndex: number, text: string, category: Array<{ category: string; score: number }>): TwitchFlag

Properties

categories

categories: Array<{ category: string; score: number }>

Flag category, as per the AutoMod moderation categories:

  • I: Identity language - Words referring to race, religion, gender, orientation, disability, or similar. Hate speech falls under this category.
  • S: Sexually explicit language - Words or phrases referring to sexual acts, sexual content, and body parts.
  • A: Aggressive language - Hostility towards other people, often associated with bullying.
  • P: Profanity - Expletives, curse words, and vulgarity. This filter especially helps those who wish to keep their community family-friendly.

If this array is empty, this means that Twitch flagged it for a non-specified reason.

endIndex

endIndex: number

exclusive end index in the original message text. Note that we count unicode code points, not bytes with this. If you use this, make sure your code splits or indexes strings by their unicode code points, and not their bytes.

startIndex

startIndex: number

inclusive start index in the original message text. Note that we count unicode code points, not bytes with this. If you use this, make sure your code splits or indexes strings by their unicode code points, and not their bytes.

word

word: string

The part of the original message string that was recognized as flagged, e.g. "stfu".

Generated using TypeDoc