Queer European MD passionate about IT
瀏覽代碼

Set already_sent value, otherwise it may be referenced before assignment

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

+ 1 - 0
davtelepot/bot.py

@@ -965,6 +965,7 @@ class Bot(TelegramBot, ObjectWithDatabase):
         If photo was already sent by this bot and `use_stored_file_id` is set
             to True, use file_id (it is faster and recommended).
         """
+        already_sent = False
         if 'message' in update:
             update = update['message']
         if chat_id is None and 'chat' in update: