-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(User): set User#bot to false if not partial #4706
Conversation
It's intended to be null, it being false was the bug. this pr undos the bug fix |
Yes, but the current bug is that it's set to |
But it's very similar in behavior to how API doesn't send |
original
No, that's a misconception. The bug was introduced with the "bug fix". (I even mentioned exactly that point in my PR referenced above under "further considerations") Now, this will lead to inconsistencies with partials, since we might falsely declare bots which we only have a partial User for as "false", however that's a caveat to swallow, imo and is regulated with "partials should be considered defunct before fetching". since the fetch then will retrieve and update the truthful Has discord documented that anywhere? no After some more internal discussion: discord not documenting this behavior is an absolute mess and handling it ourselves even more of an headache. |
Ah, I see, I assumed that it was intentional to be consistent with the API from #4702 (comment) |
The JSdoc for |
Please describe the changes this PR makes and why it should be merged:
null | true
notfalse | true
like in 12.2.0 #4702#4636 recently introduced a bug where
User#bot
was set tonull
instead offalse
. This is the case because it checked if the bot property was present in the data to see if it was a partial or not, however this property also does not exist for a regular user. This has been fixed by usingUser#partial
which checks if the username property exists instead.Status
Semantic versioning classification: