-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DISCUSSION] Broadcast functionality #370
Comments
@KnorpelSenf enable the Discussions feature and convert this to a discussion? |
Here is what i feel
I want to use broadcasting to send some message Good Luck . Hope Speedy Development. Can't wait for it 😜 |
The two main things to consider are rate limits and reliability. Telegram will respond with 429 if rate limits are hit. This needs to be respected. The interesting part is that organic bot load does not count towards these rate limits. What should happen if the bot crashes after broadcasting the message to only some of the targeted chats? Do we need to persist the progress as we go? |
Yes , The Broadcast progress needs to be continued as soon as bot restarts again |
Having the progress stored implies some kind of persistence layer for the queue, which kinda rules out a memory-only queue. |
If the storages are able to enumerate all chat members in a stable fashion and start at a given offset, then we are able to implement everything via the existing storage adapters. All we really need to store is an index at which we left off. This means that we can store a mapping broadcasting task identifier → last chat identifier. After every sent message, we update this value to the next chat. As a performance improvement, we could avoid writing this value after every single sent message. Instead, we only do this every Also, we could consider to never wait for the storage write. That way, rate limits will automatically lead to higher guarantees. |
I'm very interested in this thing because I need it in my bot work, Unfortunately, I cannot develop the plugin with you, because I haven't experience in building libraries, but I have some suggestions:
Maybe it's stupid suggestions but I do what I can to help :) |
Closing due to inactivity. |
Hi everybody.
I'm opening this so we can discuss how the broadcast functionality should work.
It is established that this will use the data stored by the chat-members plugin but, besides that, there are a few decisions we need to make:
bot.api.broadcast()
), or should it be intended to be used alongside grammY (something like runner)?Also, please share your use-cases and experience with broadcasting in Telegram. How do you do it? How do you want to do it? What works for you? What doesn't?
Feel free to participate, no matter how much experience you have with grammY, telegram bots, or chatbots in general :)
The text was updated successfully, but these errors were encountered: