Skip to content
SinisterRectus edited this page Nov 7, 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
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

Clone this wiki locally