afaztech / reactor-broadcast
Broadcast (send / copy / forward) with progress statistics for Reactor bots.
Package info
github.com/AfazTech/reactor-broadcast
Type:reactor-package
pkg:composer/afaztech/reactor-broadcast
v0.2.0
2026-10-23 16:14 UTC
Requires
- php: >=8.1
- afaztech/reactor-framework: ^0.5.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Asynchronous broadcast delivery for Reactor Telegram bots.
Features
- Three delivery strategies: send, copy, and forward
- Asynchronous processing through the Reactor queue
- Per-recipient progress tracking
- Pause, resume, and cancel running broadcasts
- Live aggregate statistics
- Custom or targeted recipient lists
- Configurable recipient filtering
- Configurable batch size and pacing
Requirements
afaztech/reactor-framework^0.5.0
Installation
composer require afaztech/reactor-broadcast ./reactor migrate
Usage
use AfazTech\ReactorBroadcast\Contracts\BroadcastManagerInterface; $broadcasts = $container->get(BroadcastManagerInterface::class); // Send a fresh text message to every user. $id = $broadcasts->start('send', [ 'text' => 'Hello everyone!', ]); // Copy an existing message (no "Forwarded from" label). $id = $broadcasts->start('copy', [ 'from_chat_id' => '@my_channel', 'message_id' => 1234, ]); // Forward an existing message (with label). $id = $broadcasts->start('forward', [ 'from_chat_id' => -1001234567890, 'message_id' => 5678, ]); // Control a running broadcast. $broadcasts->stats($id); $broadcasts->pause($id); $broadcasts->resume($id); $broadcasts->cancel($id);
Documentation
For detailed documentation, see DOCUMENT.md.
Contributing
Contributions are welcome. Please read the contribution guidelines.
License
This project is licensed under the MIT License.