Skip to content

Commit 28cd62e

Browse files
doc: add clear listener methods
1 parent ec7e61e commit 28cd62e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

doc/api.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ TelegramBot
8080
* [.removeTextListener(regexp)](#TelegramBot+removeTextListener) ⇒ <code>Object</code>
8181
* [.onReplyToMessage(chatId, messageId, callback)](#TelegramBot+onReplyToMessage) ⇒ <code>Number</code>
8282
* [.removeReplyListener(replyListenerId)](#TelegramBot+removeReplyListener) ⇒ <code>Object</code>
83+
* [.clearTextListeners()](#TelegramBot+clearTextListeners)
84+
* [.clearReplyListeners()](#TelegramBot+clearReplyListeners)
8385
* [.getChat(chatId, [options])](#TelegramBot+getChat) ⇒ <code>Promise</code>
8486
* [.getChatAdministrators(chatId, [options])](#TelegramBot+getChatAdministrators) ⇒ <code>Promise</code>
8587
* [.getChatMembersCount(chatId, [options])](#TelegramBot+getChatMembersCount) ⇒ <code>Promise</code>
@@ -1185,6 +1187,20 @@ Removes a reply that has been prev. registered for a message response.
11851187
| --- | --- | --- |
11861188
| replyListenerId | <code>Number</code> | The ID of the reply listener. |
11871189

1190+
<a name="TelegramBot+clearTextListeners"></a>
1191+
1192+
### telegramBot.clearTextListeners()
1193+
Remove all listeners registered with `onText()`.
1194+
1195+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
1196+
1197+
<a name="TelegramBot+clearReplyListeners"></a>
1198+
1199+
### telegramBot.clearReplyListeners()
1200+
Removes all replies that have been previously registered for a message response.
1201+
1202+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
1203+
11881204
<a name="TelegramBot+getChat"></a>
11891205

11901206
### telegramBot.getChat(chatId, [options]) ⇒ <code>Promise</code>

0 commit comments

Comments
 (0)