Pass globals and locals to eval
This commit is contained in:
parent
71ab73b861
commit
a4eec8c138
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue