Telegram options for every write inside an effect; None leaves a
field as the enclosing options set it.
notify_users: users whose[name](tg://user?id=...)links in the Markdown stay links. Any othertg://link becomes text. Default: none.silent: sends posts withdisable_notification.
Attributes#
| Attribute | Type | Description |
|---|---|---|
notify_users | tuple[str, ...] | None = None | |
silent | bool | None = None |
Functions#
__init__#
__init__(*, notify_users=None, silent=None) -> None| Parameter | Type | Description |
|---|---|---|
notify_users | tuple[str, ...] | None = None | |
silent | bool | None = None |
merge#
merge(inner) -> TelegramPostOptionsThese options with inner's set fields winning.
| Parameter | Type | Description |
|---|---|---|
inner | TelegramPostOptions |
Returns TelegramPostOptions
def merge(self, inner: TelegramPostOptions) -> TelegramPostOptions:
"""These options with ``inner``'s set fields winning."""
changes: dict[str, object] = {
field.name: value
for field in fields(inner)
if (value := getattr(inner, field.name)) is not None
}
return replace(self, **changes)