-
-
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
better setstatus for selfbots #1428
Conversation
it should be if (!this.bot) this.settings.update(Constants.UserSettingsMap.status, status);
return this.setPresence({ status }); |
Doing that is redundant. I have done testing, and the status is globally set by just updating the settings object. This has been tested by viewing a client change from other accounts. Considering that regular presence status sets don't work for user accounts, I see no point in making multiple calls for this. |
that is quite interesting, and possibly a bug :3, but if it works /shrug |
I don't think it's necessarily a bug, I just think that's how it is set up for user accounts. Bot accounts function differently, as each presence is per-shard. However, since user accounts don't shard their statuses are stored in a different place; namely, the ClientUserSettings. I think that it works on a priority basis. For example from my experimentation:
Thus, changing via presences can only make it equal or higher to your ClientUserSettings status. |
i only say it could be a bug because the official client dispatches a presence update when you use the ui, in addition to posting the change to user settings |
Actually, upon further testing and in consideration with my writeup, I have discovered that the priority thing is indeed valid, so your suggestion was correct. If you set the presence to online and the settings to dnd, it will be online. My apologies. |
After some thought and some practical experimentation, I have come to another conclusion regarding setting the presence and the user settings. Yes, both must be set, but consider how discord displays the highest status they should not be set to the same thing. The next commit will do the following:
The second change is to allow the user to be able to freely change their own status. Say, for instance, they use the With this, a user will be able to set their status using either the |
👍 |
* better setstatus for selfbots * make both calls * must return * use setpresence, set invisible
* better setstatus for selfbots * make both calls * must return * use setpresence, set invisible
* better setstatus for selfbots * make both calls * must return * use setpresence, set invisible
This PR makes minor modifications to the
ClientUser#setStatus
function to make it function properly for user accounts (selfbots).Previously using the generic endpoint, setting a status programmatically on a user account would not work most of the time, and it would never adjust it on the client settings.
By modifying the ClientUserSettings object, we can circumvent this issue.
This PR accomplishes this by
ClientUser#settings.update('status', value)
function to properly update the user statusI have made a GIF demonstrating this behavior
Semantic versioning classification: