From 3ac03b52b95d6965ea17f0b2a68c977752ada3fe Mon Sep 17 00:00:00 2001 From: root Date: Sun, 17 Sep 2017 20:46:31 +0000 Subject: [PATCH 01/16] Update before merge --- trifling.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trifling.py b/trifling.py index f7c9697..a9a7fe8 100644 --- a/trifling.py +++ b/trifling.py @@ -54,6 +54,10 @@ def buyorsell(bot, trigger): silly_string = "Buy, buy, buy!" bot.say(silly_string) +@sopel.module.commands('cheerup') +def cheerup(bot, trigger): + bot.say('https://www.youtube.com/watch?v=NXfC16rv_fs') + @sopel.module.commands('china') def china(bot, trigger): bot.say('https://youtu.be/ZrNrleD2ZFs') From d002dc90f442a8ea0a4d6128cb4f8f75bf06ff88 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 23 Sep 2017 00:11:43 +0000 Subject: [PATCH 02/16] joshua1234 to john_alan --- trifling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trifling.py b/trifling.py index a9a7fe8..c252beb 100644 --- a/trifling.py +++ b/trifling.py @@ -200,9 +200,9 @@ def isittrue(bot, trigger): def jaxx(bot, trigger): bot.say(u'This command will be implemented soon. Honest. Especially if the devs can provide some unpaid assistance. Soonโ„ข...') -@sopel.module.commands('joshua1234') +@sopel.module.commands('john_alan') def joshua(bot, trigger): - bot.say(u'The first, second, third, and fourth amongst joshes.') + bot.say(u'I like smooth.') @sopel.module.commands('jwinterm') def jwinterm(bot, trigger): From 2ab5160fc1e66a8fad7b11c0437c2649f7ed5ffc Mon Sep 17 00:00:00 2001 From: root Date: Sat, 23 Sep 2017 03:23:26 +0000 Subject: [PATCH 03/16] indian rupees --- price.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/price.py b/price.py index c790ede..0db7ac5 100644 --- a/price.py +++ b/price.py @@ -749,6 +749,23 @@ def gbp(bot, trigger): except: bot.say("Failed to retrieve price.") +@sopel.module.commands('inr') +def inr(bot, trigger): + # Get conversion rate + try: + fixerresult = requests.get(fixerurl) + fixerjson = fixerresult.json() + usdthb = fixerjson['rates']['INR'] + except: + usdthb = 64 + try: + r=requests.get('https://api.coinmarketcap.com/v1/ticker/monero/') + j=r.json() + price=float(j[0]['price_usd'])*usdthb + bot.say("Monero price in INR = โ‚น{0:,.2f}".format(price)) + except: + bot.say("Failed to retrieve price.") + @sopel.module.commands('thb') def thb(bot, trigger): # Get conversion rate From aad5389552895bc981dd6b9b64ac55beb5d5d67d Mon Sep 17 00:00:00 2001 From: root Date: Sat, 23 Sep 2017 22:01:56 +0000 Subject: [PATCH 04/16] Fix wat --- trifling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trifling.py b/trifling.py index c252beb..8538c5f 100644 --- a/trifling.py +++ b/trifling.py @@ -494,7 +494,7 @@ def wat(bot, trigger): bot.say("https://www.destroyallsoftware.com/talks/wat") @sopel.module.commands('yoda') -def wat(bot, trigger): +def yoda(bot, trigger): bot.say("The optimism is strong in this one") @sopel.module.commands('xrp') From c39648a711a96a53de0e76d4b3aa52587f82fa2d Mon Sep 17 00:00:00 2001 From: root Date: Tue, 3 Oct 2017 00:58:43 +0000 Subject: [PATCH 05/16] Fix network command --- network.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/network.py b/network.py index ee735fb..f5f2d1d 100644 --- a/network.py +++ b/network.py @@ -2,7 +2,7 @@ import sopel.module import requests import re -networkurl = "http://api.minexmr.com:8080/stats" +networkurl = "http://node.xmrbackb.one:18081/getinfo" @sopel.module.commands('fork', 'forkening') def fork(bot, trigger): @@ -12,7 +12,7 @@ def fork(bot, trigger): except Exception,e: pass try: - height=j["network"]["height"] + height=j["height"] forkheight=1400000 if forkheight > height: bot.say("The current block height is {0:,}. Fork height is {1:,}. {2:,} blocks to go, happening in approximately {3:.2f} hours.".format(height,forkheight,forkheight-height,(forkheight-height)/30.0)) @@ -29,8 +29,8 @@ def network(bot, trigger): except Exception,e: pass try: - height=j["network"]["height"] - diff=j["network"]["difficulty"] + height=j["height"] + diff=j["difficulty"] hashrate=float(diff)/120 bot.say("The current block height is {0:,}. Difficulty is {1:,}. Hashrate is {2:.2f} Mh/s.".format(height,diff,hashrate/1e6)) except: From ed722077faeae2788bc1f0347e6203975c1cbf68 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 5 Oct 2017 13:46:29 +0000 Subject: [PATCH 06/16] add bithumb --- price.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/price.py b/price.py index 0db7ac5..6d06586 100644 --- a/price.py +++ b/price.py @@ -439,6 +439,7 @@ def tall(bot, trigger): usdcny = fixerjson['rates']['CNY'] usdeur = fixerjson['rates']['EUR'] usdjpy = fixerjson['rates']['JPY'] + usdkrw = fixerjson['rates']['KRW'] except: usdcny = 7 # Bitstamp @@ -484,14 +485,22 @@ def tall(bot, trigger): finexjson = False if finexjson: stringtosend += "Bitfinex last: {0:,.2f}, vol: {1:,.1f} | ".format(float(finexjson['last_price']), float(finexjson['volume'])) - # BTCC + # Bitthumb try: - btccresult = requests.get(btccurl) - btccjson = btccresult.json() + thumbresult = requests.get(thumbbtcurl) + thumbjson = thumbresult.json() except: - btccjson = False - if btccjson: - stringtosend += "BTCC last: {0:,.2f}, vol: {1:,.1f} | ".format(float(btccjson['ticker']['last'])/usdcny, float(btccjson['ticker']['vol'])) + thumbjson = False + if thumbjson: + stringtosend += "Bithumb last: {0:,.2f}, vol: {1:,.1f} | ".format(float(thumbjson['data']['buy_price'])/float(usdkrw), float(thumbjson['data']['volume_1day'])) + # BTCC + # try: + # btccresult = requests.get(btccurl) + # btccjson = btccresult.json() + # except: + # btccjson = False + # if btccjson: + # stringtosend += "BTCC last: {0:,.2f}, vol: {1:,.1f} | ".format(float(btccjson['ticker']['last'])/usdcny, float(btccjson['ticker']['vol'])) # Huobi try: huobiresult = requests.get(huobiurl) From a5e767266d114e1893d87540d98bc79b94549272 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 7 Oct 2017 13:42:27 +0000 Subject: [PATCH 07/16] Fix tall --- trifling.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trifling.py b/trifling.py index 8538c5f..65d9257 100644 --- a/trifling.py +++ b/trifling.py @@ -478,6 +478,10 @@ urmomoptions = [ def urmom(bot, trigger): bot.say(random.choice(urmomoptions)) +@sopel.module.commands('verge', 'xvg', 'wraith') +def verge(bot, trigger): + bot.say(u"๐Ÿ‘ป๐Ÿ• Don't wraith my dark doge bro! ๐Ÿ‘ป๐Ÿ•".encode('utf8')) + vitalikoptions = [ "https://pbs.twimg.com/media/CrWjczJXgAExF2S.jpg", "mETH, not even once: https://cdn-az.allevents.in/banners/e7df519e0808bac49fa3aaf503aff87d", @@ -488,7 +492,6 @@ vitalikoptions = [ def vitalik(bot, trigger): bot.say(random.choice(vitalikoptions)) - @sopel.module.commands('wat') def wat(bot, trigger): bot.say("https://www.destroyallsoftware.com/talks/wat") From 9da1730227c42f4d9f0e893ff6a21b69bdab4ebd Mon Sep 17 00:00:00 2001 From: root Date: Wed, 11 Oct 2017 13:43:01 +0000 Subject: [PATCH 08/16] jimbell --- price.py | 2 ++ trifling.py | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/price.py b/price.py index 6d06586..2442274 100644 --- a/price.py +++ b/price.py @@ -442,6 +442,8 @@ def tall(bot, trigger): usdkrw = fixerjson['rates']['KRW'] except: usdcny = 7 + usdkrw = 1100 + usdjpy = 112 # Bitstamp try: stampresult = requests.get(stampurl) diff --git a/trifling.py b/trifling.py index 65d9257..e6ddaf2 100644 --- a/trifling.py +++ b/trifling.py @@ -200,6 +200,13 @@ def isittrue(bot, trigger): def jaxx(bot, trigger): bot.say(u'This command will be implemented soon. Honest. Especially if the devs can provide some unpaid assistance. Soonโ„ข...') +@sopel.module.commands('jimbell') +def jaxx(bot, trigger): + if not trigger.group(2): + bot.say(u'https://en.wikipedia.org/wiki/Jim_Bell') + else: + bot.say(u'{} has opened an assasination futures market predicting the impending demise of {}.'.format(trigger.nick, trigger.group(2))) + @sopel.module.commands('john_alan') def joshua(bot, trigger): bot.say(u'I like smooth.') From 97f0dcdccecfc603476a3a481fec623a3e23502c Mon Sep 17 00:00:00 2001 From: root Date: Wed, 11 Oct 2017 13:44:53 +0000 Subject: [PATCH 09/16] jimbell --- trifling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trifling.py b/trifling.py index e6ddaf2..58fafff 100644 --- a/trifling.py +++ b/trifling.py @@ -205,7 +205,7 @@ def jaxx(bot, trigger): if not trigger.group(2): bot.say(u'https://en.wikipedia.org/wiki/Jim_Bell') else: - bot.say(u'{} has opened an assasination futures market predicting the impending demise of {}.'.format(trigger.nick, trigger.group(2))) + bot.say(u'{} has opened an assassination futures market predicting the impending demise of {}.'.format(trigger.nick, trigger.group(2))) @sopel.module.commands('john_alan') def joshua(bot, trigger): From cec92c7ed9f4072a9461783cf9f744b9069488f5 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Oct 2017 02:25:13 +0000 Subject: [PATCH 10/16] Update donate and add b2x --- network.py | 12 ++++++++++++ trifling.py | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/network.py b/network.py index f5f2d1d..3e35130 100644 --- a/network.py +++ b/network.py @@ -62,3 +62,15 @@ def blocksize(bot, trigger): bot.say("Median blocksize over last 200 blocks is {0} bytes".format(size.group(1))) except: bot.say("Bomething sorked 0_0") + +@sopel.module.commands('b2x') +def b2x(bot, trigger): + try: + r=requests.get('https://blockchain.info/latestblock') + j=r.json() + height=j['height'] + forkheight=494784 + blocks=forkheight-int(height) + bot.say("Bitcoin S2X fork due to happen on block {}. Current block is {}. 10 min per block estimate gives {} min, or {:.2f} hour, or {:.2f} days.".format(forkheight, height, blocks*10, blocks*0.16666, blocks*0.006944)) + except: + bot.say("Bitcoin sucks.") diff --git a/trifling.py b/trifling.py index 58fafff..8f084fc 100644 --- a/trifling.py +++ b/trifling.py @@ -104,7 +104,8 @@ def ded(bot, trigger): @sopel.module.commands('donate', 'donation') def donate(bot, trigger): - bot.say('45SkxgDmcLmW5ByS7w9AG78JuJRvCoVKCdGJWnd4US95CBUAtvdGAdM2oHgZgTGjkEAUcwdqcryM819aqdeiKxHSQC8HkmS', trigger.nick) + bot.say('XMR: 45SkxgDmcLmW5ByS7w9AG78JuJRvCoVKCdGJWnd4US95CBUAtvdGAdM2oHgZgTGjkEAUcwdqcryM819aqdeiKxHSQC8HkmS', trigger.nick) + bot.say('BTC: 14X8aMUtuxH2HWLtsNAxxN7j9uqQNUdMzB', trigger.nick) @sopel.module.commands('dump') def dump(bot, trigger): @@ -530,6 +531,10 @@ def wave(bot, trigger): #@sopel.module.rule('[Tt]rump') #def politics(bot, trigger): # bot.reply("politics is the mind killer") + +@sopel.module.rule('.*1Dj34exPs3S9qAV1aiGAAADzbashsSVKVP*.') +def scamdouble(bot, trigger): + bot.say("{} is a scammer and bitcoin is a scam".format(trigger.nick)) @sopel.module.commands('asp') def asp(bot, trigger): From b5102e8dfb896c9afad1ac0ff4b487e0c6463b89 Mon Sep 17 00:00:00 2001 From: anonimal Date: Thu, 2 Nov 2017 23:13:00 +0000 Subject: [PATCH 11/16] trifling: add line from the Carmina Burana codex --- trifling.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trifling.py b/trifling.py index 8f084fc..31e4fcd 100644 --- a/trifling.py +++ b/trifling.py @@ -289,6 +289,10 @@ odboptions = [ def odb(bot, trigger): bot.say(random.choice(odboptions)) +@sopel.module.commands('orff') +def orff(bot, trigger): + bot.say("O Fortuna velut luna statu variabilis, semper crescis aut decrescis; vita detestabilis nunc obdurat et tunc curat ludo mentis aciem, egestatem, potestatem dissolvit ut glaciem.") + @sopel.module.commands('pamp') def pamp(bot, trigger): bot.say("Pamp o clock yet?") From 8196e6fe2fed836363f198abadaa4e75e24b8c60 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 3 Nov 2017 15:16:18 +0000 Subject: [PATCH 12/16] pubg --- trifling.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trifling.py b/trifling.py index 8f084fc..f5fdccf 100644 --- a/trifling.py +++ b/trifling.py @@ -314,6 +314,10 @@ def pony(bot, trigger): def primer(bot, trigger): bot.say("The point is not how much i made, point is fluffy did this on purpose, more than 10 people were in on it. His commit access needs to be revoked asap!") +@sopel.module.commands('pubg') +def pubg(bot, trigger): + bot.say("https://i.redd.it/o6o5gqmetacz.jpg") + confirmoptions = [ "I can confirm that it is true", "This is true", From f2e454a8ddf80c1ae8a6c4c9800dfea6b90d5b3f Mon Sep 17 00:00:00 2001 From: anonimal Date: Wed, 8 Nov 2017 04:36:08 +0000 Subject: [PATCH 13/16] trifling: add encryption wisdom --- trifling.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trifling.py b/trifling.py index b03c395..8d8e3f4 100644 --- a/trifling.py +++ b/trifling.py @@ -111,6 +111,10 @@ def donate(bot, trigger): def dump(bot, trigger): bot.say('https://www.youtube.com/watch?v=RHg8qIKJo1I') +@sopel.module.commands('encrypt') +def encrypt(bot, trigger): + bot.say("https doesn't hide the fact that i'm using https so that's why i don't use encryption because everyone is trying to crack encryption so i just don't use encryption because no one is looking at unencrypted data because everyone wants encrypted data to crack") + @sopel.module.commands('eth') def eth(bot, trigger): bot.say(u'The world computer ๐Ÿ’ป๐ŸŒ'.encode('utf8')) From d4014a998b82c1893f57762d225eea72212c2c53 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 8 Nov 2017 14:38:11 +0000 Subject: [PATCH 14/16] Fix praw stuff --- .gitignore | 1 + trifling.py | 28 +++++++++++++--------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 9d90a83..56546e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ client.py *.pyc apikey.py +redditcredentials.py diff --git a/trifling.py b/trifling.py index b03c395..fd34995 100644 --- a/trifling.py +++ b/trifling.py @@ -4,7 +4,7 @@ import random import re import requests import praw -from client import * +import client from threading import Timer @sopel.module.commands('4matter') @@ -156,15 +156,17 @@ def hitler(bot, trigger): @sopel.module.commands('hmm', 'hmmm') def hmm(bot, trigger): - # try: - sub=reddit.subreddit('hmmm') - posts=sub.new(limit=100) - n=random.randint(0,100) - for i, post in enumerate(posts): - if i==n: - bot.say(post.url) - # except: - # bot.say("Something something reddit's servers") + reddit = praw.Reddit(client_id=client.client_id, client_secret=client.client_secret, user_agent='asdfasdfasdfjhwrgth', username=client.username, password=client.password) + + #try: + sub=reddit.subreddit('hmmm') + posts=sub.new(limit=100) + n=random.randint(0,100) + for i, post in enumerate(posts): + if i==n: + bot.say(post.url) + #except: + # bot.say("Something something reddit's servers") herooptions = [ "https://video.twimg.com/tweet_video/DEnItJjV0AI81CK.mp4", @@ -444,13 +446,9 @@ def trivia(bot, trigger): bot.say("No trivia for you!") -reddit=praw.Reddit(client_id=client_id, - client_secret=client_secret, - user_agent='monerobux', - username=username, - password=password) @sopel.module.commands('tinytrump') def tinytrump(bot, trigger): + reddit = praw.Reddit(client_id=client.client_id, client_secret=client.client_secret, user_agent='asdfasdfasdfjhwrgth', username=client.username, password=client.password) try: sub=reddit.subreddit('tinytrump') posts=sub.new(limit=100) From 22ca9bebef3a1cb6d08f585f2ec5be0b5a4f7034 Mon Sep 17 00:00:00 2001 From: unknownids Date: Fri, 24 Nov 2017 15:11:59 -0700 Subject: [PATCH 15/16] Update trifling.py add luigism --- trifling.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trifling.py b/trifling.py index 716717d..2d96a2e 100644 --- a/trifling.py +++ b/trifling.py @@ -226,6 +226,10 @@ def jwinterm(bot, trigger): def kid(bot, trigger): bot.say(u'What up kid?') +@sopel.module.commands('koan') +def koan(bot, trigger): + bot.say("The use cases are many and varied") + @sopel.module.commands('kramer') def kramer(bot, trigger): bot.say("Waiting for a retrace to 0.007") From 889c17823fcb704c6042e51f96f841a9e12decde Mon Sep 17 00:00:00 2001 From: root Date: Sat, 25 Nov 2017 21:43:51 +0000 Subject: [PATCH 16/16] Update before pull --- network.py | 23 ++++++++++++++--------- price.py | 2 ++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/network.py b/network.py index 3e35130..efd0e08 100644 --- a/network.py +++ b/network.py @@ -63,14 +63,19 @@ def blocksize(bot, trigger): except: bot.say("Bomething sorked 0_0") +@sopel.module.commands('mine') +def mine(bot, trigger): + try: + r=requests.get('https://supportxmr.com/api/network/stats') + j=r.json() + diff=float(j['difficulty']) + value=float(j['value'])/1e12 + hashrate=float(trigger.group(2)) + xmrperday=(hashrate/(diff/120))*720*value + bot.say("At {:.0f} h/s with network diff of {:.2e} and block reward {:.2f} you can expect {:.4f} XMR per day.".format(hashrate, diff, value, xmrperday)) + except: + bot.say("Mining is for suckers.") + @sopel.module.commands('b2x') def b2x(bot, trigger): - try: - r=requests.get('https://blockchain.info/latestblock') - j=r.json() - height=j['height'] - forkheight=494784 - blocks=forkheight-int(height) - bot.say("Bitcoin S2X fork due to happen on block {}. Current block is {}. 10 min per block estimate gives {} min, or {:.2f} hour, or {:.2f} days.".format(forkheight, height, blocks*10, blocks*0.16666, blocks*0.006944)) - except: - bot.say("Bitcoin sucks.") + bot.say("Fuck off \\x") diff --git a/price.py b/price.py index 2442274..ff6ea8d 100644 --- a/price.py +++ b/price.py @@ -491,6 +491,8 @@ def tall(bot, trigger): try: thumbresult = requests.get(thumbbtcurl) thumbjson = thumbresult.json() + if thumbjson['data']: + pass except: thumbjson = False if thumbjson: