diff options
author | romangraef <roman.graef@gmail.com> | 2018-03-11 18:35:47 +0100 |
---|---|---|
committer | romangraef <roman.graef@gmail.com> | 2018-03-11 18:35:47 +0100 |
commit | f3cbd5100b205d9d9e7f3b3b27b7c37b69834aac (patch) | |
tree | ba56c77275647907067d87b185bb5a65513bf328 /modules/builtins/eval.py | |
parent | 58f62605992da8fe6f107fc850aa4f18ba4ec274 (diff) | |
download | telegramuserbot-f3cbd5100b205d9d9e7f3b3b27b7c37b69834aac.tar.gz telegramuserbot-f3cbd5100b205d9d9e7f3b3b27b7c37b69834aac.tar.bz2 telegramuserbot-f3cbd5100b205d9d9e7f3b3b27b7c37b69834aac.zip |
fixed eval und stuff
Diffstat (limited to 'modules/builtins/eval.py')
-rw-r--r-- | modules/builtins/eval.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/builtins/eval.py b/modules/builtins/eval.py index dfbdd57..77b82ea 100644 --- a/modules/builtins/eval.py +++ b/modules/builtins/eval.py @@ -6,6 +6,7 @@ from lib import * @name('eval') @description('evals a given piece of python code') def eval_command(ctx: CommandContext): + ctx.edit("```\n%s\n```" % ctx.rest_content) try: block = ast.parse(ctx.rest_content, mode='exec') last = ast.Expression(block.body.pop().value) @@ -23,7 +24,7 @@ def eval_command(ctx: CommandContext): 'client': ctx.client, 'print': lambda *content, stdout=False: - print(*content) + print(*content) if stdout else ctx.respond('\t'.join(map(str, content))) } |