-
-
Notifications
You must be signed in to change notification settings - Fork 0
Core broadcaster
lores1337 edited this page Aug 2, 2024
·
2 revisions
The Broadcaster
class is a core component of the library. It manages multiple mailers, providing functionality to create and control mailers.
from aiogram_broadcaster import Broadcaster
broadcaster = Broadcaster(bot1, bot2, bot3, storage=..., additional_context="some_value")
broadcaster.setup(dispatcher) # Setup the context, and startup, shutdown events
-
storage (Optional[BaseStorage]): Storage of mailers.
-
event (Event): Root event instance for bind other events.
-
placeholder (Placeholder): Root placeholder instance for bind other placeholders.
-
mailers (Dict[int, Mailer]): Mapping of the all mailers.