-
Notifications
You must be signed in to change notification settings - Fork 7
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
Message edits are incapable of triggering commands #18
Comments
Could be useful, however, most bots do not implement this even if it is supported by the module. This is to stop the bot from going back through messages and replying multiple times due to the user fixing a spelling mistake. It's normally safer to just let the user send another command. |
Some bots (e.g. MathBot) do track edits, but these often take large inputs (such as entire TeX expressions or the likes). Since the majority of owen's commands are only two words long, I don't think it's (currently) a high priority at all. |
Fully agreed @9nine9nine9, as this would also require a |
Current functionality
owenbot-hs/src/EventHandler.hs
Lines 58 to 59 in ebbe993
As can be seen in the above highlighted lines of code, commands can currently only get triggered by creating a new message.
Reasoning
Message edits are not capable of triggering commands. It would be a nice addition if they would also get processed on message edits, as our
:
prefix makes Discord emoji autocompletion typos quite common.(e.g.
:fortune → 🥠 | :fortune:
)Potential solution
Pattern match on the
MessageUpdate Message
Event data constructor in order to also detect message edits. Further modularise the message creation event handler into its own function, which should be triggered on both event sub-types.E.g.
The text was updated successfully, but these errors were encountered: