I’ve started making a chat bot in python.
It works for everything PRIVMSG related, that is, until I add code to request capabilities.
s = socket.socket()
s.connect((HOST, PORT))
s.send("PASS " + AUTH + "\r\n")
s.send("NICK " + ID + "\r\n")
s.send("CAP REQ :twitch.tv/membership")
s.send("CAP REQ :twitch.tv/commands")
s.send("CAP REQ :twitch.tv/tags")
s.send("JOIN #" + ROOM + "\r\n")
This is the code I’m using to do so and it results in
:tmi.twitch.tv 001 leviporton :Welcome, GLHF!
:tmi.twitch.tv 002 leviporton :Your host is tmi.twitch.tv
:tmi.twitch.tv 003 leviporton :This server is rather new
:tmi.twitch.tv 004 leviporton :-
:tmi.twitch.tv 375 leviporton :-
:tmi.twitch.tv 372 leviporton :You are in a maze of twisty passages, all alike.
:tmi.twitch.tv 376 leviporton :>
:tmi.twitch.tv CAP * NAK :twitch.tv/membershipCAP REQ :twitch.tv/commandsCAP REQ :twitch.tv/tagsJOIN #leviporton
It does not connect to the channel, where did I go wrong?