Please describe the problem you are having in as much detail as possible:
When setting the user status both with client.user.setPresence({ status: status }) and client.user.setStatus(status), the user goes offline to the other users on the server and contacts. If the user ends the session and starts over, they will appear with the correct status that was set on the previous session. Using .catch seems to catch no errors.
Include a reproducible code sample here, if possible:
arg = "idle"
client.user.setStatus(arg)
.catch ( err => { console.log(err) } );
Further details:
The code you sent worked perfectly for me on a bot account
library never saves presence locally or anywhere else to restore on next login (when restating process) so it can never happen
selfbots are against TOS so we can’t help you with problems that happen while using user account
I found a workaround that I have no doubt will get removed/patched some time soon:
client.user.settings.update('status','online');
Most helpful comment
library never saves presence locally or anywhere else to restore on next login (when restating process) so it can never happen
selfbots are against TOS so we can’t help you with problems that happen while using user account