From ea2c267eaf4f6559211d824a3a624ef9a920ac69 Mon Sep 17 00:00:00 2001 From: yasirarism <55983182+yasirarism@users.noreply.github.com> Date: Wed, 21 Dec 2022 07:37:34 +0700 Subject: [PATCH] Update dev.py --- misskaty/plugins/dev.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misskaty/plugins/dev.py b/misskaty/plugins/dev.py index 22cadeb5..e0147c79 100644 --- a/misskaty/plugins/dev.py +++ b/misskaty/plugins/dev.py @@ -83,7 +83,7 @@ async def evaluation_cmd_t(_, m): cmd = m.text.split(" ", maxsplit=1)[1] except IndexError: return await status_message.edit("__No evaluate message!__") - p = print + old_stderr = sys.stderr old_stdout = sys.stdout redirected_output = sys.stdout = io.StringIO() @@ -127,6 +127,7 @@ async def evaluation_cmd_t(_, m): async def aexec(code, client, message): + p = print exec( "async def __aexec(client, message): " + "".join(f"\n {l_}" for l_ in code.split("\n"))