Compare commits

...

3 Commits

Author SHA1 Message Date
jw c616de64b9
Merge pull request #59 from scoobybejesus/patch-7
top() to include low ranked monero
2021-04-03 07:53:42 -04:00
scoobybejesus 44ca92136d
top() to include two low rankers, if monero is one 2021-04-02 21:39:22 -04:00
scoobybejesus b034c6b35e
top() to include low ranked monero 2021-04-02 21:35:52 -04:00
1 changed files with 3 additions and 1 deletions

View File

@ -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[-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")