txlyre há 3 dias atrás
pai
commit
ada11976bf
1 ficheiros alterados com 7 adições e 3 exclusões
  1. 7 3
      openkriemy.py

+ 7 - 3
openkriemy.py

@@ -36,9 +36,13 @@ bot.markov = markov
 
 @bot.on(InlineQuery)
 async def on_inline_query(event):
-  await event.answer([
-    event.builder.article("Результат.", await run(event.text)),
-  ])
+    text = event.text.strip()
+    if not text:
+      return
+
+    await event.answer([
+        event.builder.article("Результат.", text=await run(text)),
+    ])
 
 
 @bot.on(NewMessage)