Answer the question
In order to leave comments, you need to log in
How to automate a bot in Telegram?
I am writing a bot in Python using the pyTelegramBotApi library.
The bot sends information about securities, for example, if the user writes: apple, then he will display its price.
I get information using a library that takes api google finance and api yahoo finance.
In order to get information about apple you need to write:
@bot.message_handler(content_types=['text'])
def handle_text_messages(message):
if message.text.lower() == "apple":
bot.send_message(message.from_user.id, f"Привет, акции Apple - {AAPL.price}$")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question