def send_msg(word, word_eol, userdata): global whispering if not whispering: whispering = True hc.prnt(word_eol[0]) if re.match(twitch, hc.get_info("server")) is not None and len(word) > 2 and not word[1].startswith("#"): hc.command("privmsg #jtv :/w {}".format(word_eol[1])) hc.command("query -nofocus " + word_eol[1]) if re.match(botnick, me, re.IGNORECASE) is not None: if re.match(twitch, serv) is not None and chan == ts_params["channel"] and ts_params["active"]: ttsbot(word, word_eol, userdata) whispering = False return hc.EAT_ALL