S
S
shuzzixd2021-08-03 18:30:33
Python
shuzzixd, 2021-08-03 18:30:33

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

2 answer(s)
S
suka_vanya, 2021-08-03
@suka_vanya

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")

J
Jaty4, 2014-03-26
@bahek2462774

$select->from('price')->where('price_date_depart > '.$date);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question