mirror of
https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot.git
synced 2025-07-25 07:31:48 +00:00
add weights to trending based on command #84
This commit is contained in:
6
bot.py
6
bot.py
@@ -224,7 +224,7 @@ def news(update: Update, context: CallbackContext):
|
||||
)
|
||||
return
|
||||
|
||||
symbols = s.find_symbols(message)
|
||||
symbols = s.find_symbols(message,trending_weight=10)
|
||||
|
||||
if symbols:
|
||||
context.bot.send_chat_action(chat_id=chat_id, action=telegram.ChatAction.TYPING)
|
||||
@@ -305,7 +305,7 @@ def intra(update: Update, context: CallbackContext):
|
||||
)
|
||||
return
|
||||
|
||||
symbols = s.find_symbols(message)
|
||||
symbols = s.find_symbols(message, trending_weight=5)
|
||||
symbol = symbols[0]
|
||||
|
||||
if len(symbols):
|
||||
@@ -361,7 +361,7 @@ def chart(update: Update, context: CallbackContext):
|
||||
)
|
||||
return
|
||||
|
||||
symbols = s.find_symbols(message)
|
||||
symbols = s.find_symbols(message, trending_weight=10)
|
||||
|
||||
if len(symbols):
|
||||
symbol = symbols[0]
|
||||
|
Reference in New Issue
Block a user