From 52b2def53ed2ff04f525de460e62d0d2a496caff Mon Sep 17 00:00:00 2001 From: root Date: Sun, 14 May 2017 19:21:07 +0000 Subject: [PATCH] Update before ferret pull --- price.py | 17 +++++++++++++++++ trifling.py | 8 ++++++++ 2 files changed, 25 insertions(+) diff --git a/price.py b/price.py index 7570513..7d3cf3d 100644 --- a/price.py +++ b/price.py @@ -288,6 +288,23 @@ def okc(bot, trigger): except: bot.say("Error retrieving data from OKCoin") +@sopel.module.commands('tux') +def tux(bot, trigger): + try: + r = requests.get('https://tuxexchange.com/api?method=getticker') + j = r.json() + if not trigger.group(2): + ticker='XMR' + else: + ticker=trigger.group(2).upper() + coin=j['BTC_{}'.format(ticker)] + last=float(coin['last']) + vol=float(coin['baseVolume']) + change=float(coin['percentChange']) + bot.say("{0} at {1:.8f} BTC on {2:.3f} BTC volume, changed {3:.2f}% over last 24 hr".format(ticker, last, vol, change)) + except: + bot.say("Error retrieving data from Tuxexchange") + @sopel.module.commands('pepe', 'pepecash') def pepe(bot, trigger): try: diff --git a/trifling.py b/trifling.py index c0e3099..9277659 100644 --- a/trifling.py +++ b/trifling.py @@ -30,6 +30,10 @@ def bananas(bot, trigger): def barolo(bot, trigger): bot.say('I just opened a 2004 barolo in your and all the devs honor -- https://i.ytimg.com/vi/-JvdfsIeb-s/hqdefault.jpg') +@sopel.module.commands('bb') +def bb(bot, trigger): + bot.say('https://www.youtube.com/watch?v=_VvbP0QNmF0') + @sopel.module.commands('bear') def bear(bot, trigger): bot.say(u'ʕ ·(エ)· ʔ'.encode('utf8')) @@ -139,6 +143,10 @@ def hmm(bot, trigger): # except: # bot.say("Something something reddit's servers") +@sopel.module.commands('hotline') +def hotline(bot, trigger): + bot.say(u'☎ Call 1-800-273-8255 to reach the National Suicide Prevention Lifeline ☎' .encode('utf8')) + @sopel.module.commands('invest') def invest(bot, trigger): bot.say('i think invest in bitcoin is much more safe and profitable because bitcoin price rising to higher value and we do not face to any risk when we invest our money in bitcoin and i if we invest our money in bitcoin we will be get a good profit from bitcoin in the future so i think bitcoin is much more profitable currency than altcoins.')