1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-26 21:14:19 +00:00

🐛 Fix conversation.run behaviour

This commit is contained in:
Steffo 2020-12-28 18:29:07 +01:00
parent 0644919a96
commit d47a167346

View file

@ -96,13 +96,12 @@ class Command:
"""
A conversation which runs the command.
"""
log.debug(f"Getting a message from the queue...")
try:
msg: bullet.Message = (_sentry | wrench.Type(bullet.Message)).get_nowait()
except asyncio.QueueEmpty:
log.debug(f"No message found in the queue, returning...")
return
log.debug(f"Getting a bullet from the queue...")
b: bullet.Bullet = await _sentry
if not isinstance(b, bullet.Message):
log.debug(f"Bullet is not a message, returning...")
msg: bullet.Message = b
log.debug(f"Getting text of {msg}...")
text = await msg.text()