@mtkruto/node 0.66.8 → 0.66.9
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/esm/3_types.d.ts +3 -1
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +3 -1
- package/esm/client/0_params.d.ts +19 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +8 -12
- package/esm/client/3_message_manager.d.ts +2 -1
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +32 -1
- package/esm/client/4_callback_query_manager.d.ts +1 -1
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +2 -2
- package/esm/client/4_inline_query_manager.d.ts +1 -1
- package/esm/client/4_inline_query_manager.js +2 -2
- package/esm/client/5_client.d.ts +124 -114
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +126 -114
- package/esm/types/{0_mini_app_info.d.ts → 0_mini_app_button_info.d.ts} +3 -4
- package/esm/types/0_mini_app_button_info.d.ts.map +1 -0
- package/esm/types/{0_mini_app_info.js → 0_mini_app_button_info.js} +1 -1
- package/esm/types/0_mini_app_mode.d.ts +22 -0
- package/esm/types/0_mini_app_mode.d.ts.map +1 -0
- package/esm/types/0_mini_app_mode.js +20 -0
- package/esm/types/1_inline_query_result_button.d.ts +2 -2
- package/esm/types/1_inline_query_result_button.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.d.ts +2 -2
- package/esm/types/1_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_mini_app_info.d.ts +32 -0
- package/esm/types/1_mini_app_info.d.ts.map +1 -0
- package/esm/types/1_mini_app_info.js +27 -0
- package/esm/types/2_inline_keyboard_button.d.ts +2 -2
- package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/esm/types/2_inline_keyboard_button.js +2 -2
- package/package.json +1 -1
- package/script/3_types.d.ts +3 -1
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +3 -1
- package/script/client/0_params.d.ts +19 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +8 -12
- package/script/client/3_message_manager.d.ts +2 -1
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +31 -0
- package/script/client/4_callback_query_manager.d.ts +1 -1
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +2 -2
- package/script/client/4_inline_query_manager.d.ts +1 -1
- package/script/client/4_inline_query_manager.js +2 -2
- package/script/client/5_client.d.ts +124 -114
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +126 -114
- package/script/types/{0_mini_app_info.d.ts → 0_mini_app_button_info.d.ts} +3 -4
- package/script/types/0_mini_app_button_info.d.ts.map +1 -0
- package/script/types/{0_mini_app_info.js → 0_mini_app_button_info.js} +2 -2
- package/script/types/0_mini_app_mode.d.ts +22 -0
- package/script/types/0_mini_app_mode.d.ts.map +1 -0
- package/script/types/0_mini_app_mode.js +21 -0
- package/script/types/1_inline_query_result_button.d.ts +2 -2
- package/script/types/1_inline_query_result_button.d.ts.map +1 -1
- package/script/types/1_keyboard_button.d.ts +2 -2
- package/script/types/1_keyboard_button.d.ts.map +1 -1
- package/script/types/1_mini_app_info.d.ts +32 -0
- package/script/types/1_mini_app_info.d.ts.map +1 -0
- package/script/types/1_mini_app_info.js +30 -0
- package/script/types/2_inline_keyboard_button.d.ts +2 -2
- package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/script/types/2_inline_keyboard_button.js +2 -2
- package/esm/types/0_mini_app_info.d.ts.map +0 -1
- package/script/types/0_mini_app_info.d.ts.map +0 -1
package/esm/client/5_client.d.ts
CHANGED
|
@@ -21,9 +21,9 @@ import { MaybePromise } from "../1_utilities.js";
|
|
|
21
21
|
import { Storage } from "../2_storage.js";
|
|
22
22
|
import { Api, Mtproto } from "../2_tl.js";
|
|
23
23
|
import { DC } from "../3_transport.js";
|
|
24
|
-
import { BotCommand, BusinessConnection, CallbackQueryAnswer, CallbackQueryQuestion, Chat, ChatAction, ChatListItem, ChatMember, ChatP, type ChatPChannel, type ChatPGroup, type ChatPSupergroup, ChatSettings, ClaimedGifts, FailedInvitation, FileSource, Gift, ID, InactiveChat, InlineQueryAnswer, InlineQueryResult, InputMedia, InputStoryContent, InviteLink, JoinRequest, LinkPreview, LiveStreamChannel, Message, MessageAnimation, MessageAudio, MessageContact, MessageDice, MessageDocument, MessageInvoice, MessageLocation, MessagePhoto, MessagePoll, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, NetworkStatistics, ParseMode, Poll, PriceTag, Reaction, SlowModeDuration, Sticker, Story, Topic, Translation, Update, User, VideoChat, VideoChatActive, VideoChatScheduled, VoiceTranscription } from "../3_types.js";
|
|
24
|
+
import { BotCommand, BusinessConnection, CallbackQueryAnswer, CallbackQueryQuestion, Chat, ChatAction, ChatListItem, ChatMember, ChatP, type ChatPChannel, type ChatPGroup, type ChatPSupergroup, ChatSettings, ClaimedGifts, FailedInvitation, FileSource, Gift, ID, InactiveChat, InlineQueryAnswer, InlineQueryResult, InputMedia, InputStoryContent, InviteLink, JoinRequest, LinkPreview, LiveStreamChannel, Message, MessageAnimation, MessageAudio, MessageContact, MessageDice, MessageDocument, MessageInvoice, MessageLocation, MessagePhoto, MessagePoll, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, MiniAppInfo, NetworkStatistics, ParseMode, Poll, PriceTag, Reaction, SlowModeDuration, Sticker, Story, Topic, Translation, Update, User, VideoChat, VideoChatActive, VideoChatScheduled, VoiceTranscription } from "../3_types.js";
|
|
25
25
|
import { Migrate } from "../4_errors.js";
|
|
26
|
-
import { AddChatMemberParams, AddContactParams, AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, type CreateChannelParams, type CreateGroupParams, CreateInviteLinkParams, CreateStoryParams, type CreateSupergroupParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteMessageParams, DeleteMessagesParams, DownloadLiveStreamChunkParams, DownloadParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageTextParams, EditTopicParams, ForwardMessagesParams, GetChatMembersParams, GetChatsParams, GetClaimedGiftsParams, GetCommonChatsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetLinkPreviewParams, GetMyCommandsParams, GetTranslationsParams, InvokeParams, JoinVideoChatParams, PinMessageParams, ReplyParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInlineQueryParams, SendInvoiceParams, SendLocationParams, SendMediaGroupParams, SendMessageParams, SendPhotoParams, SendPollParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetBirthdayParams, SetChatMemberRightsParams, SetChatPhotoParams, SetEmojiStatusParams, SetLocationParams, SetMyCommandsParams, SetNameColorParams, SetPersonalChannelParams, SetProfileColorParams, SetReactionsParams, SetSignaturesEnabledParams, SignInParams, type StartBotParams, StartVideoChatParams, StopPollParams, UnpinMessageParams, UpdateProfileParams } from "./0_params.js";
|
|
26
|
+
import { AddChatMemberParams, AddContactParams, AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, type CreateChannelParams, type CreateGroupParams, CreateInviteLinkParams, CreateStoryParams, type CreateSupergroupParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteMessageParams, DeleteMessagesParams, DownloadLiveStreamChunkParams, DownloadParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageTextParams, EditTopicParams, ForwardMessagesParams, GetChatMembersParams, GetChatsParams, GetClaimedGiftsParams, GetCommonChatsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetLinkPreviewParams, GetMyCommandsParams, GetTranslationsParams, InvokeParams, JoinVideoChatParams, OpenMiniAppParams, PinMessageParams, ReplyParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInlineQueryParams, SendInvoiceParams, SendLocationParams, SendMediaGroupParams, SendMessageParams, SendPhotoParams, SendPollParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetBirthdayParams, SetChatMemberRightsParams, SetChatPhotoParams, SetEmojiStatusParams, SetLocationParams, SetMyCommandsParams, SetNameColorParams, SetPersonalChannelParams, SetProfileColorParams, SetReactionsParams, SetSignaturesEnabledParams, SignInParams, type StartBotParams, StartVideoChatParams, StopPollParams, UnpinMessageParams, UpdateProfileParams } from "./0_params.js";
|
|
27
27
|
import { StorageOperations } from "./0_storage_operations.js";
|
|
28
28
|
import { ClientPlainParams } from "./1_client_plain.js";
|
|
29
29
|
import { Composer as Composer_, Middleware, MiddlewareFn, MiddlewareObj, NextFunction } from "./1_composer.js";
|
|
@@ -315,7 +315,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
315
315
|
/**
|
|
316
316
|
* Get a chat's inputPeer. Useful when calling API functions directly.
|
|
317
317
|
*
|
|
318
|
-
* @param id The identifier of
|
|
318
|
+
* @param id The identifier of a chat.
|
|
319
319
|
*/
|
|
320
320
|
getInputPeer(id: ID): Promise<Api.InputPeer>;
|
|
321
321
|
/**
|
|
@@ -444,7 +444,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
444
444
|
* Send a text message.
|
|
445
445
|
*
|
|
446
446
|
* @method ms
|
|
447
|
-
* @param chatId The chat to send the message to.
|
|
447
|
+
* @param chatId The identifier of a chat to send the message to.
|
|
448
448
|
* @param text The message's text.
|
|
449
449
|
* @returns The sent text message.
|
|
450
450
|
*/
|
|
@@ -453,7 +453,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
453
453
|
* Send a photo.
|
|
454
454
|
*
|
|
455
455
|
* @method ms
|
|
456
|
-
* @param chatId The chat to send the photo to.
|
|
456
|
+
* @param chatId The identifier of a chat to send the photo to.
|
|
457
457
|
* @param photo The photo to send.
|
|
458
458
|
* @returns The sent photo.
|
|
459
459
|
*/
|
|
@@ -462,7 +462,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
462
462
|
* Send a document.
|
|
463
463
|
*
|
|
464
464
|
* @method ms
|
|
465
|
-
* @param chatId The chat to send the document to.
|
|
465
|
+
* @param chatId The identifier of a chat to send the document to.
|
|
466
466
|
* @param document The document to send.
|
|
467
467
|
* @returns The sent document.
|
|
468
468
|
*/
|
|
@@ -471,7 +471,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
471
471
|
* Send a sticker.
|
|
472
472
|
*
|
|
473
473
|
* @method ms
|
|
474
|
-
* @param chatId The chat to send the sticker to.
|
|
474
|
+
* @param chatId The identifier of a chat to send the sticker to.
|
|
475
475
|
* @param document The sticker to send.
|
|
476
476
|
* @returns The sent sticker.
|
|
477
477
|
*/
|
|
@@ -480,7 +480,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
480
480
|
* Send a video.
|
|
481
481
|
*
|
|
482
482
|
* @method ms
|
|
483
|
-
* @param chatId The chat to send the video to.
|
|
483
|
+
* @param chatId The identifier of a chat to send the video to.
|
|
484
484
|
* @param video The video to send.
|
|
485
485
|
* @returns The sent video.
|
|
486
486
|
*/
|
|
@@ -489,7 +489,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
489
489
|
* Send an animation.
|
|
490
490
|
*
|
|
491
491
|
* @method ms
|
|
492
|
-
* @param chatId The chat to send the animation to.
|
|
492
|
+
* @param chatId The identifier of a chat to send the animation to.
|
|
493
493
|
* @param animation The animation to send.
|
|
494
494
|
* @returns The sent animation.
|
|
495
495
|
*/
|
|
@@ -498,7 +498,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
498
498
|
* Send a voice message.
|
|
499
499
|
*
|
|
500
500
|
* @method ms
|
|
501
|
-
* @param chatId The chat to send the voice message to.
|
|
501
|
+
* @param chatId The identifier of a chat to send the voice message to.
|
|
502
502
|
* @param voice The voice to send.
|
|
503
503
|
* @returns The sent voice message.
|
|
504
504
|
*/
|
|
@@ -507,7 +507,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
507
507
|
* Send an audio file.
|
|
508
508
|
*
|
|
509
509
|
* @method ms
|
|
510
|
-
* @param chatId The chat to send the audio file to.
|
|
510
|
+
* @param chatId The identifier of a chat to send the audio file to.
|
|
511
511
|
* @param audio The audio to send.
|
|
512
512
|
* @returns The sent audio filr.
|
|
513
513
|
*/
|
|
@@ -516,7 +516,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
516
516
|
* Send a media group.
|
|
517
517
|
*
|
|
518
518
|
* @method ms
|
|
519
|
-
* @param chatId The chat to send the media group to.
|
|
519
|
+
* @param chatId The identifier of a chat to send the media group to.
|
|
520
520
|
* @param media The media to include in the media group. Animations are not allowed. All of them must be of the same media type, but an exception is that photos and videos can be mixed.
|
|
521
521
|
* @returns The sent messages.
|
|
522
522
|
*/
|
|
@@ -525,7 +525,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
525
525
|
* Send a video note.
|
|
526
526
|
*
|
|
527
527
|
* @method ms
|
|
528
|
-
* @param chatId The chat to send the video note to.
|
|
528
|
+
* @param chatId The identifier of a chat to send the video note to.
|
|
529
529
|
* @param videoNote The video note to send.
|
|
530
530
|
* @returns The sent video note.
|
|
531
531
|
*/
|
|
@@ -534,7 +534,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
534
534
|
* Send a location.
|
|
535
535
|
*
|
|
536
536
|
* @method ms
|
|
537
|
-
* @param chatId The chat to send the location to.
|
|
537
|
+
* @param chatId The identifier of a chat to send the location to.
|
|
538
538
|
* @param latitude The location's latitude.
|
|
539
539
|
* @param longitude The location's longitude.
|
|
540
540
|
* @returns The sent location.
|
|
@@ -544,7 +544,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
544
544
|
* Send a contact.
|
|
545
545
|
*
|
|
546
546
|
* @method ms
|
|
547
|
-
* @param chatId The chat to send the contact to.
|
|
547
|
+
* @param chatId The identifier of a chat to send the contact to.
|
|
548
548
|
* @param firstName The contact's first name.
|
|
549
549
|
* @param number The contact's phone number.
|
|
550
550
|
* @returns The sent contact.
|
|
@@ -554,7 +554,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
554
554
|
* Send a dice.
|
|
555
555
|
*
|
|
556
556
|
* @method ms
|
|
557
|
-
* @param chatId The chat to send the dice to.
|
|
557
|
+
* @param chatId The identifier of a chat to send the dice to.
|
|
558
558
|
* @returns The sent dice.
|
|
559
559
|
*/
|
|
560
560
|
sendDice(chatId: ID, params?: SendDiceParams): Promise<MessageDice>;
|
|
@@ -562,7 +562,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
562
562
|
* Send a venue.
|
|
563
563
|
*
|
|
564
564
|
* @method ms
|
|
565
|
-
* @param chatId The chat to send the venue to.
|
|
565
|
+
* @param chatId The identifier of a chat to send the venue to.
|
|
566
566
|
* @param latitude The latitude of the venue.
|
|
567
567
|
* @param longitude The longitude of the venue.
|
|
568
568
|
* @param title The title of the venue.
|
|
@@ -574,7 +574,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
574
574
|
* Send a poll.
|
|
575
575
|
*
|
|
576
576
|
* @method ms
|
|
577
|
-
* @param chatId The chat to send the poll to.
|
|
577
|
+
* @param chatId The identifier of a chat to send the poll to.
|
|
578
578
|
* @param question The poll's question.
|
|
579
579
|
* @param options The poll's options.
|
|
580
580
|
* @returns The sent poll.
|
|
@@ -584,7 +584,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
584
584
|
* Send an invoice. Bot-only.
|
|
585
585
|
*
|
|
586
586
|
* @method ms
|
|
587
|
-
* @param chatId The chat to send the invoice to.
|
|
587
|
+
* @param chatId The identifier of a chat to send the invoice to.
|
|
588
588
|
* @param title The invoice's title.
|
|
589
589
|
* @param description The invoice's description.
|
|
590
590
|
* @param payload The invoice's payload.
|
|
@@ -597,8 +597,8 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
597
597
|
* Edit a message's text.
|
|
598
598
|
*
|
|
599
599
|
* @method ms
|
|
600
|
-
* @param chatId The identifier of the chat
|
|
601
|
-
* @param messageId The message
|
|
600
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
601
|
+
* @param messageId The identifier of the message.
|
|
602
602
|
* @param text The new text of the message.
|
|
603
603
|
* @returns The edited text message.
|
|
604
604
|
*/
|
|
@@ -607,8 +607,8 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
607
607
|
* Edit a message's caption.
|
|
608
608
|
*
|
|
609
609
|
* @method ms
|
|
610
|
-
* @param chatId The identifier of the chat
|
|
611
|
-
* @param messageId The message
|
|
610
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
611
|
+
* @param messageId The identifier of the message.
|
|
612
612
|
* @param text The new caption of the message.
|
|
613
613
|
* @returns The edited message.
|
|
614
614
|
*/
|
|
@@ -617,8 +617,8 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
617
617
|
* Edit a message's media.
|
|
618
618
|
*
|
|
619
619
|
* @method ms
|
|
620
|
-
* @param chatId The identifier of the chat
|
|
621
|
-
* @param messageId The message
|
|
620
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
621
|
+
* @param messageId The identifier of the message.
|
|
622
622
|
* @param media The new media of the message.
|
|
623
623
|
* @returns The edited message.
|
|
624
624
|
*/
|
|
@@ -627,7 +627,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
627
627
|
* Edit an inline message's media.
|
|
628
628
|
*
|
|
629
629
|
* @method ms
|
|
630
|
-
* @param inlineMessageId The inline message
|
|
630
|
+
* @param inlineMessageId The identifier of the inline message.
|
|
631
631
|
* @param media The new media of the message.
|
|
632
632
|
*/
|
|
633
633
|
editInlineMessageMedia(inlineMessageId: string, media: InputMedia, params?: EditInlineMessageMediaParams): Promise<void>;
|
|
@@ -635,7 +635,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
635
635
|
* Edit an inline message's text. Bot-only.
|
|
636
636
|
*
|
|
637
637
|
* @method ms
|
|
638
|
-
* @param inlineMessageId The inline message
|
|
638
|
+
* @param inlineMessageId The identifier of the inline message.
|
|
639
639
|
* @param text The new text of the message.
|
|
640
640
|
*/
|
|
641
641
|
editInlineMessageText(inlineMessageId: string, text: string, params?: EditInlineMessageTextParams): Promise<void>;
|
|
@@ -643,15 +643,15 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
643
643
|
* Edit an inline message's caption. Bot-only.
|
|
644
644
|
*
|
|
645
645
|
* @method ms
|
|
646
|
-
* @param inlineMessageId The inline message
|
|
646
|
+
* @param inlineMessageId The identifier of the inline message.
|
|
647
647
|
*/
|
|
648
648
|
editInlineMessageCaption(inlineMessageId: string, params?: EditInlineMessageCaptionParams): Promise<void>;
|
|
649
649
|
/**
|
|
650
650
|
* Edit a message's reply markup.
|
|
651
651
|
*
|
|
652
652
|
* @method ms
|
|
653
|
-
* @param chatId The identifier of the chat
|
|
654
|
-
* @param messageId The message
|
|
653
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
654
|
+
* @param messageId The identifier of the message.
|
|
655
655
|
* @returns The edited message.
|
|
656
656
|
*/
|
|
657
657
|
editMessageReplyMarkup(chatId: ID, messageId: number, params?: EditMessageReplyMarkupParams): Promise<Message>;
|
|
@@ -659,15 +659,15 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
659
659
|
* Edit an inline message's reply markup. Bot-only.
|
|
660
660
|
*
|
|
661
661
|
* @method ms
|
|
662
|
-
* @param inlineMessageId The inline message
|
|
662
|
+
* @param inlineMessageId The identifier of the inline message.
|
|
663
663
|
*/
|
|
664
664
|
editInlineMessageReplyMarkup(inlineMessageId: string, params?: EditMessageReplyMarkupParams): Promise<void>;
|
|
665
665
|
/**
|
|
666
666
|
* Edit a message's live location.
|
|
667
667
|
*
|
|
668
668
|
* @method ms
|
|
669
|
-
* @param chatId The identifier of the chat
|
|
670
|
-
* @param messageId The message
|
|
669
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
670
|
+
* @param messageId The identifier of the message.
|
|
671
671
|
* @param latitude The new latitude.
|
|
672
672
|
* @param longitude The new longitude.
|
|
673
673
|
* @returns The edited location message.
|
|
@@ -677,7 +677,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
677
677
|
* Edit an inline message's live location. Bot-only.
|
|
678
678
|
*
|
|
679
679
|
* @method ms
|
|
680
|
-
* @param inlineMessageId The inline message
|
|
680
|
+
* @param inlineMessageId The identifier of the inline message.
|
|
681
681
|
* @param latitude The new latitude.
|
|
682
682
|
* @param longitude The new longitude.
|
|
683
683
|
* @returns The edited location message.
|
|
@@ -687,7 +687,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
687
687
|
* Retrieve multiple messages.
|
|
688
688
|
*
|
|
689
689
|
* @method ms
|
|
690
|
-
* @param chatId The identifier of
|
|
690
|
+
* @param chatId The identifier of a chat to retrieve the messages from.
|
|
691
691
|
* @param messageIds The identifiers of the messages to retrieve.
|
|
692
692
|
* @example ```ts
|
|
693
693
|
* const message = await client.getMessages("@MTKruto", [210, 212]);
|
|
@@ -700,7 +700,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
700
700
|
* Retrieve a single message.
|
|
701
701
|
*
|
|
702
702
|
* @method ms
|
|
703
|
-
* @param chatId The identifier of
|
|
703
|
+
* @param chatId The identifier of a chat.
|
|
704
704
|
* @param messageId The identifier of the message to retrieve.
|
|
705
705
|
* @example ```ts
|
|
706
706
|
* const message = await client.getMessage("@MTKruto", 212);
|
|
@@ -724,7 +724,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
724
724
|
* Delete multiple messages.
|
|
725
725
|
*
|
|
726
726
|
* @method ms
|
|
727
|
-
* @param chatId The identifier of the chat
|
|
727
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
728
728
|
* @param messageIds The identifiers of the messages to delete.
|
|
729
729
|
*/
|
|
730
730
|
deleteMessages(chatId: ID, messageIds: number[], params?: DeleteMessagesParams): Promise<void>;
|
|
@@ -732,7 +732,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
732
732
|
* Delete a single message.
|
|
733
733
|
*
|
|
734
734
|
* @method ms
|
|
735
|
-
* @param chatId The identifier of the chat
|
|
735
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
736
736
|
* @param messageId The identifier of the message to delete.
|
|
737
737
|
*/
|
|
738
738
|
deleteMessage(chatId: ID, messageId: number, params?: DeleteMessageParams): Promise<void>;
|
|
@@ -740,7 +740,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
740
740
|
* Delete all messages sent by a specific member of a chat. User-only.
|
|
741
741
|
*
|
|
742
742
|
* @method ms
|
|
743
|
-
* @param chatId The identifier of
|
|
743
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
744
744
|
* @param memberId The identifier of the member.
|
|
745
745
|
*/
|
|
746
746
|
deleteChatMemberMessages(chatId: ID, memberId: ID): Promise<void>;
|
|
@@ -748,7 +748,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
748
748
|
* Delete multiple scheduled messages.
|
|
749
749
|
*
|
|
750
750
|
* @method ms
|
|
751
|
-
* @param chatId The identifier of
|
|
751
|
+
* @param chatId The identifier of a chat.
|
|
752
752
|
* @param messageIds The identifiers of the scheduled messages to delete.
|
|
753
753
|
*/
|
|
754
754
|
deleteScheduledMessages(chatId: ID, messageIds: number[]): Promise<void>;
|
|
@@ -756,7 +756,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
756
756
|
* Delete a scheduled message.
|
|
757
757
|
*
|
|
758
758
|
* @method ms
|
|
759
|
-
* @param chatId The identifier of
|
|
759
|
+
* @param chatId The identifier of a chat.
|
|
760
760
|
* @param messageId The identifier of the scheduled message to delete.
|
|
761
761
|
*/
|
|
762
762
|
deleteScheduledMessage(chatId: ID, messageId: number): Promise<void>;
|
|
@@ -764,7 +764,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
764
764
|
* Send multiple scheduled messages before their schedule.
|
|
765
765
|
*
|
|
766
766
|
* @method ms
|
|
767
|
-
* @param chatId The identifier of
|
|
767
|
+
* @param chatId The identifier of a chat.
|
|
768
768
|
* @param messageIds The identifiers of the scheduled messages to send.
|
|
769
769
|
*/
|
|
770
770
|
sendScheduledMessages(chatId: ID, messageIds: number[]): Promise<Message[]>;
|
|
@@ -772,7 +772,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
772
772
|
* Send a scheduled message before its schedule.
|
|
773
773
|
*
|
|
774
774
|
* @method ms
|
|
775
|
-
* @param chatId The identifier of
|
|
775
|
+
* @param chatId The identifier of a chat.
|
|
776
776
|
* @param messageId The identifier of the scheduled message to send.
|
|
777
777
|
*/
|
|
778
778
|
sendScheduledMessage(chatId: ID, messageId: number): Promise<Message>;
|
|
@@ -780,31 +780,31 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
780
780
|
* Pin a message in a chat.
|
|
781
781
|
*
|
|
782
782
|
* @method ms
|
|
783
|
-
* @param chatId The identifier of
|
|
784
|
-
* @param messageId The message
|
|
783
|
+
* @param chatId The identifier of a chat.
|
|
784
|
+
* @param messageId The identifier of the message.
|
|
785
785
|
*/
|
|
786
786
|
pinMessage(chatId: ID, messageId: number, params?: PinMessageParams): Promise<void>;
|
|
787
787
|
/**
|
|
788
788
|
* Unpin a pinned message.
|
|
789
789
|
*
|
|
790
790
|
* @method ms
|
|
791
|
-
* @param chatId The identifier of
|
|
792
|
-
* @param messageId The message
|
|
791
|
+
* @param chatId The identifier of a chat.
|
|
792
|
+
* @param messageId The identifier of the message.
|
|
793
793
|
*/
|
|
794
794
|
unpinMessage(chatId: ID, messageId: number, params?: UnpinMessageParams): Promise<void>;
|
|
795
795
|
/**
|
|
796
796
|
* Unpin all pinned messages.
|
|
797
797
|
*
|
|
798
798
|
* @method ms
|
|
799
|
-
* @param chatId The identifier of
|
|
799
|
+
* @param chatId The identifier of a chat.
|
|
800
800
|
*/
|
|
801
801
|
unpinMessages(chatId: ID): Promise<void>;
|
|
802
802
|
/**
|
|
803
803
|
* Forward multiple messages.
|
|
804
804
|
*
|
|
805
805
|
* @method ms
|
|
806
|
-
* @param from The identifier of
|
|
807
|
-
* @param to The identifier of
|
|
806
|
+
* @param from The identifier of a chat to forward the messages from.
|
|
807
|
+
* @param to The identifier of a chat to forward the messages to.
|
|
808
808
|
* @param messageIds The identifiers of the messages to forward.
|
|
809
809
|
* @returns The forwarded messages.
|
|
810
810
|
*/
|
|
@@ -813,8 +813,8 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
813
813
|
* Forward a single message.
|
|
814
814
|
*
|
|
815
815
|
* @method ms
|
|
816
|
-
* @param from The identifier of
|
|
817
|
-
* @param to The identifier of
|
|
816
|
+
* @param from The identifier of a chat to forward the message from.
|
|
817
|
+
* @param to The identifier of a chat to forward the message to.
|
|
818
818
|
* @param messageId The identifier of the message to forward.
|
|
819
819
|
* @returns The forwarded message.
|
|
820
820
|
*/
|
|
@@ -832,7 +832,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
832
832
|
* Send a chat action.
|
|
833
833
|
*
|
|
834
834
|
* @method ms
|
|
835
|
-
* @param chatId The chat to send the chat action to.
|
|
835
|
+
* @param chatId The identifier of a chat to send the chat action to.
|
|
836
836
|
* @param action The chat action.
|
|
837
837
|
* @param messageThreadId The thread to send the chat action to.
|
|
838
838
|
*/
|
|
@@ -843,7 +843,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
843
843
|
* Search the messages of a chat. User-only.
|
|
844
844
|
*
|
|
845
845
|
* @method ms
|
|
846
|
-
* @param chatId The identifier of
|
|
846
|
+
* @param chatId The identifier of a chat.
|
|
847
847
|
* @param query The message search query.
|
|
848
848
|
*/
|
|
849
849
|
searchMessages(chatId: ID, query: string, params?: SearchMessagesParams): Promise<Message[]>;
|
|
@@ -851,8 +851,8 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
851
851
|
* Mark messages as read. User-only.
|
|
852
852
|
*
|
|
853
853
|
* @method ms
|
|
854
|
-
* @param chatId The identifier of the chat
|
|
855
|
-
* @param untilMessageId The identifier of
|
|
854
|
+
* @param chatId The identifier of the chat which the messages belong to.
|
|
855
|
+
* @param untilMessageId The identifier of the message that will be marked as read, along with any other unread messages before it.
|
|
856
856
|
*/
|
|
857
857
|
readMessages(chatId: ID, untilMessageId: number): Promise<void>;
|
|
858
858
|
/**
|
|
@@ -867,7 +867,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
867
867
|
* Transcribe a voice message. User-only.
|
|
868
868
|
*
|
|
869
869
|
* @method ms
|
|
870
|
-
* @param chatId The identifier of the chat
|
|
870
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
871
871
|
* @param messageId The identifier of the message.
|
|
872
872
|
* @cache
|
|
873
873
|
*/
|
|
@@ -879,6 +879,15 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
879
879
|
* @param text The message's text.
|
|
880
880
|
*/
|
|
881
881
|
getLinkPreview(text: string, params?: GetLinkPreviewParams): Promise<LinkPreview | null>;
|
|
882
|
+
/**
|
|
883
|
+
* Open a mini app. User-only.
|
|
884
|
+
*
|
|
885
|
+
* @method ms
|
|
886
|
+
* @param botId The identifier of a bot with the mini app.
|
|
887
|
+
* @param chatId The identifier of the chat from which the mini app is opened.
|
|
888
|
+
* @cache
|
|
889
|
+
*/
|
|
890
|
+
openMiniApp(botId: ID, chatId: ID, params?: OpenMiniAppParams): Promise<MiniAppInfo>;
|
|
882
891
|
/**
|
|
883
892
|
* Cast a vote. User-only.
|
|
884
893
|
*
|
|
@@ -936,14 +945,14 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
936
945
|
* Get chat history. User-only.
|
|
937
946
|
*
|
|
938
947
|
* @method ch
|
|
939
|
-
* @param chatId The identifier of
|
|
948
|
+
* @param chatId The identifier of a chat.
|
|
940
949
|
*/
|
|
941
950
|
getHistory(chatId: ID, params?: GetHistoryParams): Promise<Message[]>;
|
|
942
951
|
/**
|
|
943
952
|
* Set a chat's available reactions. User-only.
|
|
944
953
|
*
|
|
945
954
|
* @method ch
|
|
946
|
-
* @param chatId The identifier of
|
|
955
|
+
* @param chatId The identifier of a chat.
|
|
947
956
|
* @param availableReactions The new available reactions.
|
|
948
957
|
*/
|
|
949
958
|
setAvailableReactions(chatId: ID, availableReactions: "none" | "all" | Reaction[]): Promise<void>;
|
|
@@ -951,7 +960,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
951
960
|
* Set a chat's photo.
|
|
952
961
|
*
|
|
953
962
|
* @method ch
|
|
954
|
-
* @param chatId The identifier of
|
|
963
|
+
* @param chatId The identifier of a chat.
|
|
955
964
|
* @param photo A photo to set as the chat's photo.
|
|
956
965
|
*/
|
|
957
966
|
setChatPhoto(chatId: ID, photo: FileSource, params?: SetChatPhotoParams): Promise<void>;
|
|
@@ -959,14 +968,14 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
959
968
|
* Delete a chat's photo.
|
|
960
969
|
*
|
|
961
970
|
* @method ch
|
|
962
|
-
* @param chatId The identifier of
|
|
971
|
+
* @param chatId The identifier of a chat.
|
|
963
972
|
*/
|
|
964
973
|
deleteChatPhoto(chatId: ID): Promise<void>;
|
|
965
974
|
/**
|
|
966
975
|
* Ban a member from a chat.
|
|
967
976
|
*
|
|
968
977
|
* @method ch
|
|
969
|
-
* @param chatId The identifier of
|
|
978
|
+
* @param chatId The identifier of a chat.
|
|
970
979
|
* @param memberId The identifier of the member.
|
|
971
980
|
*/
|
|
972
981
|
banChatMember(chatId: ID, memberId: ID, params?: BanChatMemberParams): Promise<void>;
|
|
@@ -974,7 +983,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
974
983
|
* Unban a member from a chat.
|
|
975
984
|
*
|
|
976
985
|
* @method ch
|
|
977
|
-
* @param chatId The identifier of
|
|
986
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
978
987
|
* @param memberId The identifier of the member.
|
|
979
988
|
*/
|
|
980
989
|
unbanChatMember(chatId: ID, memberId: ID): Promise<void>;
|
|
@@ -982,7 +991,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
982
991
|
* Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
|
|
983
992
|
*
|
|
984
993
|
* @method ch
|
|
985
|
-
* @param chatId The identifier of
|
|
994
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
986
995
|
* @param memberId The identifier of the member.
|
|
987
996
|
*/
|
|
988
997
|
kickChatMember(chatId: ID, memberId: ID): Promise<void>;
|
|
@@ -990,15 +999,15 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
990
999
|
* Set the rights of a chat member.
|
|
991
1000
|
*
|
|
992
1001
|
* @method ch
|
|
993
|
-
* @param chatId The identifier of
|
|
994
|
-
* @param memberId The identifier of
|
|
1002
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
1003
|
+
* @param memberId The identifier of the member.
|
|
995
1004
|
*/
|
|
996
1005
|
setChatMemberRights(chatId: ID, memberId: ID, params?: SetChatMemberRightsParams): Promise<void>;
|
|
997
1006
|
/**
|
|
998
1007
|
* Get the administrators of a chat.
|
|
999
1008
|
*
|
|
1000
1009
|
* @method ch
|
|
1001
|
-
* @param chatId The identifier of
|
|
1010
|
+
* @param chatId The identifier of a chat.
|
|
1002
1011
|
* @returns The chat's administrators.
|
|
1003
1012
|
*/
|
|
1004
1013
|
getChatAdministrators(chatId: ID): Promise<ChatMember[]>;
|
|
@@ -1006,14 +1015,14 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1006
1015
|
* Enable join requests in a chat. User-only.
|
|
1007
1016
|
*
|
|
1008
1017
|
* @method ch
|
|
1009
|
-
* @param chatId The identifier of
|
|
1018
|
+
* @param chatId The identifier of a chat. Must be a channel or a supergroup.
|
|
1010
1019
|
*/
|
|
1011
1020
|
enableJoinRequests(chatId: ID): Promise<void>;
|
|
1012
1021
|
/**
|
|
1013
1022
|
* Disable join requests in a chat. User-only.
|
|
1014
1023
|
*
|
|
1015
1024
|
* @method ch
|
|
1016
|
-
* @param chatId The identifier of
|
|
1025
|
+
* @param chatId The identifier of a chat. Must be a channel or a supergroup.
|
|
1017
1026
|
*/
|
|
1018
1027
|
disableJoinRequests(chatId: ID): Promise<void>;
|
|
1019
1028
|
/**
|
|
@@ -1027,7 +1036,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1027
1036
|
* Get the invite links created for a chat. User-only.
|
|
1028
1037
|
*
|
|
1029
1038
|
* @method ch
|
|
1030
|
-
* @param chatId The identifier of
|
|
1039
|
+
* @param chatId The identifier of a chat.
|
|
1031
1040
|
* @returns The invite links created for the chat. This might be a subset of the results if they were less than `limit`. The parameters `afterDate` and `afterInviteLink` can be used for pagination.
|
|
1032
1041
|
*/
|
|
1033
1042
|
getCreatedInviteLinks(chatId: ID, params?: GetCreatedInviteLinksParams): Promise<InviteLink[]>;
|
|
@@ -1035,21 +1044,21 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1035
1044
|
* Join a chat. User-only.
|
|
1036
1045
|
*
|
|
1037
1046
|
* @method ch
|
|
1038
|
-
* @param chatId The identifier of
|
|
1047
|
+
* @param chatId The identifier of a chat.
|
|
1039
1048
|
*/
|
|
1040
1049
|
joinChat(chatId: ID): Promise<void>;
|
|
1041
1050
|
/**
|
|
1042
1051
|
* Leave a chat.
|
|
1043
1052
|
*
|
|
1044
1053
|
* @method ch
|
|
1045
|
-
* @param chatId The identifier of
|
|
1054
|
+
* @param chatId The identifier of a chat.
|
|
1046
1055
|
*/
|
|
1047
1056
|
leaveChat(chatId: ID): Promise<void>;
|
|
1048
1057
|
/**
|
|
1049
1058
|
* Get information on a user's chat membership.
|
|
1050
1059
|
*
|
|
1051
1060
|
* @method ch
|
|
1052
|
-
* @param chatId The identifier of a chat
|
|
1061
|
+
* @param chatId The identifier of a chat.
|
|
1053
1062
|
* @param userId The identifier of the user.
|
|
1054
1063
|
*/
|
|
1055
1064
|
getChatMember(chatId: ID, userId: ID): Promise<ChatMember>;
|
|
@@ -1057,14 +1066,14 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1057
1066
|
* Get the members of a chat.
|
|
1058
1067
|
*
|
|
1059
1068
|
* @method ch
|
|
1060
|
-
* @param chatId The
|
|
1069
|
+
* @param chatId The identifier of a chat.
|
|
1061
1070
|
*/
|
|
1062
1071
|
getChatMembers(chatId: ID, params?: GetChatMembersParams): Promise<ChatMember[]>;
|
|
1063
1072
|
/**
|
|
1064
1073
|
* Set a chat's sticker set.
|
|
1065
1074
|
*
|
|
1066
1075
|
* @method ch
|
|
1067
|
-
* @param chatId The identifier of
|
|
1076
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
1068
1077
|
* @param setName The name of the set.
|
|
1069
1078
|
*/
|
|
1070
1079
|
setChatStickerSet(chatId: ID, setName: string): Promise<void>;
|
|
@@ -1072,14 +1081,14 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1072
1081
|
* Delete a chat's sticker set.
|
|
1073
1082
|
*
|
|
1074
1083
|
* @method ch
|
|
1075
|
-
* @param chatId The identifier of
|
|
1084
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
1076
1085
|
*/
|
|
1077
1086
|
deleteChatStickerSet(chatId: ID): Promise<void>;
|
|
1078
1087
|
/**
|
|
1079
1088
|
* Set the number of boosts required to circument a chat's default restrictions. User-only.
|
|
1080
1089
|
*
|
|
1081
1090
|
* @method ch
|
|
1082
|
-
* @param chatId The identifier of
|
|
1091
|
+
* @param chatId The identifier of a chat.
|
|
1083
1092
|
* @param boosts The number of boosts required to circumvent its restrictions.
|
|
1084
1093
|
*/
|
|
1085
1094
|
setBoostsRequiredToCircumventRestrictions(chatId: ID, boosts: number): Promise<void>;
|
|
@@ -1087,7 +1096,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1087
1096
|
* Create an invite link.
|
|
1088
1097
|
*
|
|
1089
1098
|
* @method ch
|
|
1090
|
-
* @param chatId The identifier of
|
|
1099
|
+
* @param chatId The identifier of a chat to create the invite link for.
|
|
1091
1100
|
* @returns The newly created invite link.
|
|
1092
1101
|
*/
|
|
1093
1102
|
createInviteLink(chatId: ID, params?: CreateInviteLinkParams): Promise<InviteLink>;
|
|
@@ -1095,7 +1104,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1095
1104
|
* Approve a join request.
|
|
1096
1105
|
*
|
|
1097
1106
|
* @method ch
|
|
1098
|
-
* @param chatId The identifier of
|
|
1107
|
+
* @param chatId The identifier of a chat with the join request.
|
|
1099
1108
|
* @param userId The user who made the join request.
|
|
1100
1109
|
*/
|
|
1101
1110
|
approveJoinRequest(chatId: ID, userId: ID): Promise<void>;
|
|
@@ -1103,7 +1112,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1103
1112
|
* Decline a join request.
|
|
1104
1113
|
*
|
|
1105
1114
|
* @method ch
|
|
1106
|
-
* @param chatId The identifier of
|
|
1115
|
+
* @param chatId The identifier of a chat with the join request.
|
|
1107
1116
|
* @param userId The user who made the join request.
|
|
1108
1117
|
*/
|
|
1109
1118
|
declineJoinRequest(chatId: ID, userId: ID): Promise<void>;
|
|
@@ -1111,28 +1120,28 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1111
1120
|
* Approve all join requests. User-only.
|
|
1112
1121
|
*
|
|
1113
1122
|
* @method ch
|
|
1114
|
-
* @param chatId The identifier of
|
|
1123
|
+
* @param chatId The identifier of a chat with the join requests.
|
|
1115
1124
|
*/
|
|
1116
1125
|
approveJoinRequests(chatId: ID, params?: ApproveJoinRequestsParams): Promise<void>;
|
|
1117
1126
|
/**
|
|
1118
1127
|
* Decline all join requests. User-only.
|
|
1119
1128
|
*
|
|
1120
1129
|
* @method ch
|
|
1121
|
-
* @param chatId The identifier of
|
|
1130
|
+
* @param chatId The identifier of a chat with the join requests.
|
|
1122
1131
|
*/
|
|
1123
1132
|
declineJoinRequests(chatId: ID, params?: DeclineJoinRequestsParams): Promise<void>;
|
|
1124
1133
|
/**
|
|
1125
1134
|
* Get pending join requests in a chat. User-only.
|
|
1126
1135
|
*
|
|
1127
1136
|
* @method ch
|
|
1128
|
-
* @param chatId The identifier of
|
|
1137
|
+
* @param chatId The identifier of a chat with the join requests.
|
|
1129
1138
|
*/
|
|
1130
1139
|
getJoinRequests(chatId: ID, params?: GetJoinRequestsParams): Promise<JoinRequest[]>;
|
|
1131
1140
|
/**
|
|
1132
1141
|
* Add a single user to a chat.
|
|
1133
1142
|
*
|
|
1134
1143
|
* @method ch
|
|
1135
|
-
* @param chatId The identifier of
|
|
1144
|
+
* @param chatId The identifier of a chat to add the user to.
|
|
1136
1145
|
* @param userId The identifier of the user to add to the chat.
|
|
1137
1146
|
* @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
|
|
1138
1147
|
*/
|
|
@@ -1149,14 +1158,14 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1149
1158
|
* Open a chat.
|
|
1150
1159
|
*
|
|
1151
1160
|
* @method ch
|
|
1152
|
-
* @param chatId The chat to open.
|
|
1161
|
+
* @param chatId The identifier of a chat to open.
|
|
1153
1162
|
*/
|
|
1154
1163
|
openChat(chatId: ID): Promise<void>;
|
|
1155
1164
|
/**
|
|
1156
1165
|
* Close a chat previously opened by openChat.
|
|
1157
1166
|
*
|
|
1158
1167
|
* @method ch
|
|
1159
|
-
* @param chatId The chat to close.
|
|
1168
|
+
* @param chatId The identifier of a chat to close.
|
|
1160
1169
|
*/
|
|
1161
1170
|
closeChat(chatId: ID): Promise<void>;
|
|
1162
1171
|
/**
|
|
@@ -1187,7 +1196,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1187
1196
|
* Set the time to live of the messages of a chat. User-only.
|
|
1188
1197
|
*
|
|
1189
1198
|
* @method ch
|
|
1190
|
-
* @param chatId The identifier of
|
|
1199
|
+
* @param chatId The identifier of a chat.
|
|
1191
1200
|
* @param messageTtl The time to live of the messages in seconds.
|
|
1192
1201
|
*/
|
|
1193
1202
|
setMessageTtl(chatId: ID, messageTtl: number): Promise<void>;
|
|
@@ -1202,7 +1211,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1202
1211
|
* Archive a single chat. User-only.
|
|
1203
1212
|
*
|
|
1204
1213
|
* @method ch
|
|
1205
|
-
* @param chatId The identifier of
|
|
1214
|
+
* @param chatId The identifier of a chat.
|
|
1206
1215
|
*/
|
|
1207
1216
|
archiveChat(chatId: ID): Promise<void>;
|
|
1208
1217
|
/**
|
|
@@ -1216,7 +1225,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1216
1225
|
* Unarchive a single chat. User-only.
|
|
1217
1226
|
*
|
|
1218
1227
|
* @method ch
|
|
1219
|
-
* @param chatId The identifier of
|
|
1228
|
+
* @param chatId The identifier of a chat.
|
|
1220
1229
|
*/
|
|
1221
1230
|
unarchiveChat(chatId: ID): Promise<void>;
|
|
1222
1231
|
/**
|
|
@@ -1230,7 +1239,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1230
1239
|
* Get the settings of a chat. User-only.
|
|
1231
1240
|
*
|
|
1232
1241
|
* @method ch
|
|
1233
|
-
* @param chatId The identifier of
|
|
1242
|
+
* @param chatId The identifier of a chat.
|
|
1234
1243
|
*/
|
|
1235
1244
|
getChatSettings(chatId: ID): Promise<ChatSettings>;
|
|
1236
1245
|
/**
|
|
@@ -1282,7 +1291,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1282
1291
|
* Hide or show the member list of a group to non-admins. User-only.
|
|
1283
1292
|
*
|
|
1284
1293
|
* @method ch
|
|
1285
|
-
* @param chatId The identifier of
|
|
1294
|
+
* @param chatId The identifier of the group.
|
|
1286
1295
|
* @param visible Whether the member list of the group should be visible.
|
|
1287
1296
|
*/
|
|
1288
1297
|
setMemberListVisibility(chatId: ID, visible: boolean): Promise<void>;
|
|
@@ -1290,7 +1299,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1290
1299
|
* Enable or disable topics in a group. User-only.
|
|
1291
1300
|
*
|
|
1292
1301
|
* @method ch
|
|
1293
|
-
* @param chatId The identifier of
|
|
1302
|
+
* @param chatId The identifier of the group.
|
|
1294
1303
|
* @param enabled Whether topics should be enabled in the group.
|
|
1295
1304
|
*/
|
|
1296
1305
|
setTopicsEnabled(chatId: ID, enabled: boolean): Promise<void>;
|
|
@@ -1298,7 +1307,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1298
1307
|
* Enable or disable automatic anti-spam in a group. User-only.
|
|
1299
1308
|
*
|
|
1300
1309
|
* @method ch
|
|
1301
|
-
* @param chatId The identifier of
|
|
1310
|
+
* @param chatId The identifier of the group.
|
|
1302
1311
|
* @param enabled Whether automatic anti-spam should be enabled in the group.
|
|
1303
1312
|
*/
|
|
1304
1313
|
setAntispamEnabled(chatId: ID, enabled: boolean): Promise<void>;
|
|
@@ -1306,7 +1315,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1306
1315
|
* Enable or disable post signatures in a channel. User-only.
|
|
1307
1316
|
*
|
|
1308
1317
|
* @method ch
|
|
1309
|
-
* @param chatId The identifier of
|
|
1318
|
+
* @param chatId The identifier of the channel.
|
|
1310
1319
|
* @param enabled Whether post signatures should be enabled in the channel.
|
|
1311
1320
|
*/
|
|
1312
1321
|
setSignaturesEnabled(chatId: ID, enabled: boolean, params?: SetSignaturesEnabledParams): Promise<void>;
|
|
@@ -1314,7 +1323,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1314
1323
|
* Delete a chat. User-only.
|
|
1315
1324
|
*
|
|
1316
1325
|
* @method ch
|
|
1317
|
-
* @param chatId The identifier of
|
|
1326
|
+
* @param chatId The identifier of a chat.
|
|
1318
1327
|
*/
|
|
1319
1328
|
deleteChat(chatId: ID): Promise<void>;
|
|
1320
1329
|
/**
|
|
@@ -1328,7 +1337,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1328
1337
|
*
|
|
1329
1338
|
* @method ch
|
|
1330
1339
|
* @param chatId The identifier of a channel.
|
|
1331
|
-
* @param discussionChatId The identifier of
|
|
1340
|
+
* @param discussionChatId The identifier of a chat to use as discussion for the channel.
|
|
1332
1341
|
*/
|
|
1333
1342
|
setDiscussionChat(chatId: ID, discussionChatId: ID): Promise<void>;
|
|
1334
1343
|
/**
|
|
@@ -1409,13 +1418,13 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1409
1418
|
* Send a callback query. User-only.
|
|
1410
1419
|
*
|
|
1411
1420
|
* @method cq
|
|
1412
|
-
* @param
|
|
1413
|
-
* @param messageId The message that includes at a button responsible for the callback query question.
|
|
1421
|
+
* @param botId The identifier of the bot to send the callback query to.
|
|
1422
|
+
* @param messageId The identifier of the message that includes at a button responsible for the callback query question.
|
|
1414
1423
|
* @param question The callback query's question.
|
|
1415
1424
|
* @returns The bot's answer to the callback query.
|
|
1416
1425
|
* @cache
|
|
1417
1426
|
*/
|
|
1418
|
-
sendCallbackQuery(
|
|
1427
|
+
sendCallbackQuery(botId: ID, messageId: number, question: CallbackQueryQuestion): Promise<CallbackQueryAnswer>;
|
|
1419
1428
|
/**
|
|
1420
1429
|
* Answer a callback query. Bot-only.
|
|
1421
1430
|
*
|
|
@@ -1427,17 +1436,17 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1427
1436
|
* Send an inline query. User-only.
|
|
1428
1437
|
*
|
|
1429
1438
|
* @method iq
|
|
1430
|
-
* @param
|
|
1431
|
-
* @param chatId The
|
|
1439
|
+
* @param botId The identifier of a bot to send the inline query to.
|
|
1440
|
+
* @param chatId The identifier of the chat from which the inline query is sent.
|
|
1432
1441
|
* @returns The bot's answer to the inline query.
|
|
1433
1442
|
* @cache
|
|
1434
1443
|
*/
|
|
1435
|
-
sendInlineQuery(
|
|
1444
|
+
sendInlineQuery(botId: ID, chatId: ID, params?: SendInlineQueryParams): Promise<InlineQueryAnswer>;
|
|
1436
1445
|
/**
|
|
1437
1446
|
* Answer an inline query. Bot-only.
|
|
1438
1447
|
*
|
|
1439
1448
|
* @method iq
|
|
1440
|
-
* @param id The
|
|
1449
|
+
* @param id The identifier of the inline query to answer.
|
|
1441
1450
|
* @param results The results to answer with.
|
|
1442
1451
|
*/
|
|
1443
1452
|
answerInlineQuery(id: string, results: InlineQueryResult[], params?: AnswerInlineQueryParams): Promise<void>;
|
|
@@ -1548,15 +1557,16 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1548
1557
|
* Retrieve multiple stories. User-only.
|
|
1549
1558
|
*
|
|
1550
1559
|
* @method st
|
|
1551
|
-
* @param chatId The identifier of
|
|
1560
|
+
* @param chatId The identifier of a chat.
|
|
1552
1561
|
* @param storyIds The identifiers of the stories to retrieve.
|
|
1562
|
+
* @returns The retrieved stories.
|
|
1553
1563
|
*/
|
|
1554
1564
|
getStories(chatId: ID, storyIds: number[]): Promise<Story[]>;
|
|
1555
1565
|
/**
|
|
1556
1566
|
* Retrieve a single story. User-only.
|
|
1557
1567
|
*
|
|
1558
1568
|
* @method st
|
|
1559
|
-
* @param chatId The identifier of
|
|
1569
|
+
* @param chatId The identifier of a chat.
|
|
1560
1570
|
* @param storyId The identifier of the story to retrieve.
|
|
1561
1571
|
* @returns The retrieved story.
|
|
1562
1572
|
*/
|
|
@@ -1565,7 +1575,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1565
1575
|
* Delete multiple stories. User-only.
|
|
1566
1576
|
*
|
|
1567
1577
|
* @method st
|
|
1568
|
-
* @param chatId The identifier of
|
|
1578
|
+
* @param chatId The identifier of a chat.
|
|
1569
1579
|
* @param storyIds The identifiers of the stories to delete.
|
|
1570
1580
|
*/
|
|
1571
1581
|
deleteStories(chatId: ID, storyIds: number[]): Promise<void>;
|
|
@@ -1573,7 +1583,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1573
1583
|
* Delete a single story. User-only.
|
|
1574
1584
|
*
|
|
1575
1585
|
* @method st
|
|
1576
|
-
* @param chatId The identifier of
|
|
1586
|
+
* @param chatId The identifier of a chat.
|
|
1577
1587
|
* @param storyId The identifier of the story to delete.
|
|
1578
1588
|
*/
|
|
1579
1589
|
deleteStory(chatId: ID, storyId: number): Promise<void>;
|
|
@@ -1581,7 +1591,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1581
1591
|
* Add multiple stories to highlights. User-only.
|
|
1582
1592
|
*
|
|
1583
1593
|
* @method st
|
|
1584
|
-
* @param chatId The identifier of
|
|
1594
|
+
* @param chatId The identifier of a chat.
|
|
1585
1595
|
* @param storyIds The identifiers of the stories to add to highlights.
|
|
1586
1596
|
*/
|
|
1587
1597
|
addStoriesToHighlights(chatId: ID, storyIds: number[]): Promise<void>;
|
|
@@ -1589,7 +1599,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1589
1599
|
* Add a single story to highlights. User-only.
|
|
1590
1600
|
*
|
|
1591
1601
|
* @method st
|
|
1592
|
-
* @param chatId The identifier of
|
|
1602
|
+
* @param chatId The identifier of a chat.
|
|
1593
1603
|
* @param storyId The identifier of the story to add to highlights.
|
|
1594
1604
|
*/
|
|
1595
1605
|
addStoryToHighlights(chatId: ID, storyId: number): Promise<void>;
|
|
@@ -1597,7 +1607,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1597
1607
|
* Remove multiple stories from highlights. User-only.
|
|
1598
1608
|
*
|
|
1599
1609
|
* @method st
|
|
1600
|
-
* @param chatId The identifier of
|
|
1610
|
+
* @param chatId The identifier of a chat.
|
|
1601
1611
|
* @param storyIds The identifiers of the stories to remove from highlights.
|
|
1602
1612
|
*/
|
|
1603
1613
|
removeStoriesFromHighlights(chatId: ID, storyIds: number[]): Promise<void>;
|
|
@@ -1605,7 +1615,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1605
1615
|
* Remove a single story from highlights. User-only.
|
|
1606
1616
|
*
|
|
1607
1617
|
* @method st
|
|
1608
|
-
* @param chatId The identifier of
|
|
1618
|
+
* @param chatId The identifier of a chat.
|
|
1609
1619
|
* @param storyId The identifier of the story to remove from highlights.
|
|
1610
1620
|
*/
|
|
1611
1621
|
removeStoryFromHighlights(chatId: ID, storyId: number): Promise<void>;
|
|
@@ -1633,7 +1643,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1633
1643
|
* Start a video chat. User-only.
|
|
1634
1644
|
*
|
|
1635
1645
|
* @method vc
|
|
1636
|
-
* @param chatId The chat to start the video chat in.
|
|
1646
|
+
* @param chatId The identifier of a chat to start the video chat in.
|
|
1637
1647
|
* @returns The started video chat.
|
|
1638
1648
|
*/
|
|
1639
1649
|
startVideoChat(chatId: ID, params?: StartVideoChatParams): Promise<VideoChatActive>;
|
|
@@ -1641,7 +1651,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1641
1651
|
* Schedule a video chat. User-only.
|
|
1642
1652
|
*
|
|
1643
1653
|
* @method vc
|
|
1644
|
-
* @param chatId The chat to schedule the video chat in.
|
|
1654
|
+
* @param chatId The identifier of a chat to schedule the video chat in.
|
|
1645
1655
|
* @param startAt A point in time within the future in which the video chat will be started.
|
|
1646
1656
|
* @returns The scheduled video chat.
|
|
1647
1657
|
*/
|
|
@@ -1734,7 +1744,7 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
1734
1744
|
* Add a contact. User-only.
|
|
1735
1745
|
*
|
|
1736
1746
|
* @method co
|
|
1737
|
-
* @param userId The identifier of
|
|
1747
|
+
* @param userId The identifier of the user to add as contact.
|
|
1738
1748
|
*/
|
|
1739
1749
|
addContact(userId: ID, params?: AddContactParams): Promise<void>;
|
|
1740
1750
|
/**
|