Add eval command

This commit is contained in:
Zeva Rose 2021-06-27 19:11:54 -06:00
parent 5e8701e1f3
commit 4ec596ae40

View file

@ -236,6 +236,12 @@ class DevCog(commands.Cog):
output = subprocess.check_output(["cloc", "."]).decode("UTF-8")
await ctx.send(f"```\n{output}\n```")
@commands.is_owner()
@commands.command(name=eval)
async def _eval(self, ctx, *, code: str):
output = eval(code, locals=locals(), globals=globals())
await ctx.send(f"```{output}```")
def setup(bot):
bot.add_cog(DevCog(bot))