python-discord/bot

Allow evaluating code via a context menu?

Robin5605 opened this issue · 3 comments

PR: #2269
I think it would be handy if you could write out your code, and then right click and eval the code. This also works with other people's code, in case you're curious on the result.

The actual implementation shouldn't be hard either, the run_job function is already there, all that needs to be done is have it moved into the context menu callback.

At the moment I'm not really convinced this is worth having, as I'm not sure what benefit this adds over just using the command.

It seems potentially confusing if it only worked on your own messages, but also I think allowing people to run it on other's code will often result in errors (when using the eval command the code needs to be completely standalone, often code people post wouldn't be).