Answer the question
In order to leave comments, you need to log in
How to make an interval for the teleram bot command?
I use telebot. Need a 5 second interval for this command
@bot.message_handler(commands=['start'])
def welcome(message):
bot.send_message(message.chat.id, "<b>Привет, я бот</b>", parse_mode="html")
Answer the question
In order to leave comments, you need to log in
If I'm not mistaken)
import time
@bot.message_handler(commands=['start'])
def welcome(message):
time.sleep(5) #указываешь время интервала
bot.send_message(message.chat.id, "<b>Привет, я бот</b>", parse_mode="html")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question