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:
parent
8fd243e6a8
commit
962ce2af3c
@ -1157,6 +1157,36 @@ class TelegramBot extends EventEmitter {
|
||||
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.
|
||||
* Use this method to send information about a venue.
|
||||
|
Loading…
x
Reference in New Issue
Block a user