diff options
author | 2022-07-03 20:48:53 +0400 | |
---|---|---|
committer | 2022-07-03 20:48:53 +0400 | |
commit | ff543a2f4e1a312fbb24fc8987041b12f1b44138 (patch) | |
tree | 8fed262dd0ba73fb5c77ae1a2b05b4a497585451 | |
parent | Merge pull request #2196 from python-discord/always-prepend-guild-name-to-gui... (diff) | |
parent | Merge branch 'main' into timeit_setup_help (diff) |
Merge pull request #2201 from Numerlor/timeit_setup_help
Improve help of eval and timeit
-rw-r--r-- | bot/exts/utils/snekbox.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bot/exts/utils/snekbox.py b/bot/exts/utils/snekbox.py index 98dfd2efa..48bb1d3de 100644 --- a/bot/exts/utils/snekbox.py +++ b/bot/exts/utils/snekbox.py @@ -401,7 +401,7 @@ class Snekbox(Cog): break log.info(f"Re-evaluating code from message {ctx.message.id}:\n{code}") - @command(name="eval", aliases=("e",)) + @command(name="eval", aliases=("e",), usage="<code, ...>") @guild_only() @redirect_output( destination_channel=Channels.bot_commands, @@ -418,12 +418,15 @@ class Snekbox(Cog): block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears. + If multiple codeblocks are in a message, all of them will be joined and evaluated, + ignoring the text outside of them. + We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it! """ await self.run_job("eval", ctx, "\n".join(code)) - @command(name="timeit", aliases=("ti",)) + @command(name="timeit", aliases=("ti",), usage="[setup_code] <code, ...>") @guild_only() @redirect_output( destination_channel=Channels.bot_commands, |