Discord.js: ClientUser.setGame() doesn't work anymore.

Created on 25 Aug 2017  Â·  3Comments  Â·  Source: discordjs/discord.js

Please describe the problem you are having in as much detail as possible:

A bot of mine has been running without any issues for over three months now. For some reason, however, "Playing *GAME*" isn't showing up anymore - since yesterday(?). I've hosted the bot on multiple machines and yet the issue persists.

Include a reproducible code sample here, if possible:

await client.user.setGame('?help')

--OR--

await client.user.setPresence({
  data: {
       game: {
            name: '?help'
        }
    }
})

Further details:

  • discord.js version: 11.1.0
  • node.js version: 7.10.1
  • Operating system: Linux/Windows
  • Priority this issue should have – please be realistic and elaborate if possible: Low

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

Most helpful comment

This is a known issue as Discord now requires the 'type' parameter, even when not providing a stream. The fix would be:
client.user.setPresence({ game: { name: 'some name', type: 0 } });

All 3 comments

This is a known issue as Discord now requires the 'type' parameter, even when not providing a stream. The fix would be:
client.user.setPresence({ game: { name: 'some name', type: 0 } });

1811 #1807 #1804 #1782 #1777

Duplicate of #1811, #1807, #1804, #1798
This issue has been fixed in master and 11.1-dev already, see #1785 #1782.
If you don't want to update to the 11.1-dev branch you can use client.user.setPresence({ game: { name: 'yourGameGoesHere', type: 0 } }); as a workaround.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Dmitry221060 picture Dmitry221060  Â·  3Comments

ghost picture ghost  Â·  3Comments

Dmitry221060 picture Dmitry221060  Â·  3Comments

tom-barnes picture tom-barnes  Â·  3Comments

DatMayo picture DatMayo  Â·  3Comments