Answer the question
In order to leave comments, you need to log in
How to trigger the telegram bot to send a message through a function?
There is a function:
@bot.message_handler(commands=['start'])
def start_message(message):
bot.send_message(message.chat.id, 'Example + '/start')
def result():
return 2 + 2;
def send_message(result)
Answer the question
In order to leave comments, you need to log in
In python, it seems that you can pass a function as an argument, but what is the actual problem?
Need a chat timer? To write 32 and he texted you 32 seconds later? What framework do you use?
Here is the solution I like (I use this framework, this solution works 100%):
https://github.com/python-telegram-bot/python-tele...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question