aiko-chan-ai / discord.js-selfbot-v13

An unofficial discord.js fork for creating selfbots
https://discordjs-self-v13.netlify.app
GNU General Public License v3.0
701 stars 145 forks source link

Where did the syncStatus ClientOption go? #1156

Closed Amir-78 closed 2 days ago

Amir-78 commented 2 months ago

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

TheDevYellowy commented 2 months ago

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);
    }
  }
});
nocturnalong commented 3 weeks ago

I had issues setting client.user.SetStatus (it didn't seem to work at all) with the latest release. Might be related?

aiko-chan-ai commented 2 days ago

it is removed because the status is always automatically synchronized

aiko-chan-ai commented 2 days ago

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
...
aiko-chan-ai commented 2 days ago

btw implementation for user settings proto will be done later (as for now basic object settings are fine)