2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-28 12:57:38 +00:00

doc: Document TelegramBot.errors, TelegramBot.messageTypes

This commit is contained in:
GochoMugo 2017-11-18 21:49:34 +03:00
parent 49df0c6e02
commit bbac07ad2c
No known key found for this signature in database
GPG Key ID: 7B6A01CB57AA39E4
3 changed files with 23 additions and 1 deletions

View File

@ -10,6 +10,7 @@ Added:
1. Add `metadata` argument in `message` event (and
friends e.g. `text`, `audio`, etc.) (#409) (by @jlsjonas, @GochoMugo)
1. Add support for Node.js v9 (by @GochoMugo)
1. Document *TelegramBot.errors*, *TelegramBot.messageTypes* (by @GochoMugo)
Changed:

View File

@ -83,6 +83,8 @@ TelegramBot
* [.setStickerPositionInSet(sticker, position)](#TelegramBot+setStickerPositionInSet) ⇒ <code>Promise</code>
* [.deleteStickerFromSet(sticker)](#TelegramBot+deleteStickerFromSet) ⇒ <code>Promise</code>
* _static_
* [.errors](#TelegramBot.errors) : <code>Object</code>
* [.messageTypes](#TelegramBot.messageTypes) : <code>Array.&lt;String&gt;</code>
* [.Promise](#TelegramBot.Promise)
<a name="new_TelegramBot_new"></a>
@ -1110,6 +1112,18 @@ Returns True on success.
| --- | --- | --- |
| sticker | <code>String</code> | File identifier of the sticker |
<a name="TelegramBot.errors"></a>
### TelegramBot.errors : <code>Object</code>
The different errors the library uses.
**Kind**: static property of <code>[TelegramBot](#TelegramBot)</code>
<a name="TelegramBot.messageTypes"></a>
### TelegramBot.messageTypes : <code>Array.&lt;String&gt;</code>
The types of message updates the library handles.
**Kind**: static property of <code>[TelegramBot](#TelegramBot)</code>
<a name="TelegramBot.Promise"></a>
### TelegramBot.Promise

View File

@ -74,11 +74,18 @@ if (!process.env.NTBA_FIX_319) {
class TelegramBot extends EventEmitter {
/**
* The different errors the library uses.
* @type {Object}
*/
static get errors() {
return errors;
}
/**
* The types of message updates the library handles.
* @type {String[]}
*/
static get messageTypes() {
return _messageTypes;
}