Giter VIP home page Giter VIP logo

Comments (14)

Sopur avatar Sopur commented on September 7, 2024 1

Thank you. I will look into this.

from discord-user-bots.

Sopur avatar Sopur commented on September 7, 2024 1

Thank you for bringing this to my attention again. I will add logic to automatically reconnect when needed, while also triggering a discord_reconnect event.

from discord-user-bots.

Sopur avatar Sopur commented on September 7, 2024 1

Fixed as of version 1.6.0.

from discord-user-bots.

Sopur avatar Sopur commented on September 7, 2024

Can you please specify what happens? When testing I didn't see the any disconnect Error message and when setting an interval loop to test the ready state of the bot WebSocket it was always open. If you mean it doesn't call the presence_update function, then it's just that there aren't many people changing their status.

from discord-user-bots.

DarrenRainey avatar DarrenRainey commented on September 7, 2024

I'll have to do some more testing but what I found was after a while the presence_update function would just stop working I've tested this with my alt account changing status and after say 15 minutes it would stop showing any presence updates.

from discord-user-bots.

Sopur avatar Sopur commented on September 7, 2024

Do any other events work or is it just presence_update?

from discord-user-bots.

DeividasJackus avatar DeividasJackus commented on September 7, 2024

Thank you for this package, @Sopur!

I'm not sure if this is related, but I'm having the same issues with on.message_create when I let it run for a while.

Running dockerized and reproducible on both local machine and an EC2 instance, with it normally dying off in about an hour.

Latest test shows the app working as expected for 46 minutes, before it stops receiving new message events.
No errors, heartbeat_sent and heartbeat_received continue to be triggered in the mean time.

from discord-user-bots.

DeividasJackus avatar DeividasJackus commented on September 7, 2024

Correction to my statement above: it appears that after the hang up heartbeats are only sent, not received.
In my case the issue is the websocket being unexpectedly closed by the server as an hour or two pass by.

Could this be pointing to an issue with heartbeats?

In the mean time, the poor man's short-term fix for me is listening to discord_disconnect and simply restarting the process.

from discord-user-bots.

lf94 avatar lf94 commented on September 7, 2024

I've encountered the same issue. I'll try to submit a fix in the coming hours or days. This wrapper has been incredibly nice to use so I'd really like to support it.

from discord-user-bots.

lf94 avatar lf94 commented on September 7, 2024

One issue could be that the heartbeat is reporting back a d of null, when it should match how many messages have passed, which I determined through some trial-and-error. I think there should be a reply message back to heartbeat reply (so: discord_heartbeat -> your_reply -> discord_heartbeat_conf) Nevermind. Double checked and that's not the case.

There also appears to be an "/ack" request once in awhile. <- waiting to double confirm this too. Appears to not be necessary either. If it's really all about an incrementing d then that's nice 🙂 I'll run it over night.

Edit: it appears this was not the solution either. I'm going to just leave discord open with a new account and record what it does now.

from discord-user-bots.

lf94 avatar lf94 commented on September 7, 2024

So yeah, it appears Discord will auto-disconnect if there's little to no activity, even with heartbeats, and restart the websocket in their official client. So @DeividasJackus 's "poor-man's" solution is actually the right one!

from discord-user-bots.

lf94 avatar lf94 commented on September 7, 2024

Should the library do this for devs or should devs be aware?

from discord-user-bots.

lf94 avatar lf94 commented on September 7, 2024

Could you leave the issue open until it's done? Just so I get the notification - I'd like to remove the reconnect code I already have when this is added. (The issue is also still pinned.)

from discord-user-bots.

wowkster avatar wowkster commented on September 7, 2024

Hi, have there been any updates on the status of this fix? I have also experienced the same issue.

from discord-user-bots.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.