get_nearby_chats()

Client.get_nearby_chats()

Returns a list of users and location-based supergroups nearby. The method was disabled and returns an empty list of chats now.

Usable by Users Bots
Parameters:
  • latitude (``float``) – Latitude of the location.

  • longitude (``float``) – Longitude of the location.

Returns:

List of :obj:`~pyrogram.types.Chat` (On success, a list of nearby chats is returned.)

Example

chats = await app.get_nearby_chats(latitude, longitude)
print(chats)