question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashes app when hitting Discord rate limit

See original GitHub issue

Get this error when I get a 429 from Discord. Running in a Docker container on a Raspberry Pi 3. Node version is 7.4.0.

/usr/src/app/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:79
            this.restManager.client.setTimeout(() => {
                                    ^
TypeError: this.restManager.client.setTimeout is not a function
    at item.request.gen.end (/usr/src/app/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:79:37)
    at Request.callback (/usr/src/app/node_modules/superagent/lib/node/index.js:619:12)
    at /usr/src/app/node_modules/superagent/lib/node/index.js:795:18
    at Stream.<anonymous> (/usr/src/app/node_modules/superagent/lib/node/parsers/json.js:16:7)
    at emitNone (events.js:86:13)
    at Stream.emit (events.js:185:7)
    at Unzip.<anonymous> (/usr/src/app/node_modules/superagent/lib/node/utils.js:112:12)
    at emitNone (events.js:91:20)
    at Unzip.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

This was on the latest release. Hit the same bug on the latest commit as well. Here’s the stack trace.

/usr/src/app/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:68
            this.restManager.client.setTimeout(
                                    ^

TypeError: this.restManager.client.setTimeout is not a function
    at item.request.gen.end (/usr/src/app/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:68:37)
    at Request.callback (/usr/src/app/node_modules/superagent/lib/node/index.js:652:14)
    at /usr/src/app/node_modules/superagent/lib/node/index.js:866:18
    at Stream.<anonymous> (/usr/src/app/node_modules/superagent/lib/node/parsers/json.js:16:7)
    at emitNone (events.js:86:13)
    at Stream.emit (events.js:185:7)
    at Unzip.<anonymous> (/usr/src/app/node_modules/superagent/lib/node/unzip.js:53:12)
    at emitNone (events.js:91:20)
    at Unzip.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
devsnekcommented, Feb 22, 2017

not at the moment, we are gearing for 11.1.0 release right now.

0reactions
mrkishicommented, Feb 22, 2017

But then I’d have to keep track of every breaking change in master – or are there none?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discord rate-limiting again... : r/discordapp - Reddit
The rate-limit is way too sensitive apparently. And Canary is hammering the server when the rate limit drops.
Read more >
Discord API Rate Limiting: A Troubleshooting Guide - Fusebit
Generally, developers hit this rate limit when their community grows and their Discord bots need to process more requests.
Read more >
How to Fix Discord's Crash Issues - Online Tech Tips
Fix Discord Keeps Crashing by Deleting the AppData · Right-click the Windows taskbar and select Task Manager. · Choose Discord in the app...
Read more >
Rate Limits - Discord Developer Portal — Documentation
Rate limits exist across Discord's APIs to prevent spam, abuse, and service overload. Limits are applied to individual bots and users both on...
Read more >
What to do when you are being rate limited
Usually, once a grace-period has passed, the rate limit penalties are removed and you can resume what you were doing. The only surefire...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found