diff --git a/plugins/python_runner/python_runner.py b/plugins/python_runner/python_runner.py index 452cb7ea5922f1427bba02ed58dafeb1bad021b9..e9e44410d1786364ce88fa8748b35dc1088dafae 100644 --- a/plugins/python_runner/python_runner.py +++ b/plugins/python_runner/python_runner.py @@ -32,11 +32,7 @@ def exec_python_code(bot: CQHttp, context=None, args=None): for item in pattern.findall(code): code = code.replace("&#{};".format( item), bytes([int(item)]).decode("utf-8")) - code = f""" - CALLER_UID={context['user_id']}\n - CALLER_NICKNAME={str(context['sender']['nickname']).encode()}.decode()\n - CALLER_CARD={str(context['sender']['card']).encode()}.decode()\n - """+code + code = f"""CALLER_UID={context['user_id']}\nCALLER_NICKNAME={str(context['sender']['nickname']).encode()}.decode()\nCALLER_CARD={str(context['sender']['card']).encode()}.decode()\n"""+code run_python_in_docker(callback, code)