You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to re-evaluate the same snippet if it has been edited, using the same message via an emoji interaction.
Specification
An emoji like this one 🔄 should be added to every evaluated user message, and if the user react with the same emoji on his message (along with the bot), a new eval task should trigger with the updated message content. If the message content wasn’t updated since last eval, the new eval task should silently cancel. Either way, the user reaction should be deleted and be ready to be re-evaluated again, once the last eval have finished.
Rationale
For now, when a eval didn’t go as plan, the user need to copy the snippet, paste it, modify it, and then send it. This take some time and some place in the chat, plus copy pasting text with markdown can be quite frustrating. Let’s make it easier!
I think this is a good idea, specially for people who can make mistakes in the eval when typing directly like me - it will be very useful to just delete bot's messages, press up arrow, edit a few typo and react 🔄 to re-evaluate the code.
One security concern comes to mind - if use keeps adding and removing 🔄 how will you stop the bot from evaluate the code over and over? ( I assume 🔄 is reacted by bot, so user can easily spam click on it )
Activity
[-]Re-evaluate message with emoji reaction[/-][+]Re-evaluate snippet with emoji reaction[/+]ikuyarihS commentedon Dec 4, 2019
I think this is a good idea, specially for people who can make mistakes in the eval when typing directly like me - it will be very useful to just delete bot's messages, press up arrow, edit a few typo and react 🔄 to re-evaluate the code.
One security concern comes to mind - if use keeps adding and removing 🔄 how will you stop the bot from evaluate the code over and over? ( I assume 🔄 is reacted by bot, so user can easily spam click on it )
Akarys42 commentedon Dec 4, 2019
A simple cooldown should be enough, like maximum two re-eval per 10 seconds, right?
Akarys42 commentedon Dec 25, 2019
Hi, can I work on it?
MarkKoz commentedon Dec 25, 2019
Don't show the reaction if the message is not edited. After a re-run, remove the reaction. Add it back if the message is edited once again.
A 10 second cooldown sounds reasonable.