Oh ok that makes sense. At the moment I need to regex a string to get Usernames, the message and the channel it was sent in. Is there a possibility I’m doing this wrong and there is an easier way where all this data is separate from one another and accessible by parsing a JSON object?
username = re.search(r'\w+', response).group(0)
chat_msg = re.compile(r'^:\w+!\w+@\w+\.tmi\.twitch\.tv PRIVMSG #\w+ :')
message = chat_msg.sub("", response).rstrip('\n')