I’m getting NAMES: Unknown Command when trying to call:
I’m requesting capabilities:
// :tmi.twitch.tv CAP * LS :twitch.tv/tags twitch.tv/commands twitch.tv/membership
client.write("CAP REQ :twitch.tv/membership\r\n");
// :tmi.twitch.tv CAP * ACK :twitch.tv/membership
client.write("CAP REQ :twitch.tv/commands\r\n");
// :tmi.twitch.tv CAP * ACK :twitch.tv/commands
I wait until I get these responses, then join my channel’s channel and run:
// :tmi.twitch.tv CAP * LIST :twitch.tv/commands twitch.tv/membership
// :tmi.twitch.tv 421 <username> NAMES :Unknown command
twitch.tv/membership capability you will receive a
NAMES event on channel join, and
MODE events while in the channel. Requesting the userlist manually via the
NAMES command is not supported.
Remember that the userlist is cached and can take it’s time to be received, these events are not instantaneous like they would be in regular IRC. On some channels with too many users you may not receive one at all (unless that changed).
Channels with over a thousand users will only list OPs.
I think I’ll try joining a larger channel. I was doing some testing with 2 accounts (my bot, and my main) and
NAMES would only display a single name, ever. I’ll see if the on-join
NAMES is more reliable with a larger group of people.
>:divisionsol.tmi.twitch.tv 353 divisionsol = #divisionsol :divisionsol
>:divisionsol.tmi.twitch.tv 366 divisionsol #divisionsol :End of /NAMES list
Thanks for your input. Push comes to shove, I’ll just do it all through
Your best bet is to use both.
Often when you connect/reconnect, the server thinks you still have the names is what I noticed, and won’t send them again.
Either way - sometimes I get a huge NAMES list, and sometimes it’s pretty empty and suddenly I get a huge list of joins. I think you’ll have to use both in the end.
I’ve seen that too where I suddenly get a huge list of JOINS from a channel. Does anyone know what causes this?
Names are not sent real time, they are batched by the Twitch server for channels with < 1000 people. Names are completely disabled in channels for > 1000, with the exception for things like OP
Is there a way to determine if a server has >1000 viewers through IRC without using the API. In other words, is there a way to tell that you have just been sent a list of moderators (or whatever it sends you) and not the full list of viewers?
Not the server, it’s based on the channel you’re in. A casual comparison would be to look at something like http://tmi.twitch.tv/group/user/lirik/chatters having more than 1000 users returned.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.