Hey!
I watched some more examples on this, and added the PING/PONG line:
def twitch_recieve_messages(self, amount=1024):
data = None
try:
data = self.s.recv(1024);
except:
print("FUCK!");
return False;
for line in data.split("\r\n"):
if line == "":
continue;
if "PING :tmi.twitch.tv" in line:
print(line);
msgg = "PONG :tmi.twitch.tv\r\n".encode();
irc.send(msgg);
print(msgg);
continue;
if not data:
print("Lost connection to Twitch, attempting to reconnect...");
self.twitch_connect(self.user, self.oauth);
return None;
#self.ping(data)
if self.check_has_message(data):
return [self.parse_message(line) for line in filter(None, data.split('\r\n'))];
It doesn’t work/
The thing is, it just STARTS timing out, it never works, it’s not after a while that it times out, it just NEVER works, times out from the moment I run the script