mmpy_bot
mmpy_bot copied to clipboard
[Feature Request] Handler for message editions
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?
It is indeed possible. Currently the bot only intercepts to the "posted" event:
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.