-
-
Notifications
You must be signed in to change notification settings - Fork 163
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 update broke functionality? #454
Comments
Discum has been working fine for me, you may just need to send opcode 14 to those guilds, discum doesn't send them by default. Try this:
It can take a few tries for it to work, also you can try setting log to file and console to false, then respond to ready_supplemental with only the subscribe command above (don't parse messages). Sometimes parsing can break the pipe (I think just because discum is synchronous and Python is very slow). |
I get this when running the version you suggested. Exception ignored in thread started by: <bound method GatewayServer._response_loop of <discum.gateway.gateway.GatewayServer object at 0x7f2e6aeba180>> |
Wrap bot.gateway.subscribeToGuildEvents in a try/except and just let that KeyError pass, I'm pretty sure it will still send the opcode. I think it's actually already been sent when that error is thrown and you should still be able to run the gateway without that key set initially because I think running the gateway sets it, but I'm not 100% sure, if I get some time I'll see if I can figure out what's going on, but try something like this:
I haven't actually been able to recreate that error you're getting, but from the traceback you posted it seems to be the same type of situation that's happening with the other KeyError problems like with the guilds key, here the owner_id key isn't set because there's some event that sets it and that's not happening or some function that needs to be called first but isn't, probably the fix is to just set it initially to a placeholder value like None or empty dict. I'm curious to know what's actually going on so hopefully I can devote some time to it soon and I'll update if I figure out what's actually causing this. |
I should mention I'm using Replit and used their "import github" option to pull the DISCUM source. They have a package that needs to be installed as its a requirement for DISCUM. The Replit package is called "websocket-client2". Without this pkg I get this error when attempting to run the source. Traceback (most recent call last): Not sure if this is related to this issue or causing it at all. Furthermore If I run bot.gateway.fetchMembers(guild_id, channel_id) for the guild in question the messages come through for a while but then they stop after some time. I wrapped the try/except and its working just fine now. |
I was receiving this issue as well. And I came up with a VERY janky solution that still allows you to use that event and not have to try except block it as this just causes you to loose Guild functionality. And that very janky solution is: return Session.settings_ready['guilds'][self.guildID]['owner_id'] #returns type int to: try:
return Session.settings_ready['guilds'][self.guildID]['owner_id'] #returns type int
except KeyError:
return 0 (In file sessions.py, line 256ish) However the downside of this is that it can cause you to not be able to get the owner's id later on and you'd have to do it manually. |
Using just this code
Some servers the client/user(CLIENT_TOKEN) are in do not trigger an event message. Its like no message was sent. Nothing prints as if there are no messages being sent unless its outside of this community server. In this scenario the client/user is apart of one community server and for testing purposes I made another server with a different/new client/user account. When I send a message in this newly created server it does trigger a message event.
Is this something that broke during an update or is this other community server some how hiding its messages and activity from user/self bots?
The text was updated successfully, but these errors were encountered: