[Issue/Bug]: get_all_relationships() returning empty array #51
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happened?
Hello! Wondering if this is a mistake on my part, intended behavior of Discord, an OS quirk or a bug.
get_all_relationships() method is returning an empty array. That is until status of one of my friends changes. When it does, updated_relationship signal gets called and all subsequent calls of get_all_relationships() that come after the signal now return a single member array with a friend who's status change was registered is that session. Once more friends update their statuses, they also become visible to get_all_relationships() calls and the array grows. If I relaunch the app, the array returns as empty again. I expected it to return the whole list of friends, including those that are offline.
Running discord and godot on linux. All other sdk features working great.
Version
1.1.0
Godot Version
4.2.1
Exact steps to reproduce this error
Downloaded addon from AssetLib. Restarted project 2 times, got rig of all errors. Created my own scene, added a script, launcher the scene. The scene is just two buttons. I'm marking the press events in the log.
I also tried running the Debug scene from the addon directory, which yielded same behavior regarding the issue.
GDScript
Godot output
Additional information
I'll be happy to provide more information if I missed something.
Checks
yeah its a known issue. began to happen at one day without changing this function in the code so i assume the way I'm getting it from the discord game sdk isn't working anymore since an discord update or something. but when i have more time i will try fix it if it's possible.
Thank you for promptly confirming this. Feel free to ping me if I can help with further testing. Thanks!
okay so i assume its really discord fault. even their example can't access the full friendslist anymore. when i found further information I'll let you know
Revisiting the addon. Now testing on 4.2.2 and plugin version 1.3.1. Right now relationships don't get updated at all, even if a friend logs in while the app is running.
Oh I heard about that I think I'm deprecating the feature until Discord ever makes an update. Please consider using OAuth2 instead. I use https://github.com/disgoorg/disgo for example but there are enough libraries for other languages too.