Closed dmbaranov closed 4 months ago
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 pubspec.yaml
:
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 dependency_overrides
:)
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):