mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-09-01 23:05:21 +00:00
add the sendVenue method
This method was added to the Telegram Bot API on April 9, 2016 in the Bot API 2.0 update. See https://core.telegram.org/bots/api#sendvenue for more info.
This commit is contained in:
@@ -491,6 +491,28 @@ class TelegramBot extends EventEmitter {
|
|||||||
return this._request('sendLocation', { form });
|
return this._request('sendLocation', { form });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send venue.
|
||||||
|
* Use this method to send information about a venue.
|
||||||
|
*
|
||||||
|
* @param {Number|String} chatId Unique identifier for the message recipient
|
||||||
|
* @param {Float} latitude Latitude of location
|
||||||
|
* @param {Float} longitude Longitude of location
|
||||||
|
* @param {String} title Name of the venue
|
||||||
|
* @param {String} address Address of the venue
|
||||||
|
* @param {Object} [options] Additional Telegram query options
|
||||||
|
* @return {Promise}
|
||||||
|
* @see https://core.telegram.org/bots/api#sendvenue
|
||||||
|
*/
|
||||||
|
sendVenue(chatId, latitude, longitude, title, address, form = {}) {
|
||||||
|
form.chat_id = chatId;
|
||||||
|
form.latitude = latitude;
|
||||||
|
form.longitude = longitude;
|
||||||
|
form.title = title;
|
||||||
|
form.address = address;
|
||||||
|
return this._request('sendVenue', { form });
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get file.
|
* Get file.
|
||||||
* Use this method to get basic info about a file and prepare it for downloading.
|
* Use this method to get basic info about a file and prepare it for downloading.
|
||||||
|
Reference in New Issue
Block a user