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

Can the code be modified to only forward edited messages? #7

Closed
oscarstv opened this issue Feb 6, 2022 · 2 comments
Closed

Can the code be modified to only forward edited messages? #7

oscarstv opened this issue Feb 6, 2022 · 2 comments

Comments

@oscarstv
Copy link

oscarstv commented Feb 6, 2022

Thank you, I’m trying to do that, don’t know if your code can be the base code for getting that done.

@radinshayanfar
Copy link
Owner

Hi @oscarstv
TDlib utilizes different Update objects. To handle edited messages, you can add a handler forupdateMessageContent object:

tg.add_update_handler("updateMessageContent", message_edit_handler)

where message_edit_handler is the function that is called every time a message is edited. Just add it before the last line of the app.py (i.e. before tg.idle()).

@oscarstv
Copy link
Author

oscarstv commented Feb 6, 2022

@radinshayanfar Thank you very much 👍

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

2 participants