Compare commits

..

No commits in common. "88c8827552d1b268bf2c10e281f7b73142a0a3a5" and "25e97a8b9b753aac49fa5277fa620169ed93bfec" have entirely different histories.

3 changed files with 80 additions and 138 deletions

View File

@ -20,7 +20,7 @@ def fork(bot, trigger):
try:
r=requests.get(networkurl)
j=r.json()
except Exception as e:
except Exception,e:
pass
try:
height=j["height"]
@ -37,7 +37,7 @@ def network(bot, trigger):
try:
r=requests.get(networkurl)
j=r.json()
except:
except Exception,e:
pass
try:
height=j["height"]

View File

@ -243,11 +243,11 @@ def lending(bot, trigger):
currenttime=time.time()
for i in j['offers']:
amnt+=float(i['amount'])
bot.say("Total amount of XMR available {0:,.2f}. Changed by {1:.2f} in the last {2:.2f} hours".format(amnt, amnt-prevamnt, (currenttime-prevtime)/3600))
global prevamnt
prevamnt=amnt
global prevtime
prevtime=currenttime
bot.say("Total amount of XMR available {0:,.2f}. Changed by {1:.2f} in the last {2:.2f} hours".format(amnt, amnt-prevamnt, (currenttime-prevtime)/3600))
except:
bot.say("Something bad happened :o")
@ -276,6 +276,7 @@ def metal(bot, trigger):
@sopel.module.commands('polo', 'poloniex', 'marco', 'plol')
@sopel.module.interval(3600)
def polo(bot, trigger):
if not trigger.group(2):
try:
@ -289,21 +290,21 @@ def polo(bot, trigger):
sign = '+'
else:
sign = ''
face = u'\u0000'
face = ''
if change > 0.10:
face = u'\u263d'
face = u'\u263d'.encode('utf8')
if 0.10 >= change > 0.05:
face = u'\u2661'
face = u'\u2661'.encode('utf8')
if 0.05 >= change > 0.02:
face = u'\u263a'
face = u'\u263a'.encode('utf8')
if 0.02 >= change > -0.02:
face = u'\u2694'
face = u'\u2694'.encode('utf8')
if -0.02 >= change > -0.05:
face = u'\u2639'
face = u'\u2639'.encode('utf8')
if -0.05 >= change > -0.1:
face = u'\u2620'
face = u'\u2620'.encode('utf8')
if change < -0.1:
face = u'\u262d'
face = u'\u262d'.encode('utf8')
bot.say("Poloniex at {0:.8f} BTC; {1}{2:.2f}% over 24 hours on {3:.3f} BTC volume {4}".format(last, sign, change*100, vol, face))
except:
bot.say("Error retrieving data from Poloniex")

View File

@ -6,7 +6,7 @@ import requests
import praw
import client
from threading import Timer
from html.parser import HTMLParser
from HTMLParser import HTMLParser
@sopel.module.commands('4matter')
def fourmatter(bot, trigger):
@ -77,7 +77,7 @@ def bbl(bot, trigger):
@sopel.module.commands('bear')
def bear(bot, trigger):
bot.say(u'ʕ ·(エ)· ʔ')
bot.say(u'ʕ ·(エ)· ʔ'.encode('utf8'))
@sopel.module.commands('billions')
def billions(bot, trigger):
@ -85,11 +85,11 @@ def billions(bot, trigger):
@sopel.module.commands('brothers')
def brothers(bot, trigger):
bot.say(u'http://www.trollaxor.com/2011/11/brief-history-of-ascii-penis.html')
bot.say(u'http://www.trollaxor.com/2011/11/brief-history-of-ascii-penis.html'.encode('utf8'))
@sopel.module.commands('bp', 'bps', 'bulletproof', 'bulletproofs')
def bulletproofs(bot, trigger):
bot.say(u'https://www.youtube.com/watch?v=Kk8eJh4i8Lo')
bot.say(u'https://www.youtube.com/watch?v=Kk8eJh4i8Lo'.encode('utf8'))
@sopel.module.commands('buyorsell')
def buyorsell(bot, trigger):
@ -186,7 +186,7 @@ def collect(bot, trigger):
value_of_items_collected_in_one_day = quantity * value_of_one_item
weekly_coins_to_buy = value_of_items_collected_in_one_day * 7 / coin_price
bot.say('{0} price: ${1:,.2f}, and {2} price: ${3:,.2f}'.format(item.capitalize(), value_of_one_item, coin.capitalize(), coin_price))
bot.say('{0} price: ${1:,.2f}, and {2} price: ${3:,.3f}'.format(item.capitalize(), value_of_one_item, coin.capitalize(), coin_price))
bot.say('{0}: collect {1} per day to exchange for {2:,.5f} {3} each week!'.format(item.capitalize(), quantity, weekly_coins_to_buy, coin))
@sopel.module.commands('covid', 'corona', 'conv')
@ -247,7 +247,7 @@ def dash(bot, trigger):
@sopel.module.commands('dealwithit')
def dealwithit(bot, trigger):
bot.say(u'(•_•) ( •_•)>⌐■-■ (⌐■_■)')
bot.say(u'(•_•) ( •_•)>⌐■-■ (⌐■_■)'.encode('utf8'))
@sopel.module.commands('Deathtobitcoin', 'Deathtobitcoin2')
def deathtobitcoin2(bot, trigger):
@ -255,11 +255,11 @@ def deathtobitcoin2(bot, trigger):
@sopel.module.commands('diiorio')
def diiorio(bot, trigger):
bot.say(u'http://www.contravex.com/2016/06/29/from-the-scammer-files-anthony-di-iorio/')
bot.say(u'http://www.contravex.com/2016/06/29/from-the-scammer-files-anthony-di-iorio/'.encode('utf8'))
@sopel.module.commands('disapprove')
def disapprove(bot, trigger):
bot.say(u'ಠ_ಠ')
bot.say(u'ಠ_ಠ'.encode('utf8'))
@sopel.module.commands('ded')
def ded(bot, trigger):
@ -283,19 +283,19 @@ def encrypt(bot, trigger):
@sopel.module.commands('eth')
def eth(bot, trigger):
bot.say(u'The world computer 💻🌐')
bot.say(u'The world computer 💻🌐'.encode('utf8'))
@sopel.module.commands('ferret', 'ferretinjapan')
def ferret(bot, trigger):
bot.say(u'♥‿♥ https://crypto314.com/wp-content/uploads/2017/09/monero-1505185532555-723x1024.png ♥‿♥')
bot.say(u'♥‿♥ https://crypto314.com/wp-content/uploads/2017/09/monero-1505185532555-723x1024.png ♥‿♥'.encode('utf8'))
@sopel.module.commands('fib', 'fibonacci')
def fib(bot, trigger):
bot.say(u'Pardon me, do you have a moment to discuss our lord and savior ✞Cheesus Monero✞?')
bot.say(u'Pardon me, do you have a moment to discuss our lord and savior ✞Cheesus Monero✞?'.encode('utf8'))
@sopel.module.commands('flip')
def flip(bot, trigger):
bot.say(u'(╯°□°)╯︵ ┻━┻')
bot.say(u'(╯°□°)╯︵ ┻━┻'.encode('utf8'))
@sopel.module.commands('fuck')
def fuck(bot, trigger):
@ -381,7 +381,7 @@ 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 jimbell(bot, trigger):
def jaxx(bot, trigger):
if not trigger.group(2):
bot.say(u'https://en.wikipedia.org/wiki/Jim_Bell')
else:
@ -409,15 +409,19 @@ def kramer(bot, trigger):
@sopel.module.commands('lambo')
def lambo(bot, trigger):
bot.say(u'Our mission is to give you a taste of the lambo dream 🏎 ')
bot.say(u'Our mission is to give you a taste of the lambo dream 🏎 '.encode('utf8'))
@sopel.module.commands('lenny')
def lenny(bot, trigger):
bot.say(u'( ͡° ͜ʖ ͡°)'.encode('utf8'))
@sopel.module.commands('lietome')
def lietome(bot, trigger):
bot.say(u'https://www.youtube.com/watch?v=R5AsQbLHWbw')
bot.say(u'https://www.youtube.com/watch?v=R5AsQbLHWbw'.encode('utf8'))
@sopel.module.commands('livermore')
def livermore(bot, trigger):
bot.say(u'https://en.wikipedia.org/wiki/Reminiscences_of_a_Stock_Operator')
bot.say(u'https://en.wikipedia.org/wiki/Reminiscences_of_a_Stock_Operator'.encode('utf8'))
@sopel.module.commands('loki')
def loki(bot, trigger):
@ -425,11 +429,11 @@ def loki(bot, trigger):
@sopel.module.commands('luigi')
def luigi(bot, trigger):
bot.say(u'🍄 luigi is doing. mario is not doing luigi is doing 🍄')
bot.say(u'🍄 luigi is doing. mario is not doing luigi is doing 🍄'.encode('utf8'))
@sopel.module.commands('ltc', 'chikun')
def ltc(bot, trigger):
bot.say(u'🐔🐔🐔 https://cdn.meme.am/cache/instances/folder100/48222100.jpg 🐔🐔🐔')
bot.say(u'🐔🐔🐔 https://cdn.meme.am/cache/instances/folder100/48222100.jpg 🐔🐔🐔'.encode('utf8'))
@sopel.module.commands('major')
def major(bot, trigger):
@ -441,43 +445,43 @@ def masternode(bot, trigger):
@sopel.module.commands('monerov', 'v')
def monerov(bot, trigger):
bot.say(u"🔒🔒🔒 MoneroV is more secured than others. That's why it is better invest on moneroV. 💰💰💰")
bot.say(u"🔒🔒🔒 MoneroV is more secured than others. That's why it is better invest on moneroV. 💰💰💰".encode('utf8'))
@sopel.module.commands('moon')
def moon(bot, trigger):
bot.say(u'┗(°0°)┛')
bot.say(u'┗(°0°)┛'.encode('utf8'))
@sopel.module.commands('multisig')
def multisig(bot, trigger):
bot.say(u'𝓼𝓲𝓰𝓷𝓪𝓽𝓾𝓻𝓮 𝓼𝓲𝓰𝓷𝓪𝓽𝓾𝓻𝓮')
bot.say(u'𝓼𝓲𝓰𝓷𝓪𝓽𝓾𝓻𝓮 𝓼𝓲𝓰𝓷𝓪𝓽𝓾𝓻𝓮'.encode('utf8'))
@sopel.module.commands('myriad', 'myr', 'myriadcoin')
def myriad(bot, trigger):
bot.say(u'Myriad - A coin for everyone 🖐')
bot.say(u'Myriad - A coin for everyone 🖐'.encode('utf8'))
@sopel.module.commands('needmoney', 'needmoney90', 'nm90')
def needmoney(bot, trigger):
bot.say(u'cash rules everything around me C.R.E.A.M get the money 💵 💵 bill yall')
bot.say(u'cash rules everything around me C.R.E.A.M get the money 💵 💵 bill yall'.encode('utf8'))
@sopel.module.commands('nioc')
def nioc(bot, trigger):
bot.say(u'https://ifunny.co/fun/laeIohx56')
bot.say(u'https://ifunny.co/fun/laeIohx56'.encode('utf8'))
@sopel.module.commands('nobody')
def nobody(bot, trigger):
bot.say('https://www.youtube.com/watch?v=YA631bMT9g8')
@sopel.module.commands('nomnomnom', 'nomnom')
@sopel.module.commands('nomnomnom')
def nomnomnom(bot, trigger):
bot.say(u'ᗧ•••ᗣ')
bot.say(u'ᗧ•••ᗣ'.encode('utf8'))
@sopel.module.commands('noom')
def noom(bot, trigger):
bot.say(u'┏(.0.)┓')
bot.say(u'┏(.0.)┓'.encode('utf8'))
@sopel.module.commands('notbad', 'dorian')
def notbad(bot, trigger):
bot.say(u'(´ー`) http://hackingdistributed.com/images/2014-01-01-bitcoin/dorian1.jpg (´ー`)')
bot.say(u'(´ー`) http://hackingdistributed.com/images/2014-01-01-bitcoin/dorian1.jpg (´ー`)'.encode('utf8'))
@sopel.module.commands('obama')
def obama(bot, trigger):
@ -553,7 +557,7 @@ def projecting(bot, trigger):
@sopel.module.commands('purge')
def purge(bot, trigger):
bot.say(u'♔♔♔ Bow to the king https://preview.redd.it/fr8q7x9utnzy.png?width=612&auto=webp&s=8bf7aa7674d2dc3157b776ae07771144833cd879 ♔♔♔')
bot.say(u'♔♔♔ Bow to the king https://preview.redd.it/fr8q7x9utnzy.png?width=612&auto=webp&s=8bf7aa7674d2dc3157b776ae07771144833cd879 ♔♔♔'.encode('utf8'))
@sopel.module.commands('rarepepe', 'rare')
def rarepepe(bot, trigger):
@ -575,11 +579,11 @@ def rarepepe(bot, trigger):
@sopel.module.commands('rip')
def rip(bot, trigger):
bot.say(u'(X_X) ☜ (◉▂◉ ) we hardly knew ye')
bot.say(u'(X_X) ☜ (◉▂◉ ) we hardly knew ye'.encode('utf8'))
@sopel.module.commands('risto', 'rpietila')
def risto(bot, trigger):
bot.say(u'Zionists own the media, including Hollywood. It is nothing extraordinary for them to use it to further their goals. Just see what they are propagating every day in every media outlet. And the compulsory disclaimer: Zionist != Jew. Zionists in my understanding are typically mostly not even ethnic Jews, and the supermajority of Jews certainly are not Zionists. Zionism is a purely political supremacy movement.')
bot.say(u'Zionists own the media, including Hollywood. It is nothing extraordinary for them to use it to further their goals. Just see what they are propagating every day in every media outlet. And the compulsory disclaimer: Zionist != Jew. Zionists in my understanding are typically mostly not even ethnic Jews, and the supermajority of Jews certainly are not Zionists. Zionism is a purely political supremacy movement.'.encode('utf8'))
@sopel.module.commands('romerito', 'romero')
def romerito(bot, trigger):
@ -627,15 +631,19 @@ def scam(bot, trigger):
@sopel.module.commands('soon')
def soon(bot, trigger):
bot.say(u'Two weeks™')
bot.say(u'Two weeks™'.encode('utf8'))
@sopel.module.commands('shillo', 'cid')
def shillo(bot, trigger):
bot.say(u'☠☠☠ Crypto is ded https://i.kym-cdn.com/photos/images/original/001/321/553/f03.jpg ☠☠☠ ')
bot.say(u'☠☠☠ Crypto is ded https://i.kym-cdn.com/photos/images/original/001/321/553/f03.jpg ☠☠☠ '.encode('utf8'))
@sopel.module.commands('shrug')
def shrug(bot, trigger):
bot.say(u'¯\_(ツ)_/¯'.encode('utf8'))
@sopel.module.commands('softich')
def softich(bot, trigger):
bot.say(u'🐻🐻🐻 https://imgflip.com/i/1ve397 🐻🐻🐻')
bot.say(u'🐻🐻🐻 https://imgflip.com/i/1ve397 🐻🐻🐻'.encode('utf8'))
@sopel.module.commands('summon')
def summon(bot, trigger):
@ -721,6 +729,10 @@ def trump(bot, trigger):
def trumbleweed(bot, trigger):
bot.say("https://rootco.de/2016-03-28-why-use-tumbleweed/")
@sopel.module.commands('unflip')
def unflip(bot, trigger):
bot.say(u'┬─┬ノ( º _ ºノ)'.encode('utf8'))
urmomoptions = [
"ur mom is so stupid she bought all the dash",
"ur momma got a peg leg with a kickstand",
@ -744,7 +756,7 @@ def urmom(bot, trigger):
@sopel.module.commands('verge', 'xvg', 'wraith')
def verge(bot, trigger):
bot.say(u"👻🐕 Don't wraith my dark doge bro! 👻🐕")
bot.say(u"👻🐕 Don't wraith my dark doge bro! 👻🐕".encode('utf8'))
vitalikoptions = [
"https://pbs.twimg.com/media/CrWjczJXgAExF2S.jpg",
@ -790,7 +802,7 @@ def test(bot, trigger):
@sopel.module.rule('monerobux o\/')
def wave(bot, trigger):
#bot.reply(u'^ (•_•) ^')
#bot.reply(u'^ (•_•) ^'.encode('utf8'))
bot.reply('hello')
#@sopel.module.rule('[Tt]rump')
#def politics(bot, trigger):
@ -888,79 +900,12 @@ def weather(bot, trigger):
location = "zip="+location
else:
location = "q="+location.replace(' ', '%20')
r = requests.get('https://api.openweathermap.org/data/2.5/weather?{}&appid={}'.format(location, wk))
j = r.json()
location = j['name']+', '+j['sys']['country']
humidity = j['main']['humidity']
wind_speed_m_s = j['wind']['speed']
wind_deg = j['wind']['deg']
description = j['weather'][0]['description']
temp_in_c = float(j['main']['temp'])-273
low_in_c = float(j['main']['temp_min'])-273
high_in_c = float(j['main']['temp_max'])-273
temp = temp_in_c
low = low_in_c
high = high_in_c
def calculate_bearing(d):
dirs = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW']
ix = int(round(d / (360. / len(dirs))))
return dirs[(ix) % len(dirs)]
direction = calculate_bearing(wind_deg)
try:
bot.say("In {} it is {:.1f} C with a low of {:.1f} and high of {:.1f} C, humidity is {}%, winds of {} m/s from the {} with {}.".format(location, temp, low, high, humidity, wind_speed_m_s, direction, description))
bot.say("In {} it is {:.2f} C with a low of {:.2f} and high of {:.2f} C, humidity is {}%, winds of {} m/s at an angle of {} deg with {}.".format(j['name']+', '+j['sys']['country'], float(j['main']['temp'])-273, float(j['main']['temp_min'])-273, float(j['main']['temp_max'])-273, j['main']['humidity'], j['wind']['speed'], j['wind']['deg'], j['weather'][0]['description']))
except:
bot.say("In {} it is {:.2f} C with a low of {:.2f} and high of {:.2f} C, humidity is {}%, winds of {} m/s with {}.".format(location, temp, low, high, humidity, wind_speed_m_s, description))
except:
bot.say("The earth is on fire 🌎🔥")
@sopel.module.commands('weatherf')
def weatherf(bot, trigger):
wk = client.weather_key
try:
if not trigger.group(2):
location = q="san%20francisco"
elif trigger.group(2) == 'nioc':
location = 'new york city'
else:
location = trigger.group(2)
if location.isdigit():
location = "zip="+location
else:
location = "q="+location.replace(' ', '%20')
r = requests.get('https://api.openweathermap.org/data/2.5/weather?{}&appid={}'.format(location, wk))
j = r.json()
location = j['name']+', '+j['sys']['country']
humidity = j['main']['humidity']
wind_speed_m_s = j['wind']['speed']
wind_deg = j['wind']['deg']
description = j['weather'][0]['description']
temp_in_c = float(j['main']['temp'])-273
low_in_c = float(j['main']['temp_min'])-273
high_in_c = float(j['main']['temp_max'])-273
temp = (temp_in_c * 9 / 5 ) + 32
low = (low_in_c * 9 / 5 ) + 32
high = (high_in_c * 9 / 5 ) + 32
wind_speed_mph = float(wind_speed_m_s) * 2.236936
def calculate_bearing(d):
dirs = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW']
ix = int(round(d / (360. / len(dirs))))
return dirs[(ix) % len(dirs)]
direction = calculate_bearing(wind_deg)
try:
bot.say("In {} it is {:.1f} F with a low of {:.1f} and high of {:.1f} F, humidity is {}%, winds of {:.1f} mph from the {} with {}.".format(location, temp, low, high, humidity, wind_speed_mph, direction, description))
except:
bot.say("In {} it is {:.1f} F with a low of {:.1f} and high of {:.1f} F, humidity is {}%, winds of {:.1f} mph with {}.".format(location, temp, low, high, humidity, wind_speed_mph, description))
bot.say("In {} it is {:.2f} C with a low of {:.2f} and high of {:.2f} C, humidity is {}%, winds of {} m/s with {}.".format(j['name']+', '+j['sys']['country'], float(j['main']['temp'])-273, float(j['main']['temp_min'])-273, float(j['main']['temp_max'])-273, j['main']['humidity'], j['wind']['speed'], j['weather'][0]['description']))
except:
bot.say("The earth is on fire 🌎🔥")
@ -980,9 +925,5 @@ def mental(bot, trigger):
bot.say('Ahhhhhhhh!!!!')
@sopel.module.commands('biden')
def biden(bot, trigger):
def mental(bot, trigger):
bot.say('Come on man...')
@sopel.module.commands('smile')
def smile(bot, trigger):
bot.say('https://archive.is/uqHxO')