Pass globals and locals to eval

This commit is contained in:
Zeva Rose 2021-06-27 19:43:45 -06:00
parent 71ab73b861
commit a4eec8c138

View file

@ -283,9 +283,9 @@ class DevCog(commands.Cog):
} }
try: try:
exec(f"async def func():{code}", args) exec(f"async def func():{code}", globals(), locals())
a = time() a = time()
response = await eval("func()", args) response = await eval("func()", globals(), locals())
if response is None or isinstance(response, discord.Message): if response is None or isinstance(response, discord.Message):
del args, code del args, code
return return