Hello Everyone,
I am having issues with this current script. I am trying to create a Twitch bot in Python. Any help with this would be much appreciated. The issue that I am having is it is not replying back with the message Hello there, when I type in "Hello"
import string
from Socket import openSocket, sendMessage
from Initialize import joinRoom
from Read import getUser, getMessage
s = openSocket()
joinRoom(s)
readbuffer = ""
while True:
readbuffer = readbuffer + s.recv(1024)
temp = string.split(readbuffer, "\n")
readbuffer = temp.pop()
for line in temp:
print(line)
if "PING" in line:
s.send(line.replace("PING", "PONG"))
break
user = getUser(line)
message = getMessage(line)
print user + " typed :" + message
if "Hello" in message:
sendMessage(s, "Hello there")