Discord.js: Trying to set an user's status make they go offline instead, but the correct status shows up on the next login

Created on 12 Sep 2018  Â·  3Comments  Â·  Source: discordjs/discord.js

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:

  • discord.js version: 11.4.2
  • Node.js version: 8.11.2
  • Operating system: Debian GNU/Linux testing, 4.17.0-3-amd64
  • Priority this issue should have – please be realistic and elaborate if possible:low

  • [x] I found this issue while running code on a __user account__
  • [ ] I have also tested the issue on latest master, commit hash:
unverified user accounts bug

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

All 3 comments

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');

Was this page helpful?
0 / 5 - 0 ratings