From 036200f1f737ca7d948e844eb54eabd3249c0b57 Mon Sep 17 00:00:00 2001 From: iou1name Date: Mon, 31 Dec 2018 01:20:25 -0500 Subject: [PATCH] fix crypto sigfigs --- modules/crypto.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/crypto.py b/modules/crypto.py index 5cd2a69..43a2d00 100644 --- a/modules/crypto.py +++ b/modules/crypto.py @@ -25,7 +25,7 @@ def crypto(bot, trigger): symbol = trigger.group(3) if symbol: params["symbol"] = symbol - res = requests.get(URI + "/coin", params = params) + res = requests.get(URI + "/coin", params=params) if res.status_code in [400, 401]: return bot.msg(f"Error: {res.json()['error']}") res.raise_for_status() @@ -34,7 +34,7 @@ def crypto(bot, trigger): msg += f"\x0310Symbol\x03: \x0312{data['show_symbol']}\x03 | " msg += f"\x0310Rank\x03: \x0312{data['rank']}\x03 | " msg += f"\x0310Price\x03: \x0308" - msg += re.sub(r'(^.+\.\d\d).*', r'\1', data['price']) + "\x03 | " + msg += data['price'] + "\x03 | " msg += f"\x0310Markets\x03: \x0312{len(data['markets'])}\x03 | " msg += f"\x0310Market Cap\x03: \x0308" msg += re.sub(r'(^.+\.\d\d).*', r'\1', data['market_cap']) + "\x03"