We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd66829 commit 9cf2948Copy full SHA for 9cf2948
user_handlers/msg_store.py
@@ -78,9 +78,10 @@ def store_message(update, context):
78
79
update_message(chat_id, msg_id, msg_text)
80
return
81
-
82
- if update.message.via_bot.id == context.bot.get_me().username:
83
- return
+
+ if update.message.via_bot:
+ if update.message.via_bot.id == context.bot.get_me().username:
84
+ return
85
'''
86
这里的 if 判断发言是用户还是频道或者是 group。
87
需要注意的是,这里并不能排除 BOT,因为 Telegram 为了向后兼容,Anon group 实体会附带有一个 from 参数,里面 is_bot 是 true. 如下
0 commit comments