[API v3.4] Support live locations

release
Mohammed Sohail 8 years ago
parent 8fd243e6a8
commit 962ce2af3c
No known key found for this signature in database
GPG Key ID: 47461C31B006BC0E
  1. 30
      src/telegram.js

@ -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…
Cancel
Save