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

# ChatLocation

class telegram.ChatLocation(location, address, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object represents a location to which a chat is connected.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `location` is equal.

  Parameters:

    - location (`telegram.Location`) – The location to which the supergroup is connected. Can’t be a live location.

    - address (`str`) – Location address; `1`- `64` characters, as defined by the chat owner.

  location

    The location to which the supergroup is connected. Can’t be a live location.

    Type:

      `telegram.Location`

  address

    Location address; `1`- `64` characters, as defined by the chat owner.

    Type:

      `str`

  Available In

  `telegram.Chat.location`

  MAX_ADDRESS = 64

    `telegram.constants.LocationLimit.MAX_CHAT_LOCATION_ADDRESS`

    New in version 20.0.

  MIN_ADDRESS = 1

    `telegram.constants.LocationLimit.MIN_CHAT_LOCATION_ADDRESS`

    New in version 20.0.

  classmethod de_json(data, bot)

    See `telegram.TelegramObject.de_json()`.