diff options
author | Mango0x45 <thomasvoss@live.com> | 2021-01-03 16:05:02 +0000 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2021-01-03 16:05:02 +0000 |
commit | 1a984db7df3536d3fbb8674732f1f7976f342f1a (patch) | |
tree | 900a2c670df457ab727e83c404b9a047e688ae04 /cogs/utils.py | |
parent | 08cc3db7e6110865e1eef4f2ee1ace13f6d0cd2a (diff) | |
download | steve-bot-1a984db7df3536d3fbb8674732f1f7976f342f1a.tar steve-bot-1a984db7df3536d3fbb8674732f1f7976f342f1a.tar.gz steve-bot-1a984db7df3536d3fbb8674732f1f7976f342f1a.tar.bz2 steve-bot-1a984db7df3536d3fbb8674732f1f7976f342f1a.tar.lz steve-bot-1a984db7df3536d3fbb8674732f1f7976f342f1a.tar.xz steve-bot-1a984db7df3536d3fbb8674732f1f7976f342f1a.tar.zst steve-bot-1a984db7df3536d3fbb8674732f1f7976f342f1a.zip |
Hopefully this fixes stuff
Diffstat (limited to '')
-rwxr-xr-x | cogs/utils.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cogs/utils.py b/cogs/utils.py index c409e0c..7f48b78 100755 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -440,15 +440,13 @@ class Utils(commands.Cog): @commands.command(aliases=["calc"]) async def math(self, ctx, *, eqn: str): - test = subprocess.check_output("pwd", shell=True) - ctx.send(test) 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 '{eqn}' | bc -f bc_funcs/*", shell=True + 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: |