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:
parent
49df0c6e02
commit
bbac07ad2c
@ -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:
|
||||
|
||||
|
14
doc/api.md
14
doc/api.md
@ -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.<String></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.<String></code>
|
||||
The types of message updates the library handles.
|
||||
|
||||
**Kind**: static property of <code>[TelegramBot](#TelegramBot)</code>
|
||||
<a name="TelegramBot.Promise"></a>
|
||||
|
||||
### TelegramBot.Promise
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user