From b034c6b35ecabef8628c96106aa3a402afe6c33e Mon Sep 17 00:00:00 2001 From: scoobybejesus <21372487+scoobybejesus@users.noreply.github.com> Date: Fri, 2 Apr 2021 21:35:52 -0400 Subject: [PATCH 1/2] top() to include low ranked monero --- price.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/price.py b/price.py index cb9a83b..0f123f0 100644 --- a/price.py +++ b/price.py @@ -460,7 +460,9 @@ def top(bot, trigger): market_cap_usd = float(i['market_cap']) rounded_mcap = trim_mcap(market_cap_usd) topXstring += "{0}. {1} ${2} | ".format(rank, symbol, rounded_mcap) #TODO: add price_usd, rounded - bot.say(topXstring[:-2]) + xmr_str = topXstring[-16:] # monero is at the end, and might get truncated + final = (topXstring[:140] + " {...} " + xmr_str) if len(topXstring) > 165 else topXstring + bot.say(final[:-2]) except: bot.say("The use is 'top' and then a digit 1 - 20") From 44ca92136deabb67779e728852d781421ff3ec8b Mon Sep 17 00:00:00 2001 From: scoobybejesus <21372487+scoobybejesus@users.noreply.github.com> Date: Fri, 2 Apr 2021 21:39:22 -0400 Subject: [PATCH 2/2] top() to include two low rankers, if monero is one --- price.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/price.py b/price.py index 0f123f0..0027005 100644 --- a/price.py +++ b/price.py @@ -460,8 +460,8 @@ def top(bot, trigger): market_cap_usd = float(i['market_cap']) rounded_mcap = trim_mcap(market_cap_usd) topXstring += "{0}. {1} ${2} | ".format(rank, symbol, rounded_mcap) #TODO: add price_usd, rounded - xmr_str = topXstring[-16:] # monero is at the end, and might get truncated - final = (topXstring[:140] + " {...} " + xmr_str) if len(topXstring) > 165 else topXstring + xmr_str = topXstring[-32:] # monero is at the end, and might get truncated + final = (topXstring[:125] + " {...} " + xmr_str) if len(topXstring) > 165 else topXstring bot.say(final[:-2]) except: bot.say("The use is 'top' and then a digit 1 - 20")