Fix 429 string check

This commit is contained in:
Dragory 2021-08-19 00:01:29 +03:00
parent f07ed57210
commit 499511f79d
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -189,7 +189,7 @@ connect().then(async () => {
const safe429MaxCount = 5;
const safe429Counter = new DecayingCounter(safe429DecayInterval);
client.on(Constants.Events.DEBUG, errorText => {
if (!errorText.indexOf("429")) {
if (!errorText.includes("429")) {
// tslint:disable-next-line:no-console
console.debug(`[DEBUG] ${errorText}`);
return;