GitHub

WhatsAppPostOptions

API reference for WhatsAppPostOptions.

WhatsApp options for every write inside an effect; None leaves a field as the enclosing options set it.

  • link_preview: a preview of the first link in a text message. Default false.
  • list_button: the button that opens a list, when no select has a placeholder. Default "Options", up to 20.
  • buttons_section: the title of a list's buttons section beside a select. Default "Actions", up to 24.

Attributes

AttributeTypeDescription
link_previewbool | None = None
list_buttonstr | None = None
buttons_sectionstr | None = None

Functions

__init__

__init__(*, link_preview=None, list_button=None, buttons_section=None) -> None
ParameterTypeDescription
link_previewbool | None = None
list_buttonstr | None = None
buttons_sectionstr | None = None

merge

merge(inner) -> WhatsAppPostOptions

These options with inner's set fields winning.

ParameterTypeDescription
innerWhatsAppPostOptions

Returns WhatsAppPostOptions

def merge(self, inner: WhatsAppPostOptions) -> WhatsAppPostOptions:
    """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)