mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat: add ClientOptions#retryLimit (#2805)
* feat: add ClientOptions#retryLimit * hydra needs to learn how to code right * a default would probably help * move incrementor & update comment * clarify docs on Infinity
This commit is contained in:
@@ -436,6 +436,9 @@ class Client extends BaseClient {
|
||||
if (!(options.disabledEvents instanceof Array)) {
|
||||
throw new TypeError('CLIENT_INVALID_OPTION', 'disabledEvents', 'an Array');
|
||||
}
|
||||
if (typeof options.retryLimit !== 'number' || isNaN(options.retryLimit)) {
|
||||
throw new TypeError('CLIENT_INVALID_OPTION', 'retryLimit', 'a number');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user