Each and every option listed below is optional. Running TwitchJS without options will result as an anonymous connection to Twitch and you will have to join the channels manually.
options
: (Optional)
clientId
: String - Used to identify your application to the API (Default:null
)debug
: Boolean - Show debug messages in console (Default:false
)commandTimeout
: Integer - Number of ms before command will timeout if no response from server (Default:600
)
connection
: (Optional)
server
: String - Connect to this server (Overrides cluster and connect to this server instead)port
: Integer - Connect on this port (Default:80
)reconnect
: Boolean - Reconnect to Twitch when disconnected from server (Default:false
)maxReconnectAttempts
: Integer - Max number of reconnection attempts (Default:Infinity
)maxReconnectInterval
: Integer - Max number of ms to delay a reconnection (Default:30000
)reconnectDecay
: Integer - The rate of increase of the reconnect delay (Default:1.5
)reconnectInterval
: Integer - Number of ms before attempting to reconnect (Default:1000
)secure
: Boolean - Use secure connection (SSL / HTTPS) (Overrides port to443
)timeout
: Integer - Number of ms to disconnect if no responses from server (Default:9999
)
identity
: (Optional)
username
: String - Username on Twitchpassword
: String - OAuth password on Twitch
channels
: Array - List of channels to join when connected (Default: []
)
logger
: Object - Custom logger with the methods info
, warn
, and error