Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.83 KB

Configuration.md

File metadata and controls

36 lines (24 loc) · 1.83 KB

Chat Client

Configuration

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 to 443)
  • timeout: Integer - Number of ms to disconnect if no responses from server (Default: 9999)

identity: (Optional)

  • username: String - Username on Twitch
  • password: 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

More information

For more information, see the Examples section of the Wiki.