Queer European MD passionate about IT
瀏覽代碼

Get inline_query_id from update

Davte 5 年之前
父節點
當前提交
8ee798af5e
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      davtelepot/bot.py

+ 2 - 0
davtelepot/bot.py

@@ -1060,6 +1060,8 @@ class Bot(TelegramBot, ObjectWithDatabase):
         If `results` is a string, cast it to proper type (list of dicts having
             certain keys). See utilities.make_inline_query_answer for details.
         """
+        if inline_query_id is None and isinstance(update, dict):
+            inline_query_id = self.get_message_identifier(update)
         results = make_inline_query_answer(results)
         return await self.answerInlineQuery(
             inline_query_id=inline_query_id,