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

[Feature Request] Handler for message editions #445

Open
fabien-anabasis opened this issue Sep 29, 2023 · 1 comment
Open

[Feature Request] Handler for message editions #445

fabien-anabasis opened this issue Sep 29, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@fabien-anabasis
Copy link

fabien-anabasis commented Sep 29, 2023

Here is a scenario that often happen with my bot:

  • someone writes a message to the bot, but makes an error due to fingers being too large, or something
  • so, the user decides to edit its message, as usual when a typo is made
  • unfortunately, there's no handler for that, and the bot ignores the edition of the previous message

Would it be possible to add a handler for this kind of situations?

@attzonko attzonko added enhancement New feature or request help wanted Extra attention is needed labels Oct 3, 2023
@attzonko
Copy link
Owner

attzonko commented Oct 3, 2023

It is indeed possible. Currently the bot only intercepts to the "posted" event:
image

I theory someone could add the capability to intercept the "post_edited" event. It might be as simple as change the if condition to, assuming of course that the data sent for both events is the same.
if event_action in ["posted", "post_edited"]:

You could try it and if it works make a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants