diff options
| author | 2018-10-30 23:01:16 +0000 | |
|---|---|---|
| committer | 2018-10-30 23:01:16 +0000 | |
| commit | 7680c698f23e012d76e772a3e4f21e1aa22ab224 (patch) | |
| tree | 3d1986591ec338863982331f43b90ee470ac1a33 | |
| parent | Merge branch 'hemlock/format-block-fixing' into 'master' (diff) | |
Fixed eval to allow ```python in messages.
| -rw-r--r-- | bot/cogs/eval.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/eval.py b/bot/cogs/eval.py index faecdf145..421fa5b53 100644 --- a/bot/cogs/eval.py +++ b/bot/cogs/eval.py @@ -185,7 +185,7 @@ async def func(): # (None,) -> Any async def eval(self, ctx, *, code: str): """ Run eval in a REPL-like format. """ code = code.strip("`") - if code.startswith("py\n"): + if re.match('py(thon)?\n', code): code = "\n".join(code.split("\n")[1:]) if not re.search( # Check if it's an expression |