TwitchChatChannel

Twitch Channel object

new TwitchChatChannel(originalMessage: Object, client: TwitchCommandoClient)
Parameters
originalMessage (Object)

name

Channel name

name

id

Channel ID

id

say

Send text message in the channel

say(text: String)
Parameters
text (String) Message text

CommandoConstants

CommandoConstants

Type: Object

Properties
GLOBAL_SETTINGS_KEY (String?) : Global settings key to save global bot preferences
GLOBAL_EMOTES_URL (String?) : Service url for Emotes service
BOT_TYPE_NORMAL (String?) : Normal bot type (user, not mod)
BOT_TYPE_NORMAL_MODDED (String?) : Normal bot type with mod (user, channel mod)
BOT_TYPE_KNOWN (String?) : Known bot
BOT_TYPE_VERIFIED (String?) : Verified bot
MESSAGE_LIMITS (String?) : Enumeration for message limits configuration

ClientOptions

Client configuration options

ClientOptions

Type: Object

Properties
verboseLogging (Boolean) : Enable verbose logging (default: false)
username (String) : Bot username
oauth (String) : Bot oauth password (without oauth:)
botOwners (Array<String>) : List of bot owners username (default: empty array)
prefix (String) : Default command prefix (default: !)
greetOnJoin (Boolean) : Denotes if the bot must send a message when join a channel (default: false)
channels (Array<String>) : Initials channels to join (default: empty array)
onJoinMessage (String) : On Join message (sent if greetOnJoin = true)
autoJoinBotChannel (Boolean) : Denotes if the bot must autojoin its own channel (default: true)
enableJoinCommand (Boolean) : Denotes if enable the !join and !part command in bot channel (default: true)
botType (String) : Define the bot type, will be used for message limits control. See CommandoConstants for available bot type values (default: BOT_TYPE_NORMAL)
enableRateLimitingControl (Boolean) : Enable Rate Limiting control (default: true)
skipMembership (Boolean) : Skip PART\JOIN events (default: true)
enableVerboseLogging (Boolean) : Enable Verbose Logging up to debug level (default: false)
joinInterval (Number) : TMI Join Interval in milliseconds (default: 350ms instead of default tmi 2000ms)

TwitchCommandoClient

The Commando Client class

new TwitchCommandoClient(options: ClientOptions)

Extends EventEmitter

Parameters
options (ClientOptions) Client configuration options
Static Members
enableVerboseLogging()
connect()
say(channel, message, addRandomEmote)
action(channel, message, addRandomEmote)
whisper(username, message)
registerCommandsIn(path)
registerDetaultCommands()
setProvider(provider)
join(channel)
part(channel)
getUsername()
getChannels()
isOwner(author)
Events
TwitchCommandoClient#connected
TwitchCommandoClient#join
TwitchCommandoClient#disconnected
TwitchCommandoClient#message
TwitchCommandoClient#commandExecuted
TwitchCommandoClient#commandError
TwitchCommandoClient#timeout
TwitchCommandoClient#reconnect

CommandArgument

Command argument

CommandArgument

Type: Object

Properties
name (String) : Argument key name
type (Object) : Argument type
defaultValue (Object) : Argument default value

CommandOptions

Command Options

CommandOptions

Type: Object

Properties
name (String) : Command name
modOnly (Boolean) : Restricted only to channel mods
ownerOnly (Boolean) : Restricted only to bot owners
broadcasterOnly (Boolean) : Restricted only to channel owner
description (String) : Command description
examples (Array<String>) : Command examples
args (Array<CommandArgument>) : Arguments
group (String) : Command group
aliases (Array<String>) : Command aliases
botChannelOnly (Boolean) : Restricted to bot channel only
hideFromHelp (Boolean) : Hide the command from help command
privmsgOnly (Boolean) : Restricted to privmsg only

TwichChatCommand

Base class to implement custom commands

new TwichChatCommand(client: TwitchCommandoClient, options: CommandOptions)
Parameters
client (TwitchCommandoClient) The TwitchCommandoClient
options (CommandOptions) Command options
Static Members
run(msg, parameters)

TwitchChatMessage

This class represents the chat message

new TwitchChatMessage(originalMessage: object, channel: String, client: TwitchCommandoClient)
Parameters
originalMessage (object)
channel (String)
Static Members
text
author
id
channel
color
emotes
timestamp
messageType
reply(text, addRamndomEmote, addRandomEmote)
actionReply(text, addRamndomEmote, addRandomEmote)

TwitchChatUser

This class represents a chat user

new TwitchChatUser(originalMessage: Object, client: TwitchCommandoClient)
Parameters
originalMessage (Object)
Static Members
name
username
mod
badges
subscriber
id
userType
turbo
whisper(message)
channel
isBroadcaster