mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 13:27:44 +00:00
pr: Merge kamikazechaser/node-telegram-bot-api#feature/livelocations
This commit is contained in:
commit
65384a11d4
32
doc/api.md
32
doc/api.md
@ -55,6 +55,8 @@ TelegramBot
|
||||
* [.editMessageReplyMarkup(replyMarkup, [options])](#TelegramBot+editMessageReplyMarkup) ⇒ <code>Promise</code>
|
||||
* [.getUserProfilePhotos(userId, [options])](#TelegramBot+getUserProfilePhotos) ⇒ <code>Promise</code>
|
||||
* [.sendLocation(chatId, latitude, longitude, [options])](#TelegramBot+sendLocation) ⇒ <code>Promise</code>
|
||||
* [.editMessageLiveLocation(latitude, longitude, [options])](#TelegramBot+editMessageLiveLocation) ⇒ <code>Promise</code>
|
||||
* [.stopMessageLiveLocation([options])](#TelegramBot+stopMessageLiveLocation) ⇒ <code>Promise</code>
|
||||
* [.sendVenue(chatId, latitude, longitude, title, address, [options])](#TelegramBot+sendVenue) ⇒ <code>Promise</code>
|
||||
* [.sendContact(chatId, phoneNumber, firstName, [options])](#TelegramBot+sendContact) ⇒ <code>Promise</code>
|
||||
* [.getFile(fileId)](#TelegramBot+getFile) ⇒ <code>Promise</code>
|
||||
@ -702,6 +704,36 @@ Use this method to send point on the map.
|
||||
| longitude | <code>Float</code> | Longitude of location |
|
||||
| [options] | <code>Object</code> | Additional Telegram query options |
|
||||
|
||||
<a name="TelegramBot+editMessageLiveLocation"></a>
|
||||
|
||||
### telegramBot.editMessageLiveLocation(latitude, longitude, [options]) ⇒ <code>Promise</code>
|
||||
Edit live location.
|
||||
Use this method to edit live location messages.
|
||||
|
||||
**Kind**: instance method of <code>[TelegramBot](#TelegramBot)</code>
|
||||
**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
|
||||
|
||||
| Param | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| latitude | <code>Float</code> | Latitude of location |
|
||||
| longitude | <code>Float</code> | Longitude of location |
|
||||
| [options] | <code>Object</code> | Additional Telegram query options |
|
||||
|
||||
<a name="TelegramBot+stopMessageLiveLocation"></a>
|
||||
|
||||
### telegramBot.stopMessageLiveLocation([options]) ⇒ <code>Promise</code>
|
||||
Stop live location.
|
||||
Use this method to stop updating live location messages.
|
||||
|
||||
**Kind**: instance method of <code>[TelegramBot](#TelegramBot)</code>
|
||||
**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
|
||||
|
||||
| Param | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [options] | <code>Object</code> | Additional Telegram query options |
|
||||
|
||||
<a name="TelegramBot+sendVenue"></a>
|
||||
|
||||
### telegramBot.sendVenue(chatId, latitude, longitude, title, address, [options]) ⇒ <code>Promise</code>
|
||||
|
@ -1185,6 +1185,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('stopMessageLiveLocation', { form });
|
||||
}
|
||||
|
||||
/**
|
||||
* Send venue.
|
||||
* Use this method to send information about a venue.
|
||||
|
Loading…
x
Reference in New Issue
Block a user