txlyre 2 days ago
parent
commit
ada11976bf
1 changed files with 7 additions and 3 deletions
  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)