-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, the bot allows users to initiate a new broadcast even if a previous one is still in progress. This can lead to multiple broadcasts running at the same time, which may cause the bot to exceed Telegram's rate limits (e.g., 30 messages per second).
telegraf-file-sharing/src/services/broadcast.ts
Lines 81 to 82 in 914f29a
// https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once | |
let broadcastPerSecond = 30; |
This results in:
- Failed or delayed message delivery
- Possible temporary blocks or restrictions from Telegram
To prevent this, the bot should:
- Detect if a broadcast is already in progress
- Block any new broadcast attempts during that time
- Send a warning message to the user, such as:
"Cannot start a new broadcast because another one is still running. Please wait for it to finish."
This will ensure stable operation and compliance with Telegram's messaging rate limits.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request