Having issues with Discord.js Presence Activity state and name

So I am making a bot, and I wanted to make a cool little feature I rarely or almost never see on bots for "userinfo" command.

I am currently stuck on activities/game information. I have already made a map for all activities user has, in case user has more than one activities.

For example: User has both Custom Status and is listening to Spotify or playing a game. I've managed to make a map which says the game that the user is playing and I wanted to make Custom Status to be shown aswell. Unfortunately for custom status it only writes "Custom Status" instead of the text users status contains.

The idea is to make bot type out the text user has in his status such as "Bored Today" status.

I've made some researches and someone commented how ".state" of activity is text in status and ".name" is literal "Custom Status". So I have tried using both .state and .name but unfortunately it returns an undefined value.

In addition, the way that ".name" was supposed to work is same as it works without it now.


user.presence.activities; Returns the name of activity ("Spotify" , "Name of the game", "Custom Status")

user.presence.activities.name; Returns undefined and if was supposed to return the name of activity as said in documentation and on issue thread. ("Spotify, "Name of the game" , Custom Status")

user.presence.activities.state Return undefined and as mention should return the state of the Activity ("Spotify Song Name" , "Name of the game" , "Text in custom statu")

Issue Thread: https://github.com/discordjs/discord.js/issues/3552

Documentation: https://discord.js.org/#/docs/main/master/class/Presence?scrollTo=activity (edited)


  1. Logs undefined
var aktivnost = user.presence.activities.state;

  1. Logs undefined
var aktivnost = user.presence.activities.name;

  1. Logs e.g Spotify or Dead by Daylight or Custom Status - as it should
var aktivnost = user.presence.activities;

  1. Logs e.g Spotify and Custom Status - as it should
var aktivnost = user.presence.activities.map(a => `<:arrow:779290699236900864> ${a}`).join(`\n`)


Question: How do I make it write out the text of Custom Status. Obviously from docs and issue thread it was supposed to give me the text but it is giving me undefined. I haven't found any information if .name and .state are removed, as they are present in v12 docs.

Thanks in advance, Luke.