@zero-bot.net/tg-bot-api 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/doc/api.md +1003 -0
- package/lib/telegram.js +1011 -0
- package/package.json +6 -4
- package/src/telegram.js +1011 -0
- package/doc/tutorials.md +0 -12
package/doc/api.md
CHANGED
|
@@ -151,6 +151,70 @@ TelegramBot
|
|
|
151
151
|
* [.getGameHighScores(userId, [options])](#TelegramBot+getGameHighScores) ⇒ <code>Promise</code>
|
|
152
152
|
* [.deleteMessage(chatId, messageId, [options])](#TelegramBot+deleteMessage) ⇒ <code>Promise</code>
|
|
153
153
|
* [.deleteMessages(chatId, messageIds, [options])](#TelegramBot+deleteMessages) ⇒ <code>Promise.<Boolean></code>
|
|
154
|
+
* [.refundStarPayment(userId, telegramPaymentChargeId, [options])](#TelegramBot+refundStarPayment) ⇒ <code>Promise</code>
|
|
155
|
+
* [.getStarTransactions([options])](#TelegramBot+getStarTransactions) ⇒ <code>Promise</code>
|
|
156
|
+
* [.sendPaidMedia(chatId, starCount, media, [options])](#TelegramBot+sendPaidMedia) ⇒ <code>Promise</code>
|
|
157
|
+
* [.createChatSubscriptionInviteLink(chatId, [options])](#TelegramBot+createChatSubscriptionInviteLink) ⇒ <code>Promise</code>
|
|
158
|
+
* [.editChatSubscriptionInviteLink(chatId, inviteLink, [options])](#TelegramBot+editChatSubscriptionInviteLink) ⇒ <code>Promise</code>
|
|
159
|
+
* [.getAvailableGifts([options])](#TelegramBot+getAvailableGifts) ⇒ <code>Promise</code>
|
|
160
|
+
* [.sendGift(userId, giftId, [options])](#TelegramBot+sendGift) ⇒ <code>Promise</code>
|
|
161
|
+
* [.editUserStarSubscription(userId, telegramPaymentChargeId, isCanceled, [options])](#TelegramBot+editUserStarSubscription) ⇒ <code>Promise</code>
|
|
162
|
+
* [.savePreparedInlineMessage(userId, result, [options])](#TelegramBot+savePreparedInlineMessage) ⇒ <code>Promise</code>
|
|
163
|
+
* [.verifyUser(userId, [options])](#TelegramBot+verifyUser) ⇒ <code>Promise</code>
|
|
164
|
+
* [.verifyChat(chatId, [options])](#TelegramBot+verifyChat) ⇒ <code>Promise</code>
|
|
165
|
+
* [.removeUserVerification(userId, [options])](#TelegramBot+removeUserVerification) ⇒ <code>Promise</code>
|
|
166
|
+
* [.removeChatVerification(chatId, [options])](#TelegramBot+removeChatVerification) ⇒ <code>Promise</code>
|
|
167
|
+
* [.readBusinessMessage(businessConnectionId, messageId, [options])](#TelegramBot+readBusinessMessage) ⇒ <code>Promise</code>
|
|
168
|
+
* [.deleteBusinessMessages(businessConnectionId, messageIds, [options])](#TelegramBot+deleteBusinessMessages) ⇒ <code>Promise</code>
|
|
169
|
+
* [.setBusinessAccountName(businessConnectionId, [options])](#TelegramBot+setBusinessAccountName) ⇒ <code>Promise</code>
|
|
170
|
+
* [.setBusinessAccountUsername(businessConnectionId, [options])](#TelegramBot+setBusinessAccountUsername) ⇒ <code>Promise</code>
|
|
171
|
+
* [.setBusinessAccountBio(businessConnectionId, [options])](#TelegramBot+setBusinessAccountBio) ⇒ <code>Promise</code>
|
|
172
|
+
* [.setBusinessAccountProfilePhoto(businessConnectionId, photo, [options])](#TelegramBot+setBusinessAccountProfilePhoto) ⇒ <code>Promise</code>
|
|
173
|
+
* [.removeBusinessAccountProfilePhoto(businessConnectionId, [options])](#TelegramBot+removeBusinessAccountProfilePhoto) ⇒ <code>Promise</code>
|
|
174
|
+
* [.setBusinessAccountGiftSettings(businessConnectionId, [options])](#TelegramBot+setBusinessAccountGiftSettings) ⇒ <code>Promise</code>
|
|
175
|
+
* [.getBusinessAccountStarBalance(businessConnectionId, [options])](#TelegramBot+getBusinessAccountStarBalance) ⇒ <code>Promise</code>
|
|
176
|
+
* [.transferBusinessAccountStars(businessConnectionId, starCount, [options])](#TelegramBot+transferBusinessAccountStars) ⇒ <code>Promise</code>
|
|
177
|
+
* [.getBusinessAccountGifts(businessConnectionId, [options])](#TelegramBot+getBusinessAccountGifts) ⇒ <code>Promise</code>
|
|
178
|
+
* [.convertGiftToStars(businessConnectionId, ownedGiftId, [options])](#TelegramBot+convertGiftToStars) ⇒ <code>Promise</code>
|
|
179
|
+
* [.upgradeGift(businessConnectionId, ownedGiftId, [options])](#TelegramBot+upgradeGift) ⇒ <code>Promise</code>
|
|
180
|
+
* [.transferGift(businessConnectionId, ownedGiftId, newOwnerChatId, [options])](#TelegramBot+transferGift) ⇒ <code>Promise</code>
|
|
181
|
+
* [.postStory(businessConnectionId, content, [options])](#TelegramBot+postStory) ⇒ <code>Promise</code>
|
|
182
|
+
* [.editStory(businessConnectionId, storyId, [options])](#TelegramBot+editStory) ⇒ <code>Promise</code>
|
|
183
|
+
* [.deleteStory(businessConnectionId, storyId, [options])](#TelegramBot+deleteStory) ⇒ <code>Promise</code>
|
|
184
|
+
* [.giftPremiumSubscription(userId, monthCount, starCount, [options])](#TelegramBot+giftPremiumSubscription) ⇒ <code>Promise</code>
|
|
185
|
+
* [.setUserEmojiStatus(userId, [options])](#TelegramBot+setUserEmojiStatus) ⇒ <code>Promise</code>
|
|
186
|
+
* [.sendChecklist(businessConnectionId, title, tasks, [options])](#TelegramBot+sendChecklist) ⇒ <code>Promise</code>
|
|
187
|
+
* [.editMessageChecklist(businessConnectionId, messageId, [options])](#TelegramBot+editMessageChecklist) ⇒ <code>Promise</code>
|
|
188
|
+
* [.getMyStarBalance([options])](#TelegramBot+getMyStarBalance) ⇒ <code>Promise</code>
|
|
189
|
+
* [.approveSuggestedPost(businessConnectionId, messageId, [options])](#TelegramBot+approveSuggestedPost) ⇒ <code>Promise</code>
|
|
190
|
+
* [.declineSuggestedPost(businessConnectionId, messageId, [options])](#TelegramBot+declineSuggestedPost) ⇒ <code>Promise</code>
|
|
191
|
+
* [.sendMessageDraft(chatId, text, [options])](#TelegramBot+sendMessageDraft) ⇒ <code>Promise</code>
|
|
192
|
+
* [.getUserGifts(userId, [options])](#TelegramBot+getUserGifts) ⇒ <code>Promise</code>
|
|
193
|
+
* [.getChatGifts(chatId, [options])](#TelegramBot+getChatGifts) ⇒ <code>Promise</code>
|
|
194
|
+
* [.repostStory(businessConnectionId, storyId, targetBusinessConnectionIds, [options])](#TelegramBot+repostStory) ⇒ <code>Promise</code>
|
|
195
|
+
* [.setMyProfilePhoto(photo, [options])](#TelegramBot+setMyProfilePhoto) ⇒ <code>Promise</code>
|
|
196
|
+
* [.removeMyProfilePhoto([options])](#TelegramBot+removeMyProfilePhoto) ⇒ <code>Promise</code>
|
|
197
|
+
* [.getUserProfileAudios(userId, [options])](#TelegramBot+getUserProfileAudios) ⇒ <code>Promise</code>
|
|
198
|
+
* [.setChatMemberTag(chatId, userId, [options])](#TelegramBot+setChatMemberTag) ⇒ <code>Promise</code>
|
|
199
|
+
* [.getManagedBotToken(botId, [options])](#TelegramBot+getManagedBotToken) ⇒ <code>Promise</code>
|
|
200
|
+
* [.replaceManagedBotToken(botId, [options])](#TelegramBot+replaceManagedBotToken) ⇒ <code>Promise</code>
|
|
201
|
+
* [.savePreparedKeyboardButton(button, [options])](#TelegramBot+savePreparedKeyboardButton) ⇒ <code>Promise</code>
|
|
202
|
+
* [.answerGuestQuery(guestQueryId, text, [options])](#TelegramBot+answerGuestQuery) ⇒ <code>Promise</code>
|
|
203
|
+
* [.deleteAllMessageReactions(chatId, messageId, [options])](#TelegramBot+deleteAllMessageReactions) ⇒ <code>Promise</code>
|
|
204
|
+
* [.deleteMessageReaction(chatId, messageId, [options])](#TelegramBot+deleteMessageReaction) ⇒ <code>Promise</code>
|
|
205
|
+
* [.sendLivePhoto(chatId, photo, video, [options], [fileOptions])](#TelegramBot+sendLivePhoto) ⇒ <code>Promise</code>
|
|
206
|
+
* [.getManagedBotAccessSettings([options])](#TelegramBot+getManagedBotAccessSettings) ⇒ <code>Promise</code>
|
|
207
|
+
* [.setManagedBotAccessSettings([options])](#TelegramBot+setManagedBotAccessSettings) ⇒ <code>Promise</code>
|
|
208
|
+
* [.getUserPersonalChatMessages(userId, [options])](#TelegramBot+getUserPersonalChatMessages) ⇒ <code>Promise</code>
|
|
209
|
+
* [.sendRichMessage(chatId, content, [options])](#TelegramBot+sendRichMessage) ⇒ <code>Promise</code>
|
|
210
|
+
* [.sendRichMessageDraft(chatId, content, [options])](#TelegramBot+sendRichMessageDraft) ⇒ <code>Promise</code>
|
|
211
|
+
* [.answerChatJoinRequestQuery(chatJoinRequestId, queryId, [options])](#TelegramBot+answerChatJoinRequestQuery) ⇒ <code>Promise</code>
|
|
212
|
+
* [.sendChatJoinRequestWebApp(chatJoinRequestId, webApp, [options])](#TelegramBot+sendChatJoinRequestWebApp) ⇒ <code>Promise</code>
|
|
213
|
+
* [.editEphemeralMessageText(chatId, ephemeralMessageId, text, [options])](#TelegramBot+editEphemeralMessageText) ⇒ <code>Promise</code>
|
|
214
|
+
* [.editEphemeralMessageMedia(chatId, ephemeralMessageId, media, [options], [fileOptions])](#TelegramBot+editEphemeralMessageMedia) ⇒ <code>Promise</code>
|
|
215
|
+
* [.editEphemeralMessageCaption(chatId, ephemeralMessageId, [options])](#TelegramBot+editEphemeralMessageCaption) ⇒ <code>Promise</code>
|
|
216
|
+
* [.editEphemeralMessageReplyMarkup(chatId, ephemeralMessageId, [options])](#TelegramBot+editEphemeralMessageReplyMarkup) ⇒ <code>Promise</code>
|
|
217
|
+
* [.deleteEphemeralMessage(chatId, ephemeralMessageId, [options])](#TelegramBot+deleteEphemeralMessage) ⇒ <code>Promise</code>
|
|
154
218
|
* _static_
|
|
155
219
|
* [.errors](#TelegramBot.errors) : <code>Object</code>
|
|
156
220
|
* [.messageTypes](#TelegramBot.messageTypes) : <code>Array.<String></code>
|
|
@@ -2447,6 +2511,945 @@ Use this method to delete multiple messages simultaneously. If some of the speci
|
|
|
2447
2511
|
| messageIds | <code>Array.<(Number\|String)></code> | Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted |
|
|
2448
2512
|
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2449
2513
|
|
|
2514
|
+
<a name="TelegramBot+refundStarPayment"></a>
|
|
2515
|
+
|
|
2516
|
+
### telegramBot.refundStarPayment(userId, telegramPaymentChargeId, [options]) ⇒ <code>Promise</code>
|
|
2517
|
+
Use this method to issue a refund for a payment made via Telegram Stars.
|
|
2518
|
+
|
|
2519
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2520
|
+
**Returns**: <code>Promise</code> - On success, True is returned
|
|
2521
|
+
**See**: https://core.telegram.org/bots/api#refundstarpayment
|
|
2522
|
+
|
|
2523
|
+
| Param | Type | Description |
|
|
2524
|
+
| --- | --- | --- |
|
|
2525
|
+
| userId | <code>Number</code> | Identifier of the user whose payment will be refunded |
|
|
2526
|
+
| telegramPaymentChargeId | <code>String</code> | Telegram payment identifier of the payment to refund |
|
|
2527
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2528
|
+
|
|
2529
|
+
<a name="TelegramBot+getStarTransactions"></a>
|
|
2530
|
+
|
|
2531
|
+
### telegramBot.getStarTransactions([options]) ⇒ <code>Promise</code>
|
|
2532
|
+
Use this method to get the current status of the balance of Telegram Stars
|
|
2533
|
+
that can be withdrawn by the bot or transferred to another business account.
|
|
2534
|
+
|
|
2535
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2536
|
+
**Returns**: <code>Promise</code> - On success, returns a StarTransactions object
|
|
2537
|
+
**See**: https://core.telegram.org/bots/api#getstartransactions
|
|
2538
|
+
|
|
2539
|
+
| Param | Type | Description |
|
|
2540
|
+
| --- | --- | --- |
|
|
2541
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2542
|
+
|
|
2543
|
+
<a name="TelegramBot+sendPaidMedia"></a>
|
|
2544
|
+
|
|
2545
|
+
### telegramBot.sendPaidMedia(chatId, starCount, media, [options]) ⇒ <code>Promise</code>
|
|
2546
|
+
Use this method to send paid media.
|
|
2547
|
+
|
|
2548
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2549
|
+
**Returns**: <code>Promise</code> - On success, the sent Message object is returned
|
|
2550
|
+
**See**: https://core.telegram.org/bots/api#sendpaidmedia
|
|
2551
|
+
|
|
2552
|
+
| Param | Type | Description |
|
|
2553
|
+
| --- | --- | --- |
|
|
2554
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
2555
|
+
| starCount | <code>Number</code> | The number of Telegram Stars that must be paid to buy access to the media |
|
|
2556
|
+
| media | <code>Array</code> | A JSON-serialized array describing the media to be sent; currently supports photos and videos |
|
|
2557
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2558
|
+
|
|
2559
|
+
<a name="TelegramBot+createChatSubscriptionInviteLink"></a>
|
|
2560
|
+
|
|
2561
|
+
### telegramBot.createChatSubscriptionInviteLink(chatId, [options]) ⇒ <code>Promise</code>
|
|
2562
|
+
Use this method to create a subscription invite link for a channel chat.
|
|
2563
|
+
|
|
2564
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2565
|
+
**Returns**: <code>Promise</code> - On success, the new invite link as a ChatInviteLink object is returned
|
|
2566
|
+
**See**: https://core.telegram.org/bots/api#createchatsubscriptioninvitelink
|
|
2567
|
+
|
|
2568
|
+
| Param | Type | Description |
|
|
2569
|
+
| --- | --- | --- |
|
|
2570
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target channel chat or username of the target channel (in the format `@channelusername`) |
|
|
2571
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2572
|
+
|
|
2573
|
+
<a name="TelegramBot+editChatSubscriptionInviteLink"></a>
|
|
2574
|
+
|
|
2575
|
+
### telegramBot.editChatSubscriptionInviteLink(chatId, inviteLink, [options]) ⇒ <code>Promise</code>
|
|
2576
|
+
Use this method to edit a subscription invite link created by the bot.
|
|
2577
|
+
|
|
2578
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2579
|
+
**Returns**: <code>Promise</code> - On success, the edited invite link as a ChatInviteLink object is returned
|
|
2580
|
+
**See**: https://core.telegram.org/bots/api#editchatsubscriptioninvitelink
|
|
2581
|
+
|
|
2582
|
+
| Param | Type | Description |
|
|
2583
|
+
| --- | --- | --- |
|
|
2584
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target channel chat or username of the target channel (in the format `@channelusername`) |
|
|
2585
|
+
| inviteLink | <code>String</code> | The invite link to edit |
|
|
2586
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2587
|
+
|
|
2588
|
+
<a name="TelegramBot+getAvailableGifts"></a>
|
|
2589
|
+
|
|
2590
|
+
### telegramBot.getAvailableGifts([options]) ⇒ <code>Promise</code>
|
|
2591
|
+
Use this method to get the list of gifts that can be sent by the bot.
|
|
2592
|
+
|
|
2593
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2594
|
+
**Returns**: <code>Promise</code> - On success, returns a Gifts object
|
|
2595
|
+
**See**: https://core.telegram.org/bots/api#getavailablegifts
|
|
2596
|
+
|
|
2597
|
+
| Param | Type | Description |
|
|
2598
|
+
| --- | --- | --- |
|
|
2599
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2600
|
+
|
|
2601
|
+
<a name="TelegramBot+sendGift"></a>
|
|
2602
|
+
|
|
2603
|
+
### telegramBot.sendGift(userId, giftId, [options]) ⇒ <code>Promise</code>
|
|
2604
|
+
Use this method to send a gift to a user.
|
|
2605
|
+
|
|
2606
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2607
|
+
**Returns**: <code>Promise</code> - On success, True is returned
|
|
2608
|
+
**See**: https://core.telegram.org/bots/api#sendgift
|
|
2609
|
+
|
|
2610
|
+
| Param | Type | Description |
|
|
2611
|
+
| --- | --- | --- |
|
|
2612
|
+
| userId | <code>Number</code> | Unique identifier of the target user that will receive the gift |
|
|
2613
|
+
| giftId | <code>String</code> | Identifier of the gift |
|
|
2614
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2615
|
+
|
|
2616
|
+
<a name="TelegramBot+editUserStarSubscription"></a>
|
|
2617
|
+
|
|
2618
|
+
### telegramBot.editUserStarSubscription(userId, telegramPaymentChargeId, isCanceled, [options]) ⇒ <code>Promise</code>
|
|
2619
|
+
Use this method to edit a subscription paid through Telegram Stars.
|
|
2620
|
+
|
|
2621
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2622
|
+
**Returns**: <code>Promise</code> - On success, True is returned
|
|
2623
|
+
**See**: https://core.telegram.org/bots/api#edituserstarsubscription
|
|
2624
|
+
|
|
2625
|
+
| Param | Type | Description |
|
|
2626
|
+
| --- | --- | --- |
|
|
2627
|
+
| userId | <code>Number</code> | Identifier of the user whose subscription will be edited |
|
|
2628
|
+
| telegramPaymentChargeId | <code>String</code> | Telegram payment identifier of the subscription payment |
|
|
2629
|
+
| isCanceled | <code>Boolean</code> | Pass True to cancel the user's subscription |
|
|
2630
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2631
|
+
|
|
2632
|
+
<a name="TelegramBot+savePreparedInlineMessage"></a>
|
|
2633
|
+
|
|
2634
|
+
### telegramBot.savePreparedInlineMessage(userId, result, [options]) ⇒ <code>Promise</code>
|
|
2635
|
+
Use this method to store an inline message that can be sent on behalf of a user.
|
|
2636
|
+
|
|
2637
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2638
|
+
**Returns**: <code>Promise</code> - On success, returns a PreparedInlineMessage object
|
|
2639
|
+
**See**: https://core.telegram.org/bots/api#savepreparedinlinemessage
|
|
2640
|
+
|
|
2641
|
+
| Param | Type | Description |
|
|
2642
|
+
| --- | --- | --- |
|
|
2643
|
+
| userId | <code>Number</code> | Unique identifier of the target user |
|
|
2644
|
+
| result | <code>Object</code> | An object describing the message to be sent |
|
|
2645
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2646
|
+
|
|
2647
|
+
<a name="TelegramBot+verifyUser"></a>
|
|
2648
|
+
|
|
2649
|
+
### telegramBot.verifyUser(userId, [options]) ⇒ <code>Promise</code>
|
|
2650
|
+
Use this method to verify a user that is managed by the bot.
|
|
2651
|
+
|
|
2652
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2653
|
+
**Returns**: <code>Promise</code> - On success, True is returned
|
|
2654
|
+
**See**: https://core.telegram.org/bots/api#verifyuser
|
|
2655
|
+
|
|
2656
|
+
| Param | Type | Description |
|
|
2657
|
+
| --- | --- | --- |
|
|
2658
|
+
| userId | <code>Number</code> | Unique identifier of the target user |
|
|
2659
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2660
|
+
|
|
2661
|
+
<a name="TelegramBot+verifyChat"></a>
|
|
2662
|
+
|
|
2663
|
+
### telegramBot.verifyChat(chatId, [options]) ⇒ <code>Promise</code>
|
|
2664
|
+
Use this method to verify a chat that is managed by the bot.
|
|
2665
|
+
|
|
2666
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2667
|
+
**Returns**: <code>Promise</code> - On success, True is returned
|
|
2668
|
+
**See**: https://core.telegram.org/bots/api#verifychat
|
|
2669
|
+
|
|
2670
|
+
| Param | Type | Description |
|
|
2671
|
+
| --- | --- | --- |
|
|
2672
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
2673
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2674
|
+
|
|
2675
|
+
<a name="TelegramBot+removeUserVerification"></a>
|
|
2676
|
+
|
|
2677
|
+
### telegramBot.removeUserVerification(userId, [options]) ⇒ <code>Promise</code>
|
|
2678
|
+
Use this method to remove verification for a user that is managed by the bot.
|
|
2679
|
+
|
|
2680
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2681
|
+
**Returns**: <code>Promise</code> - On success, True is returned
|
|
2682
|
+
**See**: https://core.telegram.org/bots/api#removeuserverification
|
|
2683
|
+
|
|
2684
|
+
| Param | Type | Description |
|
|
2685
|
+
| --- | --- | --- |
|
|
2686
|
+
| userId | <code>Number</code> | Unique identifier of the target user |
|
|
2687
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2688
|
+
|
|
2689
|
+
<a name="TelegramBot+removeChatVerification"></a>
|
|
2690
|
+
|
|
2691
|
+
### telegramBot.removeChatVerification(chatId, [options]) ⇒ <code>Promise</code>
|
|
2692
|
+
Use this method to remove verification for a chat that is managed by the bot.
|
|
2693
|
+
|
|
2694
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2695
|
+
**Returns**: <code>Promise</code> - On success, True is returned
|
|
2696
|
+
**See**: https://core.telegram.org/bots/api#removechatverification
|
|
2697
|
+
|
|
2698
|
+
| Param | Type | Description |
|
|
2699
|
+
| --- | --- | --- |
|
|
2700
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
2701
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2702
|
+
|
|
2703
|
+
<a name="TelegramBot+readBusinessMessage"></a>
|
|
2704
|
+
|
|
2705
|
+
### telegramBot.readBusinessMessage(businessConnectionId, messageId, [options]) ⇒ <code>Promise</code>
|
|
2706
|
+
Use this method to mark incoming messages as read on behalf of a business account.
|
|
2707
|
+
|
|
2708
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2709
|
+
**Returns**: <code>Promise</code> - True on success
|
|
2710
|
+
**See**: https://core.telegram.org/bots/api#readbusinessmessage
|
|
2711
|
+
|
|
2712
|
+
| Param | Type | Description |
|
|
2713
|
+
| --- | --- | --- |
|
|
2714
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2715
|
+
| messageId | <code>Number</code> | Unique identifier of the message to mark as read |
|
|
2716
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2717
|
+
|
|
2718
|
+
<a name="TelegramBot+deleteBusinessMessages"></a>
|
|
2719
|
+
|
|
2720
|
+
### telegramBot.deleteBusinessMessages(businessConnectionId, messageIds, [options]) ⇒ <code>Promise</code>
|
|
2721
|
+
Use this method to delete messages on behalf of a business account.
|
|
2722
|
+
|
|
2723
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2724
|
+
**Returns**: <code>Promise</code> - True on success
|
|
2725
|
+
**See**: https://core.telegram.org/bots/api#deletebusinessmessages
|
|
2726
|
+
|
|
2727
|
+
| Param | Type | Description |
|
|
2728
|
+
| --- | --- | --- |
|
|
2729
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2730
|
+
| messageIds | <code>Array.<Number></code> | Unique identifiers of 1-100 messages to delete |
|
|
2731
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2732
|
+
|
|
2733
|
+
<a name="TelegramBot+setBusinessAccountName"></a>
|
|
2734
|
+
|
|
2735
|
+
### telegramBot.setBusinessAccountName(businessConnectionId, [options]) ⇒ <code>Promise</code>
|
|
2736
|
+
Use this method to change the first and last name of a managed business account.
|
|
2737
|
+
|
|
2738
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2739
|
+
**Returns**: <code>Promise</code> - True on success
|
|
2740
|
+
**See**: https://core.telegram.org/bots/api#setbusinessaccountname
|
|
2741
|
+
|
|
2742
|
+
| Param | Type | Description |
|
|
2743
|
+
| --- | --- | --- |
|
|
2744
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2745
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2746
|
+
|
|
2747
|
+
<a name="TelegramBot+setBusinessAccountUsername"></a>
|
|
2748
|
+
|
|
2749
|
+
### telegramBot.setBusinessAccountUsername(businessConnectionId, [options]) ⇒ <code>Promise</code>
|
|
2750
|
+
Use this method to change the username of a managed business account.
|
|
2751
|
+
|
|
2752
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2753
|
+
**Returns**: <code>Promise</code> - True on success
|
|
2754
|
+
**See**: https://core.telegram.org/bots/api#setbusinessaccountusername
|
|
2755
|
+
|
|
2756
|
+
| Param | Type | Description |
|
|
2757
|
+
| --- | --- | --- |
|
|
2758
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2759
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2760
|
+
|
|
2761
|
+
<a name="TelegramBot+setBusinessAccountBio"></a>
|
|
2762
|
+
|
|
2763
|
+
### telegramBot.setBusinessAccountBio(businessConnectionId, [options]) ⇒ <code>Promise</code>
|
|
2764
|
+
Use this method to change the bio of a managed business account.
|
|
2765
|
+
|
|
2766
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2767
|
+
**Returns**: <code>Promise</code> - True on success
|
|
2768
|
+
**See**: https://core.telegram.org/bots/api#setbusinessaccountbio
|
|
2769
|
+
|
|
2770
|
+
| Param | Type | Description |
|
|
2771
|
+
| --- | --- | --- |
|
|
2772
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2773
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2774
|
+
|
|
2775
|
+
<a name="TelegramBot+setBusinessAccountProfilePhoto"></a>
|
|
2776
|
+
|
|
2777
|
+
### telegramBot.setBusinessAccountProfilePhoto(businessConnectionId, photo, [options]) ⇒ <code>Promise</code>
|
|
2778
|
+
Use this method to change the profile photo of a managed business account.
|
|
2779
|
+
|
|
2780
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2781
|
+
**Returns**: <code>Promise</code> - True on success
|
|
2782
|
+
**See**: https://core.telegram.org/bots/api#setbusinessaccountprofilephoto
|
|
2783
|
+
|
|
2784
|
+
| Param | Type | Description |
|
|
2785
|
+
| --- | --- | --- |
|
|
2786
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2787
|
+
| photo | <code>Object</code> | InputProfilePhoto object |
|
|
2788
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2789
|
+
|
|
2790
|
+
<a name="TelegramBot+removeBusinessAccountProfilePhoto"></a>
|
|
2791
|
+
|
|
2792
|
+
### telegramBot.removeBusinessAccountProfilePhoto(businessConnectionId, [options]) ⇒ <code>Promise</code>
|
|
2793
|
+
Use this method to remove the profile photo of a managed business account.
|
|
2794
|
+
|
|
2795
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2796
|
+
**Returns**: <code>Promise</code> - True on success
|
|
2797
|
+
**See**: https://core.telegram.org/bots/api#removebusinessaccountprofilephoto
|
|
2798
|
+
|
|
2799
|
+
| Param | Type | Description |
|
|
2800
|
+
| --- | --- | --- |
|
|
2801
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2802
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2803
|
+
|
|
2804
|
+
<a name="TelegramBot+setBusinessAccountGiftSettings"></a>
|
|
2805
|
+
|
|
2806
|
+
### telegramBot.setBusinessAccountGiftSettings(businessConnectionId, [options]) ⇒ <code>Promise</code>
|
|
2807
|
+
Use this method to change the gift settings of a managed business account.
|
|
2808
|
+
|
|
2809
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2810
|
+
**Returns**: <code>Promise</code> - True on success
|
|
2811
|
+
**See**: https://core.telegram.org/bots/api#setbusinessaccountgiftsettings
|
|
2812
|
+
|
|
2813
|
+
| Param | Type | Description |
|
|
2814
|
+
| --- | --- | --- |
|
|
2815
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2816
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2817
|
+
|
|
2818
|
+
<a name="TelegramBot+getBusinessAccountStarBalance"></a>
|
|
2819
|
+
|
|
2820
|
+
### telegramBot.getBusinessAccountStarBalance(businessConnectionId, [options]) ⇒ <code>Promise</code>
|
|
2821
|
+
Use this method to get the current Star balance of a managed business account.
|
|
2822
|
+
|
|
2823
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2824
|
+
**Returns**: <code>Promise</code> - Returns a StarAmount object
|
|
2825
|
+
**See**: https://core.telegram.org/bots/api#getbusinessaccountstarbalance
|
|
2826
|
+
|
|
2827
|
+
| Param | Type | Description |
|
|
2828
|
+
| --- | --- | --- |
|
|
2829
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2830
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2831
|
+
|
|
2832
|
+
<a name="TelegramBot+transferBusinessAccountStars"></a>
|
|
2833
|
+
|
|
2834
|
+
### telegramBot.transferBusinessAccountStars(businessConnectionId, starCount, [options]) ⇒ <code>Promise</code>
|
|
2835
|
+
Use this method to transfer Stars from the business account balance to the bot owner's balance.
|
|
2836
|
+
|
|
2837
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2838
|
+
**Returns**: <code>Promise</code> - Returns a StarAmount object
|
|
2839
|
+
**See**: https://core.telegram.org/bots/api#transferbusinessaccountstars
|
|
2840
|
+
|
|
2841
|
+
| Param | Type | Description |
|
|
2842
|
+
| --- | --- | --- |
|
|
2843
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2844
|
+
| starCount | <code>Number</code> | Number of Telegram Stars to transfer, 1-10000 |
|
|
2845
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2846
|
+
|
|
2847
|
+
<a name="TelegramBot+getBusinessAccountGifts"></a>
|
|
2848
|
+
|
|
2849
|
+
### telegramBot.getBusinessAccountGifts(businessConnectionId, [options]) ⇒ <code>Promise</code>
|
|
2850
|
+
Use this method to get the list of gifts received by a managed business account.
|
|
2851
|
+
|
|
2852
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2853
|
+
**Returns**: <code>Promise</code> - Returns an Array of OwnedGift objects
|
|
2854
|
+
**See**: https://core.telegram.org/bots/api#getbusinessaccountgifts
|
|
2855
|
+
|
|
2856
|
+
| Param | Type | Description |
|
|
2857
|
+
| --- | --- | --- |
|
|
2858
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2859
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2860
|
+
|
|
2861
|
+
<a name="TelegramBot+convertGiftToStars"></a>
|
|
2862
|
+
|
|
2863
|
+
### telegramBot.convertGiftToStars(businessConnectionId, ownedGiftId, [options]) ⇒ <code>Promise</code>
|
|
2864
|
+
Use this method to convert a given regular gift to Telegram Stars.
|
|
2865
|
+
|
|
2866
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2867
|
+
**Returns**: <code>Promise</code> - Returns a StarAmount object
|
|
2868
|
+
**See**: https://core.telegram.org/bots/api#convertgifttostars
|
|
2869
|
+
|
|
2870
|
+
| Param | Type | Description |
|
|
2871
|
+
| --- | --- | --- |
|
|
2872
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2873
|
+
| ownedGiftId | <code>String</code> | Identifier of the regular gift |
|
|
2874
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2875
|
+
|
|
2876
|
+
<a name="TelegramBot+upgradeGift"></a>
|
|
2877
|
+
|
|
2878
|
+
### telegramBot.upgradeGift(businessConnectionId, ownedGiftId, [options]) ⇒ <code>Promise</code>
|
|
2879
|
+
Use this method to upgrade a regular gift to a unique or upgrade a unique gift to an upgraded collectible gift.
|
|
2880
|
+
|
|
2881
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2882
|
+
**Returns**: <code>Promise</code> - Returns the updated OwnedGift object
|
|
2883
|
+
**See**: https://core.telegram.org/bots/api#upgradegift
|
|
2884
|
+
|
|
2885
|
+
| Param | Type | Description |
|
|
2886
|
+
| --- | --- | --- |
|
|
2887
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2888
|
+
| ownedGiftId | <code>String</code> | Identifier of the regular gift to upgrade |
|
|
2889
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2890
|
+
|
|
2891
|
+
<a name="TelegramBot+transferGift"></a>
|
|
2892
|
+
|
|
2893
|
+
### telegramBot.transferGift(businessConnectionId, ownedGiftId, newOwnerChatId, [options]) ⇒ <code>Promise</code>
|
|
2894
|
+
Use this method to transfer a regular gift to another user.
|
|
2895
|
+
|
|
2896
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2897
|
+
**Returns**: <code>Promise</code> - True on success
|
|
2898
|
+
**See**: https://core.telegram.org/bots/api#transfergift
|
|
2899
|
+
|
|
2900
|
+
| Param | Type | Description |
|
|
2901
|
+
| --- | --- | --- |
|
|
2902
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2903
|
+
| ownedGiftId | <code>String</code> | Identifier of the gift to transfer |
|
|
2904
|
+
| newOwnerChatId | <code>Number</code> \| <code>String</code> | Unique identifier of the new owner of the gift |
|
|
2905
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2906
|
+
|
|
2907
|
+
<a name="TelegramBot+postStory"></a>
|
|
2908
|
+
|
|
2909
|
+
### telegramBot.postStory(businessConnectionId, content, [options]) ⇒ <code>Promise</code>
|
|
2910
|
+
Use this method to post a story on behalf of a managed business account.
|
|
2911
|
+
|
|
2912
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2913
|
+
**Returns**: <code>Promise</code> - Returns a Story object
|
|
2914
|
+
**See**: https://core.telegram.org/bots/api#poststory
|
|
2915
|
+
|
|
2916
|
+
| Param | Type | Description |
|
|
2917
|
+
| --- | --- | --- |
|
|
2918
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2919
|
+
| content | <code>Object</code> | InputStoryContent object |
|
|
2920
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2921
|
+
|
|
2922
|
+
<a name="TelegramBot+editStory"></a>
|
|
2923
|
+
|
|
2924
|
+
### telegramBot.editStory(businessConnectionId, storyId, [options]) ⇒ <code>Promise</code>
|
|
2925
|
+
Use this method to edit a story previously posted on behalf of a managed business account.
|
|
2926
|
+
|
|
2927
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2928
|
+
**Returns**: <code>Promise</code> - Returns the edited Story object
|
|
2929
|
+
**See**: https://core.telegram.org/bots/api#editstory
|
|
2930
|
+
|
|
2931
|
+
| Param | Type | Description |
|
|
2932
|
+
| --- | --- | --- |
|
|
2933
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2934
|
+
| storyId | <code>Number</code> | Identifier of the story to edit |
|
|
2935
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2936
|
+
|
|
2937
|
+
<a name="TelegramBot+deleteStory"></a>
|
|
2938
|
+
|
|
2939
|
+
### telegramBot.deleteStory(businessConnectionId, storyId, [options]) ⇒ <code>Promise</code>
|
|
2940
|
+
Use this method to delete a story previously posted on behalf of a managed business account.
|
|
2941
|
+
|
|
2942
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2943
|
+
**Returns**: <code>Promise</code> - True on success
|
|
2944
|
+
**See**: https://core.telegram.org/bots/api#deletestory
|
|
2945
|
+
|
|
2946
|
+
| Param | Type | Description |
|
|
2947
|
+
| --- | --- | --- |
|
|
2948
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2949
|
+
| storyId | <code>Number</code> | Identifier of the story to delete |
|
|
2950
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2951
|
+
|
|
2952
|
+
<a name="TelegramBot+giftPremiumSubscription"></a>
|
|
2953
|
+
|
|
2954
|
+
### telegramBot.giftPremiumSubscription(userId, monthCount, starCount, [options]) ⇒ <code>Promise</code>
|
|
2955
|
+
Use this method to gift a Telegram Premium subscription to a user.
|
|
2956
|
+
|
|
2957
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2958
|
+
**Returns**: <code>Promise</code> - Returns the Gift object that was paid for
|
|
2959
|
+
**See**: https://core.telegram.org/bots/api#giftpremiumsubscription
|
|
2960
|
+
|
|
2961
|
+
| Param | Type | Description |
|
|
2962
|
+
| --- | --- | --- |
|
|
2963
|
+
| userId | <code>Number</code> \| <code>String</code> | Unique identifier of the target user |
|
|
2964
|
+
| monthCount | <code>Number</code> | Number of months the subscription will be active for, 1-36 |
|
|
2965
|
+
| starCount | <code>Number</code> | Number of Telegram Stars that will be paid for the subscription, 1-10000 |
|
|
2966
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2967
|
+
|
|
2968
|
+
<a name="TelegramBot+setUserEmojiStatus"></a>
|
|
2969
|
+
|
|
2970
|
+
### telegramBot.setUserEmojiStatus(userId, [options]) ⇒ <code>Promise</code>
|
|
2971
|
+
Use this method to set the emoji status of a user.
|
|
2972
|
+
|
|
2973
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2974
|
+
**Returns**: <code>Promise</code> - True on success
|
|
2975
|
+
**See**: https://core.telegram.org/bots/api#setuseremojistatus
|
|
2976
|
+
|
|
2977
|
+
| Param | Type | Description |
|
|
2978
|
+
| --- | --- | --- |
|
|
2979
|
+
| userId | <code>Number</code> \| <code>String</code> | Unique identifier of the target user |
|
|
2980
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2981
|
+
|
|
2982
|
+
<a name="TelegramBot+sendChecklist"></a>
|
|
2983
|
+
|
|
2984
|
+
### telegramBot.sendChecklist(businessConnectionId, title, tasks, [options]) ⇒ <code>Promise</code>
|
|
2985
|
+
Use this method to send a checklist on behalf of a managed business account.
|
|
2986
|
+
|
|
2987
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
2988
|
+
**Returns**: <code>Promise</code> - On success, the sent Message is returned
|
|
2989
|
+
**See**: https://core.telegram.org/bots/api#sendchecklist
|
|
2990
|
+
|
|
2991
|
+
| Param | Type | Description |
|
|
2992
|
+
| --- | --- | --- |
|
|
2993
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
2994
|
+
| title | <code>String</code> | Title of the checklist, 1-255 characters after entities parsing |
|
|
2995
|
+
| tasks | <code>Array</code> | List of 1-100 tasks in the checklist |
|
|
2996
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
2997
|
+
|
|
2998
|
+
<a name="TelegramBot+editMessageChecklist"></a>
|
|
2999
|
+
|
|
3000
|
+
### telegramBot.editMessageChecklist(businessConnectionId, messageId, [options]) ⇒ <code>Promise</code>
|
|
3001
|
+
Use this method to edit a checklist message on behalf of a managed business account.
|
|
3002
|
+
|
|
3003
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3004
|
+
**Returns**: <code>Promise</code> - On success, the edited Message is returned
|
|
3005
|
+
**See**: https://core.telegram.org/bots/api#editmessagechecklist
|
|
3006
|
+
|
|
3007
|
+
| Param | Type | Description |
|
|
3008
|
+
| --- | --- | --- |
|
|
3009
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
3010
|
+
| messageId | <code>Number</code> | Unique identifier of the message to edit |
|
|
3011
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3012
|
+
|
|
3013
|
+
<a name="TelegramBot+getMyStarBalance"></a>
|
|
3014
|
+
|
|
3015
|
+
### telegramBot.getMyStarBalance([options]) ⇒ <code>Promise</code>
|
|
3016
|
+
Use this method to get the current number of Telegram Stars owned by the bot.
|
|
3017
|
+
|
|
3018
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3019
|
+
**Returns**: <code>Promise</code> - Returns a StarAmount object
|
|
3020
|
+
**See**: https://core.telegram.org/bots/api#getmystarbalance
|
|
3021
|
+
|
|
3022
|
+
| Param | Type | Description |
|
|
3023
|
+
| --- | --- | --- |
|
|
3024
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3025
|
+
|
|
3026
|
+
<a name="TelegramBot+approveSuggestedPost"></a>
|
|
3027
|
+
|
|
3028
|
+
### telegramBot.approveSuggestedPost(businessConnectionId, messageId, [options]) ⇒ <code>Promise</code>
|
|
3029
|
+
Use this method to approve a suggested post in a channel chat.
|
|
3030
|
+
|
|
3031
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3032
|
+
**Returns**: <code>Promise</code> - True on success
|
|
3033
|
+
**See**: https://core.telegram.org/bots/api#approvesuggestedpost
|
|
3034
|
+
|
|
3035
|
+
| Param | Type | Description |
|
|
3036
|
+
| --- | --- | --- |
|
|
3037
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
3038
|
+
| messageId | <code>Number</code> | Unique identifier of the suggested post message |
|
|
3039
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3040
|
+
|
|
3041
|
+
<a name="TelegramBot+declineSuggestedPost"></a>
|
|
3042
|
+
|
|
3043
|
+
### telegramBot.declineSuggestedPost(businessConnectionId, messageId, [options]) ⇒ <code>Promise</code>
|
|
3044
|
+
Use this method to decline a suggested post in a channel chat.
|
|
3045
|
+
|
|
3046
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3047
|
+
**Returns**: <code>Promise</code> - True on success
|
|
3048
|
+
**See**: https://core.telegram.org/bots/api#declinesuggestedpost
|
|
3049
|
+
|
|
3050
|
+
| Param | Type | Description |
|
|
3051
|
+
| --- | --- | --- |
|
|
3052
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
3053
|
+
| messageId | <code>Number</code> | Unique identifier of the suggested post message |
|
|
3054
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3055
|
+
|
|
3056
|
+
<a name="TelegramBot+sendMessageDraft"></a>
|
|
3057
|
+
|
|
3058
|
+
### telegramBot.sendMessageDraft(chatId, text, [options]) ⇒ <code>Promise</code>
|
|
3059
|
+
Use this method to send a draft message to the bot's user in private chat.
|
|
3060
|
+
|
|
3061
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3062
|
+
**Returns**: <code>Promise</code> - On success, the sent Message is returned
|
|
3063
|
+
**See**: https://core.telegram.org/bots/api#sendmessagedraft
|
|
3064
|
+
|
|
3065
|
+
| Param | Type | Description |
|
|
3066
|
+
| --- | --- | --- |
|
|
3067
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier of the target private chat |
|
|
3068
|
+
| text | <code>String</code> | Text of the message, 1-4096 characters after entities parsing |
|
|
3069
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3070
|
+
|
|
3071
|
+
<a name="TelegramBot+getUserGifts"></a>
|
|
3072
|
+
|
|
3073
|
+
### telegramBot.getUserGifts(userId, [options]) ⇒ <code>Promise</code>
|
|
3074
|
+
Use this method to get gifts received by a user in a private chat.
|
|
3075
|
+
|
|
3076
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3077
|
+
**Returns**: <code>Promise</code> - Array of OwnedGift objects
|
|
3078
|
+
**See**: https://core.telegram.org/bots/api#getusergifts
|
|
3079
|
+
|
|
3080
|
+
| Param | Type | Description |
|
|
3081
|
+
| --- | --- | --- |
|
|
3082
|
+
| userId | <code>Number</code> \| <code>String</code> | Unique identifier of the target user |
|
|
3083
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3084
|
+
|
|
3085
|
+
<a name="TelegramBot+getChatGifts"></a>
|
|
3086
|
+
|
|
3087
|
+
### telegramBot.getChatGifts(chatId, [options]) ⇒ <code>Promise</code>
|
|
3088
|
+
Use this method to get gifts received by a chat.
|
|
3089
|
+
|
|
3090
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3091
|
+
**Returns**: <code>Promise</code> - Array of OwnedGift objects
|
|
3092
|
+
**See**: https://core.telegram.org/bots/api#getchatgifts
|
|
3093
|
+
|
|
3094
|
+
| Param | Type | Description |
|
|
3095
|
+
| --- | --- | --- |
|
|
3096
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier of the target chat |
|
|
3097
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3098
|
+
|
|
3099
|
+
<a name="TelegramBot+repostStory"></a>
|
|
3100
|
+
|
|
3101
|
+
### telegramBot.repostStory(businessConnectionId, storyId, targetBusinessConnectionIds, [options]) ⇒ <code>Promise</code>
|
|
3102
|
+
Use this method to repost a story on behalf of a managed business account.
|
|
3103
|
+
|
|
3104
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3105
|
+
**Returns**: <code>Promise</code> - Array of Story objects
|
|
3106
|
+
**See**: https://core.telegram.org/bots/api#repoststory
|
|
3107
|
+
|
|
3108
|
+
| Param | Type | Description |
|
|
3109
|
+
| --- | --- | --- |
|
|
3110
|
+
| businessConnectionId | <code>String</code> | Unique identifier of the business connection |
|
|
3111
|
+
| storyId | <code>Number</code> | Identifier of the story to repost |
|
|
3112
|
+
| targetBusinessConnectionIds | <code>Array.<(Number\|String)></code> | Identifiers of the business connections to post the story to |
|
|
3113
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3114
|
+
|
|
3115
|
+
<a name="TelegramBot+setMyProfilePhoto"></a>
|
|
3116
|
+
|
|
3117
|
+
### telegramBot.setMyProfilePhoto(photo, [options]) ⇒ <code>Promise</code>
|
|
3118
|
+
Use this method to set the profile photo of the bot.
|
|
3119
|
+
|
|
3120
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3121
|
+
**Returns**: <code>Promise</code> - True on success
|
|
3122
|
+
**See**: https://core.telegram.org/bots/api#setmyprofilephoto
|
|
3123
|
+
|
|
3124
|
+
| Param | Type | Description |
|
|
3125
|
+
| --- | --- | --- |
|
|
3126
|
+
| photo | <code>Object</code> | InputProfilePhoto object |
|
|
3127
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3128
|
+
|
|
3129
|
+
<a name="TelegramBot+removeMyProfilePhoto"></a>
|
|
3130
|
+
|
|
3131
|
+
### telegramBot.removeMyProfilePhoto([options]) ⇒ <code>Promise</code>
|
|
3132
|
+
Use this method to remove the profile photo of the bot.
|
|
3133
|
+
|
|
3134
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3135
|
+
**Returns**: <code>Promise</code> - True on success
|
|
3136
|
+
**See**: https://core.telegram.org/bots/api#removemyprofilephoto
|
|
3137
|
+
|
|
3138
|
+
| Param | Type | Description |
|
|
3139
|
+
| --- | --- | --- |
|
|
3140
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3141
|
+
|
|
3142
|
+
<a name="TelegramBot+getUserProfileAudios"></a>
|
|
3143
|
+
|
|
3144
|
+
### telegramBot.getUserProfileAudios(userId, [options]) ⇒ <code>Promise</code>
|
|
3145
|
+
Use this method to get the profile audios of a user.
|
|
3146
|
+
|
|
3147
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3148
|
+
**Returns**: <code>Promise</code> - Array of Audio objects
|
|
3149
|
+
**See**: https://core.telegram.org/bots/api#getuserprofileaudios
|
|
3150
|
+
|
|
3151
|
+
| Param | Type | Description |
|
|
3152
|
+
| --- | --- | --- |
|
|
3153
|
+
| userId | <code>Number</code> \| <code>String</code> | Unique identifier of the target user |
|
|
3154
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3155
|
+
|
|
3156
|
+
<a name="TelegramBot+setChatMemberTag"></a>
|
|
3157
|
+
|
|
3158
|
+
### telegramBot.setChatMemberTag(chatId, userId, [options]) ⇒ <code>Promise</code>
|
|
3159
|
+
Use this method to set the tag that is applied to a specific user in a specific group chat.
|
|
3160
|
+
|
|
3161
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3162
|
+
**Returns**: <code>Promise</code> - True on success
|
|
3163
|
+
**See**: https://core.telegram.org/bots/api#setchatmembertag
|
|
3164
|
+
|
|
3165
|
+
| Param | Type | Description |
|
|
3166
|
+
| --- | --- | --- |
|
|
3167
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target group |
|
|
3168
|
+
| userId | <code>Number</code> \| <code>String</code> | Unique identifier of the target user |
|
|
3169
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3170
|
+
|
|
3171
|
+
<a name="TelegramBot+getManagedBotToken"></a>
|
|
3172
|
+
|
|
3173
|
+
### telegramBot.getManagedBotToken(botId, [options]) ⇒ <code>Promise</code>
|
|
3174
|
+
Use this method to get the current managable bot token for the bot.
|
|
3175
|
+
|
|
3176
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3177
|
+
**Returns**: <code>Promise</code> - Returns a ManagedBotToken object
|
|
3178
|
+
**See**: https://core.telegram.org/bots/api#getmanagedbottoken
|
|
3179
|
+
|
|
3180
|
+
| Param | Type | Description |
|
|
3181
|
+
| --- | --- | --- |
|
|
3182
|
+
| botId | <code>Number</code> | Identifier of the bot to get the token for |
|
|
3183
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3184
|
+
|
|
3185
|
+
<a name="TelegramBot+replaceManagedBotToken"></a>
|
|
3186
|
+
|
|
3187
|
+
### telegramBot.replaceManagedBotToken(botId, [options]) ⇒ <code>Promise</code>
|
|
3188
|
+
Use this method to replace the managable bot token for the bot with a new one.
|
|
3189
|
+
|
|
3190
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3191
|
+
**Returns**: <code>Promise</code> - Returns a ManagedBotToken object
|
|
3192
|
+
**See**: https://core.telegram.org/bots/api#replacemanagedbottoken
|
|
3193
|
+
|
|
3194
|
+
| Param | Type | Description |
|
|
3195
|
+
| --- | --- | --- |
|
|
3196
|
+
| botId | <code>Number</code> | Identifier of the bot whose token will be replaced |
|
|
3197
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3198
|
+
|
|
3199
|
+
<a name="TelegramBot+savePreparedKeyboardButton"></a>
|
|
3200
|
+
|
|
3201
|
+
### telegramBot.savePreparedKeyboardButton(button, [options]) ⇒ <code>Promise</code>
|
|
3202
|
+
Use this method to save a prepared keyboard button for later use.
|
|
3203
|
+
|
|
3204
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3205
|
+
**Returns**: <code>Promise</code> - Returns a PreparedKeyboardButton object
|
|
3206
|
+
**See**: https://core.telegram.org/bots/api#savepreparedkeyboardbutton
|
|
3207
|
+
|
|
3208
|
+
| Param | Type | Description |
|
|
3209
|
+
| --- | --- | --- |
|
|
3210
|
+
| button | <code>Object</code> | KeyboardButton object to save |
|
|
3211
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3212
|
+
|
|
3213
|
+
<a name="TelegramBot+answerGuestQuery"></a>
|
|
3214
|
+
|
|
3215
|
+
### telegramBot.answerGuestQuery(guestQueryId, text, [options]) ⇒ <code>Promise</code>
|
|
3216
|
+
Use this method to answer a guest query in a Telegram Web App.
|
|
3217
|
+
|
|
3218
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3219
|
+
**Returns**: <code>Promise</code> - True on success
|
|
3220
|
+
**See**: https://core.telegram.org/bots/api#answerguestquery
|
|
3221
|
+
|
|
3222
|
+
| Param | Type | Description |
|
|
3223
|
+
| --- | --- | --- |
|
|
3224
|
+
| guestQueryId | <code>String</code> | Unique identifier for the query to be answered |
|
|
3225
|
+
| text | <code>String</code> | Text of the message |
|
|
3226
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3227
|
+
|
|
3228
|
+
<a name="TelegramBot+deleteAllMessageReactions"></a>
|
|
3229
|
+
|
|
3230
|
+
### telegramBot.deleteAllMessageReactions(chatId, messageId, [options]) ⇒ <code>Promise</code>
|
|
3231
|
+
Use this method to remove multiple reactions from a message.
|
|
3232
|
+
|
|
3233
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3234
|
+
**Returns**: <code>Promise</code> - True on success
|
|
3235
|
+
**See**: https://core.telegram.org/bots/api#deletemessagereactions
|
|
3236
|
+
|
|
3237
|
+
| Param | Type | Description |
|
|
3238
|
+
| --- | --- | --- |
|
|
3239
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
3240
|
+
| messageId | <code>Number</code> | Unique identifier of the target message |
|
|
3241
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3242
|
+
|
|
3243
|
+
<a name="TelegramBot+deleteMessageReaction"></a>
|
|
3244
|
+
|
|
3245
|
+
### telegramBot.deleteMessageReaction(chatId, messageId, [options]) ⇒ <code>Promise</code>
|
|
3246
|
+
Use this method to remove a reaction from a message.
|
|
3247
|
+
|
|
3248
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3249
|
+
**Returns**: <code>Promise</code> - True on success
|
|
3250
|
+
**See**: https://core.telegram.org/bots/api#deletemessagereaction
|
|
3251
|
+
|
|
3252
|
+
| Param | Type | Description |
|
|
3253
|
+
| --- | --- | --- |
|
|
3254
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
3255
|
+
| messageId | <code>Number</code> | Unique identifier of the target message |
|
|
3256
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3257
|
+
|
|
3258
|
+
<a name="TelegramBot+sendLivePhoto"></a>
|
|
3259
|
+
|
|
3260
|
+
### telegramBot.sendLivePhoto(chatId, photo, video, [options], [fileOptions]) ⇒ <code>Promise</code>
|
|
3261
|
+
Use this method to send a live photo.
|
|
3262
|
+
|
|
3263
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3264
|
+
**Returns**: <code>Promise</code> - On success, the sent Message object is returned
|
|
3265
|
+
**See**: https://core.telegram.org/bots/api#sendlivephoto
|
|
3266
|
+
|
|
3267
|
+
| Param | Type | Description |
|
|
3268
|
+
| --- | --- | --- |
|
|
3269
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
3270
|
+
| photo | <code>String</code> \| <code>stream.Stream</code> \| <code>Buffer</code> | A file path, Stream, Buffer, or file_id |
|
|
3271
|
+
| video | <code>String</code> \| <code>stream.Stream</code> \| <code>Buffer</code> | A file path, Stream, Buffer, or file_id |
|
|
3272
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3273
|
+
| [fileOptions] | <code>Object</code> | Optional file related meta-data |
|
|
3274
|
+
|
|
3275
|
+
<a name="TelegramBot+getManagedBotAccessSettings"></a>
|
|
3276
|
+
|
|
3277
|
+
### telegramBot.getManagedBotAccessSettings([options]) ⇒ <code>Promise</code>
|
|
3278
|
+
Use this method to get the current access settings of the bot for managed bots.
|
|
3279
|
+
|
|
3280
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3281
|
+
**Returns**: <code>Promise</code> - Returns a ManagedBotAccessSettings object
|
|
3282
|
+
**See**: https://core.telegram.org/bots/api#getmanagedbotaccesssettings
|
|
3283
|
+
|
|
3284
|
+
| Param | Type | Description |
|
|
3285
|
+
| --- | --- | --- |
|
|
3286
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3287
|
+
|
|
3288
|
+
<a name="TelegramBot+setManagedBotAccessSettings"></a>
|
|
3289
|
+
|
|
3290
|
+
### telegramBot.setManagedBotAccessSettings([options]) ⇒ <code>Promise</code>
|
|
3291
|
+
Use this method to change the access settings of the bot for managed bots.
|
|
3292
|
+
|
|
3293
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3294
|
+
**Returns**: <code>Promise</code> - True on success
|
|
3295
|
+
**See**: https://core.telegram.org/bots/api#setmanagedbotaccesssettings
|
|
3296
|
+
|
|
3297
|
+
| Param | Type | Description |
|
|
3298
|
+
| --- | --- | --- |
|
|
3299
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3300
|
+
|
|
3301
|
+
<a name="TelegramBot+getUserPersonalChatMessages"></a>
|
|
3302
|
+
|
|
3303
|
+
### telegramBot.getUserPersonalChatMessages(userId, [options]) ⇒ <code>Promise</code>
|
|
3304
|
+
Use this method to get messages from a user's personal chat with the bot.
|
|
3305
|
+
|
|
3306
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3307
|
+
**Returns**: <code>Promise</code> - Array of Message objects
|
|
3308
|
+
**See**: https://core.telegram.org/bots/api#getuserpersonalchatmessages
|
|
3309
|
+
|
|
3310
|
+
| Param | Type | Description |
|
|
3311
|
+
| --- | --- | --- |
|
|
3312
|
+
| userId | <code>Number</code> | Unique identifier of the target user |
|
|
3313
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3314
|
+
|
|
3315
|
+
<a name="TelegramBot+sendRichMessage"></a>
|
|
3316
|
+
|
|
3317
|
+
### telegramBot.sendRichMessage(chatId, content, [options]) ⇒ <code>Promise</code>
|
|
3318
|
+
Use this method to send a rich message.
|
|
3319
|
+
|
|
3320
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3321
|
+
**Returns**: <code>Promise</code> - On success, the sent Message object is returned
|
|
3322
|
+
**See**: https://core.telegram.org/bots/api#sendrichmessage
|
|
3323
|
+
|
|
3324
|
+
| Param | Type | Description |
|
|
3325
|
+
| --- | --- | --- |
|
|
3326
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
3327
|
+
| content | <code>Object</code> | An InputRichMessageContent object |
|
|
3328
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3329
|
+
|
|
3330
|
+
<a name="TelegramBot+sendRichMessageDraft"></a>
|
|
3331
|
+
|
|
3332
|
+
### telegramBot.sendRichMessageDraft(chatId, content, [options]) ⇒ <code>Promise</code>
|
|
3333
|
+
Use this method to send a rich message draft.
|
|
3334
|
+
|
|
3335
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3336
|
+
**Returns**: <code>Promise</code> - On success, a Message object is returned
|
|
3337
|
+
**See**: https://core.telegram.org/bots/api#sendrichmessagedraft
|
|
3338
|
+
|
|
3339
|
+
| Param | Type | Description |
|
|
3340
|
+
| --- | --- | --- |
|
|
3341
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
3342
|
+
| content | <code>Object</code> | An InputRichMessageContent object |
|
|
3343
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3344
|
+
|
|
3345
|
+
<a name="TelegramBot+answerChatJoinRequestQuery"></a>
|
|
3346
|
+
|
|
3347
|
+
### telegramBot.answerChatJoinRequestQuery(chatJoinRequestId, queryId, [options]) ⇒ <code>Promise</code>
|
|
3348
|
+
Use this method to answer a chat join request query.
|
|
3349
|
+
|
|
3350
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3351
|
+
**Returns**: <code>Promise</code> - True on success
|
|
3352
|
+
**See**: https://core.telegram.org/bots/api#answerchatjoinrequestquery
|
|
3353
|
+
|
|
3354
|
+
| Param | Type | Description |
|
|
3355
|
+
| --- | --- | --- |
|
|
3356
|
+
| chatJoinRequestId | <code>Number</code> | Unique identifier of the chat join request |
|
|
3357
|
+
| queryId | <code>String</code> | Unique identifier for the query to be answered |
|
|
3358
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3359
|
+
|
|
3360
|
+
<a name="TelegramBot+sendChatJoinRequestWebApp"></a>
|
|
3361
|
+
|
|
3362
|
+
### telegramBot.sendChatJoinRequestWebApp(chatJoinRequestId, webApp, [options]) ⇒ <code>Promise</code>
|
|
3363
|
+
Use this method to send a Web App message to a chat join request.
|
|
3364
|
+
|
|
3365
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3366
|
+
**Returns**: <code>Promise</code> - True on success
|
|
3367
|
+
**See**: https://core.telegram.org/bots/api#sendchatjoinrequestwebapp
|
|
3368
|
+
|
|
3369
|
+
| Param | Type | Description |
|
|
3370
|
+
| --- | --- | --- |
|
|
3371
|
+
| chatJoinRequestId | <code>Number</code> | Unique identifier of the chat join request |
|
|
3372
|
+
| webApp | <code>Object</code> | A SentWebAppMessage object |
|
|
3373
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3374
|
+
|
|
3375
|
+
<a name="TelegramBot+editEphemeralMessageText"></a>
|
|
3376
|
+
|
|
3377
|
+
### telegramBot.editEphemeralMessageText(chatId, ephemeralMessageId, text, [options]) ⇒ <code>Promise</code>
|
|
3378
|
+
Use this method to edit the text of an ephemeral message.
|
|
3379
|
+
|
|
3380
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3381
|
+
**Returns**: <code>Promise</code> - On success, the edited Message object is returned
|
|
3382
|
+
**See**: https://core.telegram.org/bots/api#editephemeralmessagetext
|
|
3383
|
+
|
|
3384
|
+
| Param | Type | Description |
|
|
3385
|
+
| --- | --- | --- |
|
|
3386
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
3387
|
+
| ephemeralMessageId | <code>String</code> | Unique identifier of the ephemeral message |
|
|
3388
|
+
| text | <code>String</code> | New text of the message |
|
|
3389
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3390
|
+
|
|
3391
|
+
<a name="TelegramBot+editEphemeralMessageMedia"></a>
|
|
3392
|
+
|
|
3393
|
+
### telegramBot.editEphemeralMessageMedia(chatId, ephemeralMessageId, media, [options], [fileOptions]) ⇒ <code>Promise</code>
|
|
3394
|
+
Use this method to edit the media of an ephemeral message.
|
|
3395
|
+
|
|
3396
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3397
|
+
**Returns**: <code>Promise</code> - On success, the edited Message object is returned
|
|
3398
|
+
**See**: https://core.telegram.org/bots/api#editephemeralmessagemedia
|
|
3399
|
+
|
|
3400
|
+
| Param | Type | Description |
|
|
3401
|
+
| --- | --- | --- |
|
|
3402
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
3403
|
+
| ephemeralMessageId | <code>String</code> | Unique identifier of the ephemeral message |
|
|
3404
|
+
| media | <code>Object</code> | An InputMedia object |
|
|
3405
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3406
|
+
| [fileOptions] | <code>Object</code> | Optional file related meta-data |
|
|
3407
|
+
|
|
3408
|
+
<a name="TelegramBot+editEphemeralMessageCaption"></a>
|
|
3409
|
+
|
|
3410
|
+
### telegramBot.editEphemeralMessageCaption(chatId, ephemeralMessageId, [options]) ⇒ <code>Promise</code>
|
|
3411
|
+
Use this method to edit the caption of an ephemeral message.
|
|
3412
|
+
|
|
3413
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3414
|
+
**Returns**: <code>Promise</code> - On success, the edited Message object is returned
|
|
3415
|
+
**See**: https://core.telegram.org/bots/api#editephemeralmessagecaption
|
|
3416
|
+
|
|
3417
|
+
| Param | Type | Description |
|
|
3418
|
+
| --- | --- | --- |
|
|
3419
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
3420
|
+
| ephemeralMessageId | <code>String</code> | Unique identifier of the ephemeral message |
|
|
3421
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3422
|
+
|
|
3423
|
+
<a name="TelegramBot+editEphemeralMessageReplyMarkup"></a>
|
|
3424
|
+
|
|
3425
|
+
### telegramBot.editEphemeralMessageReplyMarkup(chatId, ephemeralMessageId, [options]) ⇒ <code>Promise</code>
|
|
3426
|
+
Use this method to edit the reply markup of an ephemeral message.
|
|
3427
|
+
|
|
3428
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3429
|
+
**Returns**: <code>Promise</code> - On success, the edited Message object is returned
|
|
3430
|
+
**See**: https://core.telegram.org/bots/api#editephemeralmessagereplymarkup
|
|
3431
|
+
|
|
3432
|
+
| Param | Type | Description |
|
|
3433
|
+
| --- | --- | --- |
|
|
3434
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
3435
|
+
| ephemeralMessageId | <code>String</code> | Unique identifier of the ephemeral message |
|
|
3436
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3437
|
+
|
|
3438
|
+
<a name="TelegramBot+deleteEphemeralMessage"></a>
|
|
3439
|
+
|
|
3440
|
+
### telegramBot.deleteEphemeralMessage(chatId, ephemeralMessageId, [options]) ⇒ <code>Promise</code>
|
|
3441
|
+
Use this method to delete an ephemeral message.
|
|
3442
|
+
|
|
3443
|
+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
|
|
3444
|
+
**Returns**: <code>Promise</code> - True on success
|
|
3445
|
+
**See**: https://core.telegram.org/bots/api#deleteephemeralmessage
|
|
3446
|
+
|
|
3447
|
+
| Param | Type | Description |
|
|
3448
|
+
| --- | --- | --- |
|
|
3449
|
+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
|
|
3450
|
+
| ephemeralMessageId | <code>String</code> | Unique identifier of the ephemeral message |
|
|
3451
|
+
| [options] | <code>Object</code> | Additional Telegram query options |
|
|
3452
|
+
|
|
2450
3453
|
<a name="TelegramBot.errors"></a>
|
|
2451
3454
|
|
|
2452
3455
|
### TelegramBot.errors : <code>Object</code>
|