diff options
author | Mango0x45 <thomasvoss@live.com> | 2020-08-18 20:40:28 +0000 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2020-08-18 20:40:28 +0000 |
commit | 2690371183f70ab6b6912a29aa47589a202caac5 (patch) | |
tree | 3950461e20bf50056d465a9a42fdc183035c3ce2 /cogs/utils.py | |
parent | 490420649fe8a0d5c729493a09bb1b91b92eebdd (diff) | |
download | steve-bot-2690371183f70ab6b6912a29aa47589a202caac5.tar steve-bot-2690371183f70ab6b6912a29aa47589a202caac5.tar.gz steve-bot-2690371183f70ab6b6912a29aa47589a202caac5.tar.bz2 steve-bot-2690371183f70ab6b6912a29aa47589a202caac5.tar.lz steve-bot-2690371183f70ab6b6912a29aa47589a202caac5.tar.xz steve-bot-2690371183f70ab6b6912a29aa47589a202caac5.tar.zst steve-bot-2690371183f70ab6b6912a29aa47589a202caac5.zip |
Added math()
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)) |