CAP REQ tags not showing display-name/emotes

Hey everyone.
I’m having an issue with my bot where some of the users that talk in the chat haven’t a “display-name” and “emotes” field on the tags response.


It’s only happening with this user, it gets the display-name and emotes field for everyone else.
Does it have to be with an issue that Twitch might be going through or am I missing something?

Thanks in advance.

The user didn’t use any emotes in their message

The user has no display name set

This is perfectly valid

Still, it displays the emotes sets for everyone else even if they don’t use emotes at all.
Something isn’t adding up here.

Emotes or Emote sets?

Initially you said emotes.

@badges=global_mod/1,turbo/1;color=#0D4200;display-name=TWITCH_UserNaME;emotes=25:0-4,12-16/1902:6-10;mod=0;room-id=1337;subscriber=0;turbo=1;user-id=1337;user-type=global_mod :twitch_username! PRIVMSG #channel :Kappa Keepo Kappa

From the docs states there is no emote set in sort of packet.

Emote-sets are in userstate and you posted a tags/privmsg output.

The emotes field that tags output.
Still doesn’t answer why I can’t get the display-name of that specific user

As Barry mentioned, if display-name is blank, like in your example, than the user never set it. In that case you can assume it to start with a capital letter and the rest lowercase.

Whats the username?

if there’s no other way around I’ll have to make it check if it outputs an empty string from display-name field and get the name from the :user! part.


Yes thats correct, you are supposed to

If display name is set and not blank use display name else use username/login

I checked on the API here theres no “special” Display Name beyond the “default” of “uppercase the first character”

As per the docs I linked earlier:

display-name is the user's display name, escaped as described in the IRCv3 spec.
Empty if it's never been set.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.