From da774038abcef2c5af52b6a8ffffd9cab48ecaa5 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 12 Apr 2021 23:41:46 +0000 Subject: [PATCH] ._. --- price.py | 8 ++++++-- trifling.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/price.py b/price.py index 91a9b1d..b698809 100644 --- a/price.py +++ b/price.py @@ -165,8 +165,12 @@ def gecko(bot, trigger): athusd = j['market_data']['ath']['usd'] change_1d = j['market_data']['price_change_percentage_24h_in_currency']['usd'] change_1w = j['market_data']['price_change_percentage_7d_in_currency']['usd'] - change_1m = j['market_data']['price_change_percentage_30d_in_currency']['usd'] - change_1y = j['market_data']['price_change_percentage_1y_in_currency']['usd'] + try: + change_1m = j['market_data']['price_change_percentage_30d_in_currency']['usd'] + except: change_1m = 0 + try: + change_1y = j['market_data']['price_change_percentage_1y_in_currency']['usd'] + except: change_1y = 0 bot.say("{} ({}) is #{:.0f} by mcap (${:.2e}) and #{:.0f} by coingecko rank. Current price is {:.8f} BTC / ${:.3f}. ATH price is {:.8f} BTC / ${:.3f}. USD change: 1d {:.1f}%, 1w {:.1f}%, 1m {:.1f}%, 1y {:.1f}%.".format(name, ticker, mcaprank, mcap, geckorank, btcprice, usdprice, athbtc, athusd, change_1d, change_1w, change_1m, change_1y)) except: bot.say("Failed to retrieve or parse data for {}".format(coin)) diff --git a/trifling.py b/trifling.py index 1023f38..44d12f5 100644 --- a/trifling.py +++ b/trifling.py @@ -20,7 +20,7 @@ def fourmatter(bot, trigger): @sopel.module.commands('_.') def faceflip(bot, trigger): - bot.say(':| .¯. |: ._. :| .¯. |: ._. :| .¯. |: ._.') + bot.say(':/ :| :\ .¯. /: |: \: ._. :/ :| :\ .¯. /: |: \: ._.') @sopel.module.commands('ada', 'hoskinson') def ada(bot, trigger):