forked from nortti/tea_cah
Add bot_response() to API
This commit is contained in:
parent
845fb1bab2
commit
6689131bc7
1 changed files with 4 additions and 0 deletions
|
@ -69,6 +69,10 @@ class API:
|
||||||
line = b'PRIVMSG ' + recipient + b' :' + message
|
line = b'PRIVMSG ' + recipient + b' :' + message
|
||||||
self.serverthread_object.send_line_raw(line)
|
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):
|
def nick(self, nick):
|
||||||
"""Send a NICK command and update the internal nick tracking state"""
|
"""Send a NICK command and update the internal nick tracking state"""
|
||||||
with self.serverthread_object.nick_lock:
|
with self.serverthread_object.nick_lock:
|
||||||
|
|
Loading…
Reference in a new issue