bot icon indicating copy to clipboard operation
bot copied to clipboard

Allow evaluating code via a context menu?

Open Robin5605 opened this issue 3 years ago • 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.

Robin5605 avatar Sep 02 '22 23:09 Robin5605

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).

wookie184 avatar Nov 02 '22 20:11 wookie184

I'll close this issue for now, if anyone wants to pursue it further an issue in https://github.com/python-discord/meta first would probably be best so it can get more discussion.

wookie184 avatar Jun 21 '23 14:06 wookie184

This idea has been bounced around for a while now. A few people have mentioned they'd like it and there's not really been a reason against it (to my knowledge). For the concern about confusion, a description of the functionality can be shown before the user hits run.

Anonymous4045 avatar Aug 27 '24 02:08 Anonymous4045