-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chat_start.py中的get_chat_member报错 #57
Comments
ai分析过的建议:
Python if not update.effective_user.id: 使用 Telegram API 检查用户是否存在try:
Python chat_member = context.bot.get_chat_member(chat_id=update.message.chat.id, user_id=update.effective_user.id) if chat_member.status not in ("administrator", "member"):
Python try:
Python if not update.message.chat.id: chat_member = context.bot.get_chat_member(chat_id=update.message.chat.id, user_id=update.effective_user.id) if chat_member.status == "left":
Python dispatcher.add_error_handler(error_callback) def error_callback(update, context): 其他建议: |
Telegram 对于群组成员数量的限制并没有一个固定的具体数字,而是根据一些因素进行动态调整。这些因素可能包括群组的活跃度、成员之间的交互频率、群组设置等等。 一般来说,当群组的成员数量达到一定程度时,Telegram 就会开始限制非管理员成员查看完整成员列表。这样做是为了保护群组成员的隐私,并减少滥用或侵犯隐私的可能性。 虽然 Telegram 并没有公开透露这个限制的具体数值,但根据社区的观察和经验,一般来说,当群组的成员数量达到几千人甚至更多时,就可能会出现这种限制。然而,这并不是一个确定的规则,因此实际情况可能会有所不同。 |
代码位置:
telegram-search-bot/user_handlers/chat_start.py
Line 40 in 294e08c
get_chat_member
概述:
docker报错:
Bot:xxxxxxxxxx:dispatcher - ERROR - No error handlers are registered, logging exception. Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/telegram/ext/dispatcher.py", line 557, in process_update handler.handle_update(update, self, check, context) File "/usr/local/lib/python3.9/site-packages/telegram/ext/handler.py", line 199, in handle_update return self.callback(update, context) File "/app/user_handlers/chat_start.py", line 40, in start chat_member = context.bot.get_chat_member( File "/usr/local/lib/python3.9/site-packages/telegram/bot.py", line 134, in decorator result = func(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/telegram/bot.py", line 3474, in get_chat_member result = self._post('getChatMember', data, timeout=timeout, api_kwargs=api_kwargs) File "/usr/local/lib/python3.9/site-packages/telegram/bot.py", line 299, in _post return self.request.post( File "/usr/local/lib/python3.9/site-packages/telegram/utils/request.py", line 361, in post result = self._request_wrapper( File "/usr/local/lib/python3.9/site-packages/telegram/utils/request.py", line 279, in _request_wrapper raise BadRequest(message) telegram.error.BadRequest: User not found
The text was updated successfully, but these errors were encountered: