Comments (14)
Thank you. I will look into this.
from discord-user-bots.
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.
Fixed as of version 1.6.0.
from discord-user-bots.
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.
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.
Do any other events work or is it just presence_update?
from discord-user-bots.
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.
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.
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.
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.
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.
Should the library do this for devs or should devs be aware?
from discord-user-bots.
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.
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)
- How to send a file? HOT 3
- Can't Accept Friend Requests HOT 3
- refresh token HOT 1
- Slash commands to bots HOT 1
- Cannot find module ./src/exports.js HOT 2
- how to use slash commands? client.send() only send text as text but not as a command HOT 2
- Missing properties on channels HOT 2
- How see messages from bots for me only HOT 1
- Is there a way to refresh the token? HOT 1
- Bots don't answer on commands
- account-create.js not working HOT 1
- { message: 'Unknown Channel', code: 10003 } HOT 2
- Proxy Error: fetchRequest not returned in build_noparse
- Random disconnects HOT 3
- Error: Cannot find module '../src/exports.js' HOT 1
- "Switch" to a server
- Not able to send messages
- get users list
- Error When User Invalid Token HOT 1
- Voice features
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord-user-bots.