Discord.js: client.setStatus not working.

Created on 24 Aug 2020  Â·  2Comments  Â·  Source: discordjs/discord.js

Please describe the problem you are having in as much detail as possible:
So I have a bot that is in 30+ servers and when i try to set my bot's status to dnd with client.user.setStatus('dnd') it doesn't work. It doesn't show an error and the .then function runs but the status of the bot doesn't change the dnd and remains online.

Include a reproducible code sample here, if possible:
It wasn't really code, it was an eval command so here's the eval command.

ME: ?eval client.user.setStatus('dnd').catch((err)=>{message.channel.send(err)}).then(()=>{message.channel.send('done')})

BOT: [object Promise]

BOT: done

Further details:

  • discord.js version: 12.2.0
  • Node.js version: v12.18.0
  • Operating system: win32
  • Priority this issue should have – please be realistic and elaborate if possible:
    Should probably have the lowest priority since it isn't that important

Relevant client options:

  • partials: none
  • gateway intents: none
  • other: none
  • [ ] I have also tested the issue on latest master, commit hash:
cannot reproduce bug

Most helpful comment

I can not reproduce this on v12.3.1, status is set immediately if given appropriate time in between changes. My guess is that you're changing presence/status/activity (the latter two subsets of presence) much too quickly and the presence updates we send are ignored by discord because you are on cooldown.

All 2 comments

I tested and it seems that setStatus does not have an immediate effect, but the new status is applied when setActivity is run.

I can not reproduce this on v12.3.1, status is set immediately if given appropriate time in between changes. My guess is that you're changing presence/status/activity (the latter two subsets of presence) much too quickly and the presence updates we send are ignored by discord because you are on cooldown.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Alipoodle picture Alipoodle  Â·  3Comments

smchase picture smchase  Â·  3Comments

Dmitry221060 picture Dmitry221060  Â·  3Comments

PassTheMayo picture PassTheMayo  Â·  3Comments

DatMayo picture DatMayo  Â·  3Comments