S
S
SashaN692021-01-27 18:28:26
Telegram
SashaN69, 2021-01-27 18:28:26

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

2 answer(s)
D
Dr. Bacon, 2021-01-27
@bacon

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

K
Kuchizu, 2021-03-15
@Kuchizu

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 question

Ask a Question

731 491 924 answers to any question