2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-28 21:07:39 +00:00

[API v3.4] Support live locations

This commit is contained in:
Mohammed Sohail 2017-10-13 22:24:43 +05:30
parent 8fd243e6a8
commit 962ce2af3c
No known key found for this signature in database
GPG Key ID: 47461C31B006BC0E

View File

@ -1157,6 +1157,36 @@ class TelegramBot extends EventEmitter {
return this._request('sendLocation', { form }); return this._request('sendLocation', { form });
} }
/**
* Edit live location.
* Use this method to edit live location messages.
*
* @param {Float} latitude Latitude of location
* @param {Float} longitude Longitude of location
* @param {Object} [options] Additional Telegram query options
* @return {Promise}
* @info You must pass in either a chat_id, message_id or an inline_message_id in your addidtional options.
* @see https://core.telegram.org/bots/api#editmessagelivelocation
*/
editMessageLiveLocation(latitude, longitude, form = {}) {
form.latitude = latitude;
form.longitude = longitude;
return this._request('editMessageLiveLocation', { form });
}
/**
* Stop live location.
* Use this method to stop updating live location messages.
*
* @param {Object} [options] Additional Telegram query options
* @return {Promise}
* @info You must pass in either a chat_id, message_id or an inline_message_id in your addidtional options.
* @see https://core.telegram.org/bots/api#stopmessagelivelocation
*/
stopMessageLiveLocation(form = {}) {
return this._request('editMessageLiveLocation', { form });
}
/** /**
* Send venue. * Send venue.
* Use this method to send information about a venue. * Use this method to send information about a venue.