Answer the question
In order to leave comments, you need to log in
How to program a bot to send a message to all users at the same time?
Hello!
You need to make the bot send a message to all users at 12 days. And the answer to these messages was sent to one specific user.
I figured out how to forward messages
@bot.message_handler(content_types=['text'])
def get_text_messages(message: str):
bot.forward_message(360320456, message.chat.id, message.message_id)
while True:
times = datetime.datetime.now().strftime('%H:%M')
if times == '12:00':
bot.send_message(360320456, 'Привет')
else:
pass
time.sleep(60)
Answer the question
In order to leave comments, you need to log in
Normal cycle. To do this, in the list in the script or in the database, you need to store a list with the id of the users to whom you want to send a message.
Only if there are too many users (like more than 30), then you will not be able to send them all at the same time. The cart has a limit of 30 requests per second.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question