From a4eec8c138631accbe2c40f0d0ef413fbb036d52 Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Sun, 27 Jun 2021 19:43:45 -0600 Subject: [PATCH] Pass globals and locals to eval --- jarvis/cogs/dev.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jarvis/cogs/dev.py b/jarvis/cogs/dev.py index bb90238..5160580 100644 --- a/jarvis/cogs/dev.py +++ b/jarvis/cogs/dev.py @@ -283,9 +283,9 @@ class DevCog(commands.Cog): } try: - exec(f"async def func():{code}", args) + exec(f"async def func():{code}", globals(), locals()) a = time() - response = await eval("func()", args) + response = await eval("func()", globals(), locals()) if response is None or isinstance(response, discord.Message): del args, code return