Reading twitch tv messages from a channell

server = 'irc.chat.twitch.tv'
port = 6667
nickname = 'harshavardhanm03'
token = 'oauth:*************************'
channel = '#Lord_Kebun'


import socket

sock = socket.socket()

sock.connect((server, port))
sock.send(f"PASS {token}\n".encode('utf-8'))
sock.send(f"NICK {nickname}\n".encode('utf-8'))
sock.send(f"JOIN {channel}\n".encode('utf-8'))

resp = sock.recv(2048).decode('utf-8')
print(resp)

But the response is coming as follows . What changes should I do in order to capture the messages. I am planning to use zoo keeper to do stream analytics.

As what?

Use a IRC library and avoid reinventing the wheel.

Channel name must also be in all lowercase.

1 Like

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