Open
Description
Hi,
The bot is unable to handle asyncio concurrent messagefunction calls. If you add sleep to any listen function - the bot will be unable to handle any other messages until the sleep is released.
Here is an example. If you type !test to the bot it will enter the function test and sleep for 5 seconds. If during those 5 seconds you tell the bot !hi it won't reply to you until the !test function is released.
Expected functionality would be ability to handle multiple requests concurrently
@listen_to("^!test")
async def test(self, message: Message):
self.driver.reply_to(message, "Start Sleep")
time.sleep(5)
self.driver.reply_to(message, "End Sleep")
@listen_to("^!hi")
async def hi(self, message: Message):
self.driver.reply_to(message, "Hello")