Fix Config, eval
This commit is contained in:
parent
0a0c4d84d8
commit
c580e1a7fb
2 changed files with 6 additions and 2 deletions
|
@ -338,8 +338,12 @@ class DevCog(commands.Cog):
|
|||
del args, code
|
||||
return
|
||||
|
||||
if isinstance(response, str):
|
||||
response = response.replace("`", "")
|
||||
|
||||
await ctx.send(
|
||||
f"```py\n{self.resolve_variable(response.replace('`', ''))}````{type(response).__name__} | {(time() - a) / 1000} ms`"
|
||||
f"```py\n{self.resolve_variable(response)}```"
|
||||
+ f"`{type(response).__name__} | {(time() - a) / 1000} ms`"
|
||||
)
|
||||
except Exception:
|
||||
await ctx.send(f"Error occurred:```\n{traceback.format_exc()}```")
|
||||
|
|
|
@ -7,7 +7,7 @@ except ImportError:
|
|||
from yaml import Loader
|
||||
|
||||
|
||||
class Config:
|
||||
class Config(object):
|
||||
def __new__(cls, *args, **kwargs):
|
||||
it = cls.__dict__.get("it")
|
||||
if it is not None:
|
||||
|
|
Loading…
Add table
Reference in a new issue