Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discord resets Bot token because of to many requests #219

Open
CallMeYuuuu opened this issue Mar 25, 2024 · 1 comment
Open

Discord resets Bot token because of to many requests #219

CallMeYuuuu opened this issue Mar 25, 2024 · 1 comment
Labels
bug Something isn't working djs-bot Issue with backend

Comments

@CallMeYuuuu
Copy link

CallMeYuuuu commented Mar 25, 2024

Hello, so I've been using this bot for a couple of months now and discord reset my bots token twice now because it "connected more than 1000 times within a short time period".
I don't know why this happens.

This is the only error message I found in the logs and sadly don't know what it means. This error message spam started several hours before discord reset the token.

[25.03.2024 - 07:15] [ERROR] | [FATAL] Possibly Unhandled Rejection 
Reason: Error: WebSocket is not open: readyState 0 (CONNECTING)

Promise {
  <rejected> Error: WebSocket is not open: readyState 0 (CONNECTING)
      at WebSocket.send (/djs-bot/node_modules/ws/lib/websocket.js:449:13)
      at WebSocketShard.send (/djs-bot/node_modules/@discordjs/ws/dist/index.js:813:21)
      at async WebSocketShard.heartbeat (/djs-bot/node_modules/@discordjs/ws/dist/index.js:890:5)
}

If you need any more logs or information, please let me know.
Thanks!

Bot Version: 5.5.1
Lavalink Version: v3

@dwgdev
Copy link

dwgdev commented Mar 26, 2024

Check the bot connection code: Check the code responsible for setting up and maintaining the WebSocket connection in your bot. Ensure that errors and retries are handled properly.

Upgrade dependencies: Make sure you are using the latest versions of Discord.js and other relevant dependencies. Older versions may have bugs or compatibility issues that have been fixed in newer versions.

Logging and monitoring: Implement comprehensive logging in your bot to track WebSocket connection status and errors. This allows you to diagnose and troubleshoot problems more effectively. Additionally, consider monitoring tools or services that can alert you to connection issues in real time.

@DarrenOfficial DarrenOfficial added bug Something isn't working djs-bot Issue with backend labels Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working djs-bot Issue with backend
Projects
None yet
Development

No branches or pull requests

3 participants