-
Notifications
You must be signed in to change notification settings - Fork 48
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
Hang Status is not handled #661
Comments
Thanks for reporting this! This is an issue we are aware of and will be fixed in the next version, but this gives us a nice reminder to fix it. For now, you can use a patched version of nyxx with support for hang status by adding this to your dependency_overrides:
nyxx:
git:
url: https://github.com/abitofevrything/nyxx.git
ref: patch/hang-status |
Works like a charm, thanks a lot for quick reply and awesome library! :) I'll leave it to you to decide whether to close this issue now (since there's a solution to the problem) or you'll do it when this fix is released. |
We'll leave it open to keep track of it. |
Hello @dmbaranov the issue is now fixed on the dev branch, you can switch to the main repo in your |
Thank you so much, appreciate it! :) |
Describe the bug
Discord rolled out new feature called Hang Status for some users. Unfortunately, I wasn't able to find official docs for it, but there are a lot of articles in Google about it.
Apparently, this new status is not handled by ActivityType and whenever someone sets it, an exception is thrown. Now here comes another problem. After trying many different options to catch this exception, none of them actually worked (I tried adding
onError
callbacks,handleError
calls, try/catch in different places,runZoneGuarded
, etc., all this with and withoutignoreExceptions
plugin). Eventually, once this error occurs, bot stops listening to other commands and the only way to fix it is to restart the bot.To Reproduce
Steps to reproduce the behavior:
Nyxx.conntectGateway
call, useGatewayIntents.all
;FormatException: Unknown activity type
dnd
key from UserStatus;Nyxx.conntectGateway
call, useGatewayIntents.all
;FormatException: Unknown user status
(which essentially leads to the same issue);Expected behavior
Library correctly handles Hang status for the users.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: