Closed Zamiell closed 2 years ago
1) Unless you're from the future, the package version you provided doesn't exist
2) The code sample you provided is not valid (using await
outside of an async
function), and the onReady
, onMessageCreate
, and onVoiceStateUpdate
functions were not provided
3) Even after fixing the issues listed above, could not replicate. (using both the latest stable, v13.6.0
, and the latest dev release 14.0.0-dev.1643889786.04502ce
)
4) Try listening to the debug
event and see if you can figure out your issue from there. discordClient.on('debug', console.log)
I also have this is issue. When i try to debug. It says "Hit a 429 while executing a request".
I also have this is issue. When i try to debug. It says "Hit a 429 while executing a request".
Maybe your login limit has been reached? Discord only allows you to connect to the gateway a thousand times a single day.
Which package is this bug report for?
discord.js
Issue description
I have a pretty ordinary Discord.js bot:
I've installed all of the packages that are recommended in the documentation:
Problem:
Sometimes, when I press Ctrl+C in my shell to stop my Discord.js bot, and then I re-run it (to apply new changes), the onReady event never fires, and the bot is stuck in limbo forever. I have found that I can work around this by completely shutting off the program, letting the bot sit completely disconnected, wait 20 seconds or so, and then starting it again. So it seems like rapid-reauthentication is failing, or something along these lines. (But I am not observing any error messages at all. It just sits there, waiting for the onReady event to fire, doing nothing.)
My first thought was that the connection was not being properly torn down, and in the docs it says that invoking the
destroy()
method properly logs out and so forth. So, I added the following code:However, this extra code does not make any difference, and I still observe the exact same issue.
Has anyone else experienced this issue? My fear is that when I deploy my bot into production, it will crash, and immediately attempt to reconnect, and then be stuck in limbo forever. I've used DiscordGo in the past and I've never had any issues like this in Go land.
Package version
14.3.2
Node.js version
16.13.1
Operating system
Windows
Priority this issue should have
Medium (should be fixed soon)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
Guilds, GuildMembers, GuildMessages, GuildVoiceStates
I have tested this issue on a development release
No.