diff --git a/ircbot.py b/ircbot.py index 0d9276d..2de60d7 100644 --- a/ircbot.py +++ b/ircbot.py @@ -69,6 +69,10 @@ class API: line = b'PRIVMSG ' + recipient + b' :' + message self.serverthread_object.send_line_raw(line) + def bot_response(self, recipient, message): + """Prefix message with ZWSP and convert from unicode to bytestring.""" + self.msg(recipient, ('\u200b' + message).encode('utf-8')) + def nick(self, nick): """Send a NICK command and update the internal nick tracking state""" with self.serverthread_object.nick_lock: