示例#1
0
def printnetworkhash(s):
    url = 'http://fedoracore.x64.me/index.php?page=api&action=public'
    resp = requests.get(url=url)
    stats = json.loads(resp.content)
    connection.send_channel(
        s, "The current network hashrate is %s M/s" %
        (int(stats['network_hashrate']) / 1000000))
示例#2
0
def printblockcount(s):
    url = 'http://fedorachain.info/chain/Fedora/q/getblockcount'
    block = requests.get(url=url).content
    connection.send_channel(s, block)
示例#3
0
def tips(s):
	connection.send_channel(s, "Please send your tips to:")
	connection.send_channel(s, "ELucyYgmNsEa12wrZYnhtvwuRPWcDomxsF.")
示例#4
0
def printblockcount(s):
	url = 'http://fedorachain.info/chain/Fedora/q/getblockcount'
	block = requests.get(url=url).content
	connection.send_channel(s, block)
示例#5
0
def credits(s):
	connection.send_channel(s, "My creator is Cephon!")
示例#6
0
def printaddressbalance(s, address):
    url = ("http://fedorachain.info/chain/Fedora/q/addressbalance/%s" %
           (address.rstrip()))
    balance = requests.get(url=url).content
    connection.send_channel(s, balance)
示例#7
0
def tips(s):
    connection.send_channel(s, "Please send your tips to:")
    connection.send_channel(s, "EM2CUbsmB5wLqDfd5ji71DAWo7mryXEo2U.")
    connection.send_channel(s, "or EXyrAaLMj8wEDx5oWvZKvKfN4ciH2YN4jj")
示例#8
0
def list(s):
	connection.send_channel(s, "These are the main bot comamnds:")
	connection.send_channel(s, "\t!hashrate: Shows the current network hashrate")
	connection.send_channel(s, "\t!pools: Shows currently active pools (maintained by Cephon)")
	connection.send_channel(s, "\t!getblockcount: Shows the current block number")
	connection.send_channel(s, "\t!getdifficulty: Shows the current difficulty")
	connection.send_channel(s, "\t!addressbalance <address> Gets the current (confirmed) balance of an address")
	connection.send_channel(s, "\t!exchanges: Shows the current worth of 1 TIP in USD")
	connection.send_channel(s, "\t!settopic: Tell everyone in the channel what's on your mind")
	connection.send_channel(s, "\t!credits: Find out who made this bot!")
	connection.send_channel(s, "\t!tip: Show the address to tip us at!")
示例#9
0
def list(s):
	connection.send_channel(s, "These are the main bot comamnds:")
	connection.send_channel(s, "\t!leetmeter: See how l33t you are.")
	connection.send_channel(s, "\t!hello: Say hello to me!")
	connection.send_channel(s, "\t!credits: Find out who made this bot!")
	connection.send_channel(s, "\t!tip: Show the address to tip me at!")
示例#10
0
def printexchanges(s):
	connection.send_channel(s, "You can't put a price on euphoria.")
示例#11
0
def tips(s):
	connection.send_channel(s, "Please send your tips to:")
	connection.send_channel(s, "EM2CUbsmB5wLqDfd5ji71DAWo7mryXEo2U.")
	connection.send_channel(s, "or EXyrAaLMj8wEDx5oWvZKvKfN4ciH2YN4jj")
示例#12
0
def printaddressbalance(s,address):
	url = ("http://fedorachain.info/chain/Fedora/q/addressbalance/%s" % (address.rstrip()))
	balance = requests.get(url=url).content
	connection.send_channel(s, balance)
示例#13
0
def printdifficulty(s):
	url = 'http://fedorachain.info/chain/Fedora/q/getdifficulty'
	diff = requests.get(url=url).content
	connection.send_channel(s, diff)
示例#14
0
def credits(s):
	connection.send_channel(s, "My creators are Cephon and icanprogram!")
示例#15
0
def credits(s):
    connection.send_channel(s, "My creators are Cephon and icanprogram!")
示例#16
0
def greet(s, user):
	connection.send_channel(s, "Hello, " + user + "!")
示例#17
0
def printdifficulty(s):
    url = 'http://fedorachain.info/chain/Fedora/q/getdifficulty'
    diff = requests.get(url=url).content
    connection.send_channel(s, diff)
示例#18
0
def leet(s):
	connection.send_channel(s, "You are " + str(randint(1,100)) + "% leet!")
示例#19
0
def printexchanges(s):
    connection.send_channel(s, "You can't put a price on euphoria.")
示例#20
0
def myst(s):
	connection.send_channel(s, "Sawg - MystPhysX 2013")
示例#21
0
def list(s):
    connection.send_channel(s, "These are the main bot comamnds:")
    connection.send_channel(s,
                            "\t!hashrate: Shows the current network hashrate")
    connection.send_channel(
        s, "\t!pools: Shows currently active pools (maintained by Cephon)")
    connection.send_channel(
        s, "\t!getblockcount: Shows the current block number")
    connection.send_channel(s,
                            "\t!getdifficulty: Shows the current difficulty")
    connection.send_channel(
        s,
        "\t!addressbalance <address> Gets the current (confirmed) balance of an address"
    )
    connection.send_channel(
        s, "\t!exchanges: Shows the current worth of 1 TIP in USD")
    connection.send_channel(
        s, "\t!settopic: Tell everyone in the channel what's on your mind")
    connection.send_channel(s, "\t!credits: Find out who made this bot!")
    connection.send_channel(s, "\t!tip: Show the address to tip us at!")
示例#22
0
def printnetworkhash(s):
	url = 'http://fedoracore.x64.me/index.php?page=api&action=public'
	resp = requests.get(url=url)
	stats = json.loads(resp.content)
	connection.send_channel(s, "The current network hashrate is %s M/s" % (int(stats['network_hashrate'])/1000000))