Closed Syncinus closed 4 years ago
I think there is already a pr to add this (#3353)
The custom status feature will very likely be reworked and the library will introduce this final version once it's documented by the API.
For now you can read the state
property of Presence#game (v11) or Presence#activity (v12) to receive the custom status text, if no other activity overwrites it (think spotify, games).
Discord.js does not support multiple activities yet, so if the custom status is not the only activity it will not be displayed in these properties.
Due to the different structure of presence data there is also currently no way to get the emoji used in the custom status.
Side note (since people always wonder): According to https://github.com/discordapp/discord-api-docs/issues/1160there are plans to make this feature (setting a custom status) accessible for bots at a later date.
@almostSouji discordapp/discord-api-docs#1162 resolves discordapp/discord-api-docs#1160 , so it should be already accessible for bots. Any plans on implementing it? It would be great to set custom status instead of the normal "playing", as there is more room for text.
While the PR is merged, the behavior still seems to be the old and unwanted one.
(state
being the text and name
being the literal 'Custom Status'
)
Also there is no note that bots actually can set one now. (It does not seem to work either, sending a type 4 activity, clears the current one)
Custom status support (reading) has been added in https://github.com/discordjs/discord.js/commit/2ca74d6b63392c09a388c58f9b04945e884646c6, but d.js only supports showing 1 activity, so if the user has both custom status and playing/spotify/something else, the activity object will only have one. D.js probably needs to be updated to show all of a user's activities.
It's been previously stated that the library devs are waiting for custom status to be fully reworked and finalized by Discord before continuing to implement anything further in the library. I'm not sure if this has only been said on the server or if someone has commented something to this effect on GH.
I assumed that was before Discord fully released custom status, have they confirmed that it will be reworked?
From all I know the statement was placed after custom status was released on the stable channel, when several people asked if this is the final implementation, since it introduces quite a few inconsistencies.
@jhgg, could you clarify if possible?
Discord recently added custom status and I noticed it doesn't show on any of the fields a user, and on the game name sometimes shows "Custom Status". Discord's API should be adding in this soon or might have already added it, so this feature should be here for V12.