NAMES returning unknown command

Hi,

I’ve been attempting to use NAMES in Twitch IRC but for the life of me I can’t get it working. I read your docs which said I have to CAP REQ first, which I’m doing. Can you please explain what I’m doing wrong? I seem to be getting this whenever I do NAMES:
:tmi.twitch.tv 421 craz_killa NAMES :Unknown command

You can see the full trace below.

Cheers,
Ilya

DEBUG:irc.client:TO SERVER: PASS XXXXXXXXXXXXXXXXXXXXXXXXXX
DEBUG:irc.client:TO SERVER: NICK CraZ_Killa
DEBUG:irc.client:TO SERVER: USER CraZ_Killa 0 * :CraZ_Killa
DEBUG:irc.client:FROM SERVER: :tmi.twitch.tv 001 craz_killa :Welcome, GLHF!
DEBUG:irc.client:TO SERVER: CAP REQ :twitch.tv/membership
DEBUG:irc.client:FROM SERVER: :tmi.twitch.tv 002 craz_killa :Your host is tmi.twitch.tv
DEBUG:irc.client:FROM SERVER: :tmi.twitch.tv 003 craz_killa :This server is rather new
DEBUG:irc.client:FROM SERVER: :tmi.twitch.tv 004 craz_killa :-
DEBUG:irc.client:FROM SERVER: :tmi.twitch.tv 375 craz_killa :-
DEBUG:irc.client:FROM SERVER: :tmi.twitch.tv 372 craz_killa :You are in a maze of twisty passages, all alike.
DEBUG:irc.client:FROM SERVER: :tmi.twitch.tv 376 craz_killa :>
DEBUG:irc.client:FROM SERVER: :tmi.twitch.tv CAP * ACK :twitch.tv/membership
DEBUG:irc.client:TO SERVER: JOIN #craz_killa
DEBUG:irc.client:FROM SERVER: :craz_killa!craz_killa@craz_killa.tmi.twitch.tv JOIN #craz_killa
DEBUG:irc.client:TO SERVER: NAMES #craz_killa
DEBUG:irc.client:FROM SERVER: :craz_killa.tmi.twitch.tv 353 craz_killa = #craz_killa :craz_killa
DEBUG:irc.client:FROM SERVER: :craz_killa.tmi.twitch.tv 366 craz_killa #craz_killa :End of /NAMES list
DEBUG:irc.client:FROM SERVER: :tmi.twitch.tv 421 craz_killa NAMES :Unknown command

You can’t manually trigger NAMES via a command, it will only be sent when you join a channel.

Hmm… even when I join the channel and it sends me NAMES, it only sends my own and not the list of users already in the channel though…

Did you request the CAP of membership before joining the channel?

It seems you are joining before the ACK of the CAP

So, password, login, CAP, check you got a ACK, and then join.

Though from your log it seems fine.

If the channel is over 1000 people, you won’t get a thing regardless of CAP…

The log is in order. What do you mean it seems I’m joining before the ACK of the CAP? I join the channel after the ACK;

DEBUG:irc.client:FROM SERVER: :tmi.twitch.tv CAP * ACK :twitch.tv/membership
DEBUG:irc.client:TO SERVER: JOIN #craz_killa

The channel had under 1000 people.

On a side note, I found the following 3 endpoints, all of which seem to contain a viewers count…

https://tmi.twitch.tv/group/user/craz_killa/chatters
https://api.twitch.tv/kraken/streams?channel=craz_killa
https://api.twitch.tv/kraken/streams/craz_killa

Should I be using one of those instead of NAMES in IRC?

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