mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Merge pull request #429 from JekaFST/master
Fix for SendLocation with live period
This commit is contained in:
commit
41e31de034
@ -639,7 +639,7 @@ class TeleBot:
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
return types.Message.de_json(
|
return types.Message.de_json(
|
||||||
apihelper.edit_message_live_location(self, latitude, longitude, chat_id, message_id,
|
apihelper.edit_message_live_location(self.token, latitude, longitude, chat_id, message_id,
|
||||||
inline_message_id, reply_markup))
|
inline_message_id, reply_markup))
|
||||||
|
|
||||||
def stop_message_live_location(self, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
|
def stop_message_live_location(self, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
|
||||||
@ -653,7 +653,7 @@ class TeleBot:
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
return types.Message.de_json(
|
return types.Message.de_json(
|
||||||
apihelper.stop_message_live_location(self, chat_id, message_id, inline_message_id, reply_markup))
|
apihelper.stop_message_live_location(self.token, chat_id, message_id, inline_message_id, reply_markup))
|
||||||
|
|
||||||
def send_venue(self, chat_id, latitude, longitude, title, address, foursquare_id=None, disable_notification=None,
|
def send_venue(self, chat_id, latitude, longitude, title, address, foursquare_id=None, disable_notification=None,
|
||||||
reply_to_message_id=None, reply_markup=None):
|
reply_to_message_id=None, reply_markup=None):
|
||||||
|
@ -271,7 +271,7 @@ def send_location(token, chat_id, latitude, longitude, live_period=None, reply_t
|
|||||||
method_url = r'sendLocation'
|
method_url = r'sendLocation'
|
||||||
payload = {'chat_id': chat_id, 'latitude': latitude, 'longitude': longitude}
|
payload = {'chat_id': chat_id, 'latitude': latitude, 'longitude': longitude}
|
||||||
if live_period:
|
if live_period:
|
||||||
payload['live_perion'] = live_period
|
payload['live_period'] = live_period
|
||||||
if reply_to_message_id:
|
if reply_to_message_id:
|
||||||
payload['reply_to_message_id'] = reply_to_message_id
|
payload['reply_to_message_id'] = reply_to_message_id
|
||||||
if reply_markup:
|
if reply_markup:
|
||||||
|
Loading…
Reference in New Issue
Block a user