Answer the question
In order to leave comments, you need to log in
How to do mass mailing in telegram aiogram?
I have a table, I have user IDs stored there and I think how best to do mass mailing, can it be trite through a loop and shove it into an asynchronous function, or are there better options?
Answer the question
In order to leave comments, you need to log in
There are options, study the asyncio module, otherwise you use asynchrony, but you don’t know how it works. True, the best option is not to do mass mailing at all
I don’t know if it’s worth answering a question half a year ago, but it will probably be useful to others. I think it's better to just cycle through and use the copy_message or forward_message function, because if you use a simple send_message, you can catch spam mute from the cart.
for i in users:
bot.copy_messags(to_chat_id, from_chat_id, message_id)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question