-
Notifications
You must be signed in to change notification settings - Fork 149
Client options
SinisterRectus edited this page Feb 8, 2017
·
12 revisions
When initializing a client, a table of options can be passed to the constructor.
local discordia = require('discordia')
local client = discordia.Client(options)The options table and the fields in it are optional. Accepted fields are:
| Option | Default | Description |
|---|---|---|
| routeDelay | 300 | Minimum time in milliseconds to wait between HTTP requests per-route |
| globalDelay | 10 | Minimum time in milliseconds to wait between HTTP requests globally after a global 429 |
| messageLimit | 100 | Limit to the number of cached messages per channel |
| largeThreshold | 100 | Limit to how many members are initially fetched per-guild on start-up |
| fetchMembers | false | Whether to fetch all offline members for all guilds |
| autoReconnect | true | Whether to attempt to reconnect after an unexpected gateway disconnection |
| compress | true | Whether to allow for compressed gateway payloads |
| dateTime | '%c' | Date and time format to use by the client for warning and error logging |
| bitrate | 64000 | The default bitrate to use for voice connections, from 8000 to 128000 |