From debe83ad9d540927f92783a8032caf99fe4c5443 Mon Sep 17 00:00:00 2001 From: Mango0x45 Date: Sun, 3 Jan 2021 19:27:40 +0100 Subject: Gonna readd this when I learn how to make a jail --- cogs/utils.py | 28 ++++++++++++++-------------- 1 file 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): -- cgit v1.2.3