예제 #1
0
파일: itf.py 프로젝트: linuxmahara/core
def sentiment(bot, update, args):
    save_history(update)
    trading_pair = parse_telegram_cryptocurrency_args(args=args,
                                                      update=update,
                                                      command='s')
    if trading_pair:
        view = sentiment_view(trading_pair)
        update.message.reply_text(view,
                                  parse_mode=ParseMode.MARKDOWN,
                                  disable_web_page_preview=True)
    return
예제 #2
0
def help(bot, update):
    save_history(update)
    update.message.reply_text(
        dedent("""
        *Available commands:*

        *•* `/itf <cryptocurrency>` - Info about currency. For example: `/itf BTC` or `/itf XRP_ETH`.
        *•* `/i <cryptocurrency>` - Latest info about price and volume.
        *•* `/ta <cryptocurrency>` - Latest TA alerts for currency.
        *•* `/s <cryptocurrency>` - Latest crowd sentiment alert for currency.
        *•* `/price <cryptocurrency>` - Prices from all exchanges.
        *•* `/info` - List of supported coins and exchanges.
        *•* `/help` - List of all commands.

        To use these commands in your Telegram channel, invite @Intelligent\_Trading\_Info\_Bot to your channel.
    """), ParseMode.MARKDOWN)
예제 #3
0
def info(bot, update):
    save_history(update)
    update.message.reply_text(info_view(update), ParseMode.MARKDOWN)
    return
예제 #4
0
def getme(bot, update):
    "Show username and userid in chat"
    save_history(update)
    update.message.reply_text(
        f"Your username:{update.message.from_user.username} and userId {str(update.message.from_user.id)}"
    )
예제 #5
0
def start(bot, update):
    save_history(update)
    update.message.reply_text("Welcome {}. I'm ITF info bot.".format(
        update.message.from_user.first_name))