From 9e693fb2568539be38193312141678506f7ac791 Mon Sep 17 00:00:00 2001 From: Sardor Muminov Date: Wed, 26 Jul 2017 15:31:57 +0900 Subject: [PATCH] Turn off bitcoin command --- bot/bot.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/bot/bot.py b/bot/bot.py index 9075eb0..ebd2208 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -48,23 +48,23 @@ async def start_command(chat, match): greeting.format(name=chat.sender['first_name'])) -@bot.command(r'/bitcoin') -async def bitcoin_command(chat, match): - url = 'https://blockchain.info/ticker' - async with bot.session.get(url) as s: - info = await s.json() - usd = info['USD'] - symbol = usd['symbol'] - sell = usd['sell'] - buy = usd['buy'] - text = format_text(''' - {name}, ҳозирги биткойн курси қуйидагича. - - ⬆️ Сотасиз: {sell}{symbol} - ⬇️ Оласиз: {buy}{symbol} - ''') - await chat.send_text( - text.format(name=chat.sender['first_name'], symbol=symbol, sell=sell, buy=buy)) +# @bot.command(r'/bitcoin') +# async def bitcoin_command(chat, match): +# url = 'https://blockchain.info/ticker' +# async with bot.session.get(url) as s: +# info = await s.json() +# usd = info['USD'] +# symbol = usd['symbol'] +# sell = usd['sell'] +# buy = usd['buy'] +# text = format_text(''' +# {name}, ҳозирги биткойн курси қуйидагича. + +# ⬆️ Сотасиз: {sell}{symbol} +# ⬇️ Оласиз: {buy}{symbol} +# ''') +# await chat.send_text( +# text.format(name=chat.sender['first_name'], symbol=symbol, sell=sell, buy=buy)) @bot.command(r'/stop')