diff options
author | Mango0x45 <thomasvoss@live.com> | 2021-01-03 18:27:40 +0000 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2021-01-03 18:27:40 +0000 |
commit | debe83ad9d540927f92783a8032caf99fe4c5443 (patch) | |
tree | 546c510d97714418e3158a9122d67a09e060e020 /cogs/utils.py | |
parent | d0747f3aca848525622cd6aa177434e8e2ef3ad3 (diff) | |
download | steve-bot-debe83ad9d540927f92783a8032caf99fe4c5443.tar steve-bot-debe83ad9d540927f92783a8032caf99fe4c5443.tar.gz steve-bot-debe83ad9d540927f92783a8032caf99fe4c5443.tar.bz2 steve-bot-debe83ad9d540927f92783a8032caf99fe4c5443.tar.lz steve-bot-debe83ad9d540927f92783a8032caf99fe4c5443.tar.xz steve-bot-debe83ad9d540927f92783a8032caf99fe4c5443.tar.zst steve-bot-debe83ad9d540927f92783a8032caf99fe4c5443.zip |
Gonna readd this when I learn how to make a jail
Diffstat (limited to 'cogs/utils.py')
-rwxr-xr-x | cogs/utils.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/cogs/utils.py b/cogs/utils.py index 7f48b78..30a2c19 100755 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -438,20 +438,20 @@ class Utils(commands.Cog): output = ", ".join([*commands]) await ctx.send(f"```List of custom commands:\n{output}```") - @commands.command(aliases=["calc"]) - async def math(self, ctx, *, eqn: str): - try: - # Allow for proper absolute value notation - pipes = eqn.count("|") - eqn = eqn.replace("|", "abs(", pipes // 2).replace("|", ")", pipes // 2) - - result = subprocess.check_output( - f"echo 'scale = 10; {eqn}' | bc bc_funcs/*", shell=True - ) - await ctx.send(result.decode("utf-8").replace("\\\n", "").strip()) - except subprocess.CalledProcessError as err: - print(err) - await ctx.send("Something went wrong") +# @commands.command(aliases=["calc"]) +# async def math(self, ctx, *, eqn: str): +# try: +# # Allow for proper absolute value notation +# pipes = eqn.count("|") +# eqn = eqn.replace("|", "abs(", pipes // 2).replace("|", ")", pipes // 2) +# +# result = subprocess.check_output( +# f"echo 'scale = 10; {eqn}' | bc bc_funcs/*", shell=True +# ) +# await ctx.send(result.decode("utf-8").replace("\\\n", "").strip()) +# except subprocess.CalledProcessError as err: +# print(err) +# await ctx.send("Something went wrong") @commands.command() async def retime(self, ctx, start_sec, end_sec, frames=0, framerate=30): |