Skip to content
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

当群内有人使用以频道身份发言或者是 anonymous admin 发言的时候会报错 #20

Closed
X1A0CA1 opened this issue Oct 30, 2022 · 1 comment

Comments

@X1A0CA1
Copy link
Contributor

X1A0CA1 commented Oct 30, 2022

上报错代码

2022-10-30 06:23:47,825 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/telegram/ext/dispatcher.py", line 555, in process_update
    handler.handle_update(update, self, check, context)
  File "/usr/local/lib/python3.7/site-packages/telegram/ext/handler.py", line 198, in handle_update
    return self.callback(update, context)
  File "/app/user_handlers/msg_store.py", line 41, in store_message
    or update.message.from_user.is_bot \
AttributeError: 'NoneType' object has no attribute 'from_user'
@X1A0CA1
Copy link
Contributor Author

X1A0CA1 commented Oct 30, 2022

简单的看了下使用模块的文档,貌似是以频道发言的时候没有 from_user 这个字段,只有sender_chat 这个字段

image

https://docs.python-telegram-bot.org/en/v20.0a4/telegram.message.html

@Taosky Taosky closed this as completed in 76bd1e5 Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant