From 7680c698f23e012d76e772a3e4f21e1aa22ab224 Mon Sep 17 00:00:00 2001 From: Jeremiah Boby Date: Tue, 30 Oct 2018 23:01:16 +0000 Subject: Fixed eval to allow ```python in messages. --- bot/cogs/eval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3