1
0
mirror of https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot.git synced 2025-07-25 07:31:48 +00:00

added /trending command

This commit is contained in:
2021-03-28 23:31:21 -07:00
parent a4befde8ce
commit f4adfb1915
5 changed files with 76 additions and 8 deletions

13
bot.py
View File

@@ -365,6 +365,18 @@ def stat(update: Update, context: CallbackContext):
)
def trending(update: Update, context: CallbackContext):
"""
Trending Symbols
"""
chat_id = update.message.chat_id
context.bot.send_chat_action(chat_id=chat_id, action=telegram.ChatAction.TYPING)
update.message.reply_text(text=s.trending(), parse_mode=telegram.ParseMode.MARKDOWN)
def inline_query(update: Update, context: CallbackContext):
"""
Handles inline query.
@@ -448,6 +460,7 @@ def main():
dp.add_handler(CommandHandler("info", info))
dp.add_handler(CommandHandler("stat", stat))
dp.add_handler(CommandHandler("stats", stat))
dp.add_handler(CommandHandler("trending", trending))
dp.add_handler(CommandHandler("search", search))
dp.add_handler(CommandHandler("intraday", intra))
dp.add_handler(CommandHandler("intra", intra, run_async=True))