Can pass data from message reception to message response
This commit is contained in:
parent
e881fc8ba5
commit
30da270557
3 changed files with 6 additions and 6 deletions
4
bot.py
4
bot.py
|
@ -158,9 +158,9 @@ class Bot(BotCaps):
|
|||
return False
|
||||
|
||||
|
||||
def receive_message(self, srv, raw_msg, private = False):
|
||||
def receive_message(self, srv, raw_msg, private=False, data=None):
|
||||
"""Queued the message for treatment"""
|
||||
self.msg_queue.put_nowait((srv, raw_msg, datetime.now(), private))
|
||||
self.msg_queue.put_nowait((srv, raw_msg, datetime.now(), private, data))
|
||||
|
||||
# Launch a new thread if necessary
|
||||
if self.msg_queue.qsize() > self.msg_thrd_size:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue