Twitch IRC Issue

I made a Python script that stores messages on my stream in the log, but sometimes it happens that the message format is converted to “PRIVMSG” instead of the message, why is that?
If you know why, I would be very grateful for advice

Thank you


def connect_to_twitch(channel):
    server = ""
    port = 6667
    token = "xxx"

    irc = socket.socket()
    irc.connect((server, port))
    irc.send(f"PASS {token}\r\n".encode("utf-8"))
    irc.send(f"NICK metjum\r\n".encode("utf-8"))
    irc.send(f"JOIN #{channel}\r\n".encode("utf-8"))

    return irc

Seems like your code doesn’t know how to correctly parse PRIVMSG and spits out the whole line rather than the parsed result.

But your code doesn’t present the PRIVMSG parsing

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