This commit is contained in:
Luke Rogers 2013-12-02 23:16:34 +13:00
parent be3df6718f
commit 57e53e8eb7

View file

@ -1,11 +1,7 @@
from util import http, hook from util import http, hook
## CONSTANTS
@hook.command("butt", autohelp=False)
@hook.command("btc", autohelp=False)
@hook.command(autohelp=False)
def bitcoin(inp):
"bitcoin <exchange> -- Gets current exchange rate for bitcoins from several exchanges, default is Blockchain. Supports MtGox, Bitpay, Coinbase and BitStamp."
exchanges = { exchanges = {
"blockchain": { "blockchain": {
"api_url": "https://blockchain.info/ticker", "api_url": "https://blockchain.info/ticker",
@ -33,6 +29,13 @@ def bitcoin(inp):
} }
} }
## HOOK FUNCTIONS
@hook.command("btc", autohelp=False)
@hook.command(autohelp=False)
def bitcoin(inp):
"""bitcoin <exchange> -- Gets current exchange rate for bitcoins from several exchanges, default is Blockchain. Supports MtGox, Bitpay, Coinbase and BitStamp."""
inp = inp.lower() inp = inp.lower()
if inp: if inp:
@ -48,6 +51,7 @@ def bitcoin(inp):
return func(data) return func(data)
@hook.command("ltc", autohelp=False)
@hook.command(autohelp=False) @hook.command(autohelp=False)
def litecoin(inp, message=None): def litecoin(inp, message=None):
"""litecoin -- gets current exchange rate for litecoins from BTC-E""" """litecoin -- gets current exchange rate for litecoins from BTC-E"""