Skip to content

@mastondzn/dank-twitch-irc / TwitchFlag

Class: TwitchFlag ​

Defined in: src/message/flag.ts:6

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.

Constructors ​

Constructor ​

new TwitchFlag(startIndex, endIndex, text, category): TwitchFlag

Defined in: src/message/flag.ts:44

Parameters ​

startIndex ​

number

endIndex ​

number

text ​

string

category ​

object[]

Returns ​

TwitchFlag

Properties ​

categories ​

categories: object[]

Defined in: src/message/flag.ts:42

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.

category ​

category: string

score ​

score: number


endIndex ​

endIndex: number

Defined in: src/message/flag.ts:21

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

Defined in: src/message/flag.ts:13

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

Defined in: src/message/flag.ts:26

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