Where did the syncStatus ClientOption go?
Amir-78 opened this issue · comments
Which package is the feature request for?
The core library
Feature
The syncStatus was a good option, now when we use the library in our accounts it will keep it online even if we don't want to!
Ideal solution or implementation
What was it replaced with or can it be returned?
Alternative solutions or implementations
No response
Other context
No response
to be honest I have no clue as to where it went but I was able to sort of replicate it, I haven't tested the actual changing of status but I did test that it does decode correctly
npm i discord-protos
const { PreloadedUserSettings } = require("discord-protos");
// do all the client initialization
client.on("unhandledPacket", (packet) => {
if (typeof packet.t !== "string") return;
if (packet.t == "USER_SETTINGS_PROTO_UPDATE") {
if (packet.d.settings.type == 1) {
const decoded = PreloadedUserSettings.fromBase64(packet.d.settings.proto);
client.user.setStatus(decoded.status.status.value);
}
}
});
I had issues setting client.user.SetStatus (it didn't seem to work at all) with the latest release. Might be related?
it is removed because the status is always automatically synchronized
If you look at the log when using the "debug" event, it will have a few lines
[USER_REQUIRED_ACTION] All required actions have been completed.
[SETTING > ClientUser] Sync setting
[SETTING > ClientUser] Sync activities & status
[WS => Shard 0] Shard received all its guilds. Marking as fully ready.
[SETTING > ClientUser] Sync setting
[SETTING > ClientUser] Sync status
...
btw implementation for user settings proto will be done later (as for now basic object settings are fine)