kcd-discord-bot-v1
kcd-discord-bot-v1 copied to clipboard
Editing messages result in multiple thank-you's.
When someone has thanked another person with the ?thanks
command, and edits their message, the bot ends up with sending multiple someone has thanked you
messages to the "thanks channel".
For an example see:
https://discord.com/channels/715220730605731931/715220730605731934/847767417115246612
https://discord.com/channels/715220730605731931/760327168533725184/847767420194127902
Yep, I'd considered this happening and figured it was not a big enough issue. I had thought about instead sending a message that says you can't edit commands, but I like that if I get the blog post command wrong I can edit it until it's right.
Maybe we could have different behavior depending on the command. Like a default of just running the command again and the individual commands can override that.
So the thanks command could override it and only rerun if the original message didn't send a thanks already (we should be able to detect that the original message had a typo in ?thanks
). If it's just a thanks command syntax typo fix then it'll run it like usual, otherwise it'll message them and tell them they need to send a new message.
But then.... They'd probably send a new message anyway right? And we'd be right where we started: two thanks messages sent. The solution to that would be to update the thanks message that was sent. Maybe that's the solution. I don't have bandwidth to work on that, but I think it's the right solution.