return -> yield

This commit is contained in:
Felipe M 2020-09-17 16:09:31 +02:00
parent 2e7326cef7
commit 8bf77f91f1
Signed by: fmartingr
GPG Key ID: 716BC147715E716F
2 changed files with 2 additions and 2 deletions

View File

@ -12,6 +12,6 @@ class PingPlugin(Plugin):
if message.text == "!ping":
delta = datetime.now() - message.date
delta_ms = delta.seconds * 1000 + delta.microseconds / 1000
return Message(
yield Message(
chat=message.chat, reply_to=message.id, text=f"pong! ({delta_ms}ms)",
)

View File

@ -8,4 +8,4 @@ class LoquitoPlugin(Plugin):
@classmethod
async def on_message(cls, message):
if "lo quito" in message.text.lower():
return Message(chat=message.chat, reply_to=message.id, text="Loquito tu.",)
yield Message(chat=message.chat, reply_to=message.id, text="Loquito tu.",)