diff options
Diffstat (limited to 'cogs/utils.py')
-rwxr-xr-x | cogs/utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cogs/utils.py b/cogs/utils.py index ec1e09b..ae5a84b 100755 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -382,6 +382,10 @@ class Utils(commands.Cog): output = ", ".join([*commands]) await ctx.send(f"```List of custom commands:\n{output}```") + @commands.command(aliases=['eval', 'calc']) + async def math(self, ctx, *, equation: str = "2 + 2"): + """Evaluate a mathematical equation""" + await ctx.send(f'`{equation} = {eval(equation)}`') def setup(bot): bot.add_cog(Utils(bot)) |