Answer the question
In order to leave comments, you need to log in
How to send more than 2 messages in a telegram group chat with a bot?
Hey!
I suffer from the fact that the bot does not send more than 2 messages to the group chat, it crashes with error 429
The reference says that you can not send more than 20 messages per minute, but literally with two pokes the bot falls to 429
The code below:
import telebot
import BotSettings
import time
bot = telebot.TeleBot(BotSettings.TOKEN)
bot.can_join_groups = True
@bot.message_handler(commands=['roll'])
def Sendmsg(message):
bot.send_message(message.chat.id,f"Проверка...",reply_to_message_id = message.message_id)
def listener(messages):
for m in messages:
print(str(m.chat.username) + " [" + str(m.chat.id) + "]: " + m.text)
bot.set_update_listener(listener)
time.sleep(2)
bot.polling()
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