Get the channel name


#1

Google translator:

Hi, I am developing a Twitch chatbot and I need to get the name of the channel where the command was executed.

Not the name of the person who executed it, but the name of the channel where it was executed.

Is there a variable or something that I can use to obtain it?


#2

If you are using a IRC parser then it’s provided, read the docs for your IRC parser.

:<user>!<user>@<user>.tmi.twitch.tv PRIVMSG #<channel> :This is a sample message

Is an example of a message sent from the server to you as the connecting client.

The channel the message was sent to is included in <channel>