diff options
author | Mango0x45 <thomasvoss@live.com> | 2021-01-03 15:50:08 +0000 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2021-01-03 15:50:08 +0000 |
commit | 08cc3db7e6110865e1eef4f2ee1ace13f6d0cd2a (patch) | |
tree | 0272b1fd3a4373097c9e03b7ec8869b34613999a /cogs | |
parent | e0abd677283eef8289fbd8b0fe599f869b7e2c1d (diff) | |
download | steve-bot-08cc3db7e6110865e1eef4f2ee1ace13f6d0cd2a.tar steve-bot-08cc3db7e6110865e1eef4f2ee1ace13f6d0cd2a.tar.gz steve-bot-08cc3db7e6110865e1eef4f2ee1ace13f6d0cd2a.tar.bz2 steve-bot-08cc3db7e6110865e1eef4f2ee1ace13f6d0cd2a.tar.lz steve-bot-08cc3db7e6110865e1eef4f2ee1ace13f6d0cd2a.tar.xz steve-bot-08cc3db7e6110865e1eef4f2ee1ace13f6d0cd2a.tar.zst steve-bot-08cc3db7e6110865e1eef4f2ee1ace13f6d0cd2a.zip |
test
Diffstat (limited to 'cogs')
-rwxr-xr-x | cogs/utils.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cogs/utils.py b/cogs/utils.py index b3389d3..c409e0c 100755 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -5,7 +5,6 @@ import json import subprocess from collections import namedtuple from datetime import timedelta - # forgot to import this and ended up looking mentally unstable # troll literally pointed out atleast 4 things I did wrong in 3 lines of code from random import choice, randint @@ -441,15 +440,15 @@ class Utils(commands.Cog): @commands.command(aliases=["calc"]) async def math(self, ctx, *, eqn: str): - bc_funcs = r"/home/thomas/Steve-Bot/bc_funcs" - + 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 '{eqn}' | bc -f bc_funcs/*", shell=True ) await ctx.send(result.decode("utf-8").replace("\\\n", "").strip()) except subprocess.CalledProcessError as err: |