TwitchChatEmitter

TwitchChatEmitter

TwitchChatEmitter The Twitch chat implementation, based on the already existing module tmi.js (tmijs.org), adding more features and handlers to chat interation.

Constructor

new TwitchChatEmitter(options, logger)

Source:
Parameters:
Name Type Description
options object
logger object

The logger object.

Methods

connect()

Connect to the chat.

Source:

Events

Chat:chat_cmd_COMMAND

The chat command event, triggered when the specified command is sent. This event is dynamic and the name will change according to the options passed to the toolkit.

Source:
Parameters:
Name Type Description
channel string

The channel in which the command was sent.

username string

The name of the user who sent the command.

command string

The triggered command.

self bool

Whether the command was sent to the user bot or not.

Chat:chat_parsed

The chat message parsed to html, with twitch emotes.

Source:
Parameters:
Name Type Description
channel string

The channel in which the command was sent.

userstate object

The userstate object.

message string

The parsed message.

self bool

Whether the command was sent to the user bot or not.

Chat:whisper_cmd_COMMAND

The whisper command event, triggered when the specified command is sent. This event is dynamic and the name will change according to the options passed to the toolkit.

Source:
Parameters:
Name Type Description
userstate string

The userstate object for the user who sent the whisper.

command string

The triggered command.

commandMessage string

The message sent with the command.

self bool

Whether the command was sent to the user bot or not.