Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# ProximityAlertTriggered

class telegram.ProximityAlertTriggered(traveler, watcher, distance, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `traveler`, `watcher` and `distance` are equal.

  Parameters:

    - traveler (`telegram.User`) – User that triggered the alert

    - watcher (`telegram.User`) – User that set the alert

    - distance (`int`) – The distance between the users

  traveler

    User that triggered the alert

    Type:

      `telegram.User`

  watcher

    User that set the alert

    Type:

      `telegram.User`

  distance

    The distance between the users

    Type:

      `int`

  Available In

  `telegram.Message.proximity_alert_triggered`

  classmethod de_json(data, bot)

    See `telegram.TelegramObject.de_json()`.