From c7d81b26dff274442311f33d9b7681eab4d67a0c Mon Sep 17 00:00:00 2001 From: Lonami Date: Sat, 9 May 2020 18:15:41 +0200 Subject: [PATCH] Nicer .tts behaviour with replies --- stdplugins/tl.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stdplugins/tl.py b/stdplugins/tl.py index 84bd24b..017e380 100644 --- a/stdplugins/tl.py +++ b/stdplugins/tl.py @@ -195,11 +195,11 @@ async def _(event): async def _(event): await event.delete() - if event.is_reply: + ts = event.raw_text.split(maxsplit=1) + text = None if len(ts) < 2 else ts[1] + + if not text and event.is_reply: text = (await event.get_reply_message()).raw_text - else: - ts = event.raw_text.split(maxsplit=1) - text = None if len(ts) < 2 else ts[1] if not text: return