From 32110e8578cafafcb1b0d2b27a2f9bc0bf90defd Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 16 Dec 2017 02:03:09 +0100 Subject: [PATCH] Add send_venue method --- pyrogram/client/client.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index e0cbaf52..dc0a6d55 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -706,3 +706,32 @@ class Client: random_id=self.rnd_id() ) ) + + def send_venue(self, + chat_id: int or str, + latitude: float, + longitude: float, + title: str, + address: str, + foursquare_id: str = "", + disable_notification: bool = None, + reply_to_message_id: int = None): + return self.send( + functions.messages.SendMedia( + peer=self.resolve_peer(chat_id), + media=types.InputMediaVenue( + geo_point=types.InputGeoPoint( + lat=latitude, + long=longitude + ), + title=title, + address=address, + provider="", + venue_id=foursquare_id, + venue_type="" + ), + silent=disable_notification or None, + reply_to_msg_id=reply_to_message_id, + random_id=self.rnd_id() + ) + )