Skip to content
SinisterRectus edited this page Nov 12, 2016 · 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
dateTime '%c' Date and time format to use by the client for warning and error logging

Clone this wiki locally