2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-29 05:17:41 +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:
Iiro Jäppinen 2016-05-06 21:03:04 +03:00
parent 2498e44ed7
commit 9d25ceb3c4

View File

@ -490,6 +490,28 @@ class TelegramBot extends EventEmitter {
form.longitude = longitude;
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.