listener¶
- YouTubeNotifier.listener(*, kind: NotificationKind, channel_ids: str | Iterable[str] = None) Callable[[Callable[[Video], Coroutine[Any, Any, Any]]], Callable[[Video], Coroutine[Any, Any, Any]]]¶
A decorator to add a listener for push notifications.
- Parameters:
kind – The kind of notification to listen for.
channel_ids – The channel ID(s) to listen for. If not provided, the listener will be called for all channels.
- Returns:
The decorator function.
- Raises:
ValueError – If the channel ID is ‘_all’.