@grammyjs/types 3.20.0 → 3.22.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/checklist.d.ts ADDED
@@ -0,0 +1,70 @@
1
+ import type { User } from "./manage.js";
2
+ import type { Message, MessageEntity, ParseMode } from "./message.js";
3
+ /** Describes a task in a checklist. */
4
+ export interface ChecklistTask {
5
+ /** Unique identifier of the task */
6
+ id: number;
7
+ /** Text of the task */
8
+ text: string;
9
+ /** Special entities that appear in the task text */
10
+ text_entities?: MessageEntity[];
11
+ /** User that completed the task; omitted if the task wasn't completed */
12
+ completed_by_user?: User;
13
+ /** Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed */
14
+ completion_date?: number;
15
+ }
16
+ /** Describes a checklist. */
17
+ export interface Checklist {
18
+ /** Title of the checklist */
19
+ title: string;
20
+ /** Special entities that appear in the checklist title */
21
+ title_entities?: MessageEntity[];
22
+ /** List of tasks in the checklist */
23
+ tasks: ChecklistTask[];
24
+ /** True, if users other than the creator of the list can add tasks to the list */
25
+ others_can_add_tasks?: true;
26
+ /** True, if users other than the creator of the list can mark tasks as done or not done */
27
+ others_can_mark_tasks_as_done?: true;
28
+ }
29
+ /** Describes a task to add to a checklist. */
30
+ export interface InputChecklistTask {
31
+ /** Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist */
32
+ id: number;
33
+ /** Text of the task; 1-100 characters after entities parsing */
34
+ text: string;
35
+ /** Mode for parsing entities in the text. See formatting options for more details. */
36
+ parse_mode?: string;
37
+ /** List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed. */
38
+ text_entities?: MessageEntity[];
39
+ }
40
+ /** Describes a checklist to create. */
41
+ export interface InputChecklist {
42
+ /** Title of the checklist; 1-255 characters after entities parsing */
43
+ title: string;
44
+ /** Mode for parsing entities in the title. See formatting options for more details. */
45
+ parse_mode?: ParseMode;
46
+ /** List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed. */
47
+ title_entities?: MessageEntity[];
48
+ /** List of 1-30 tasks in the checklist */
49
+ tasks: InputChecklistTask[];
50
+ /** Pass True if other users can add tasks to the checklist */
51
+ others_can_add_tasks?: boolean;
52
+ /** Pass True if other users can mark tasks as done or not done in the checklist */
53
+ others_can_mark_tasks_as_done?: true;
54
+ }
55
+ /** Describes a service message about checklist tasks marked as done or not done. */
56
+ export interface ChecklistTasksDone {
57
+ /** Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply. */
58
+ checklist_message?: Message;
59
+ /** Identifiers of the tasks that were marked as done */
60
+ marked_as_done_task_ids?: number[];
61
+ /** Identifiers of the tasks that were marked as not done */
62
+ marked_as_not_done_task_ids?: number[];
63
+ }
64
+ /** Describes a service message about tasks added to a checklist. */
65
+ export interface ChecklistTasksAdded {
66
+ /** Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply. */
67
+ checklist_message?: Message;
68
+ /** List of tasks added to the checklist */
69
+ tasks: ChecklistTask[];
70
+ }
package/manage.d.ts CHANGED
@@ -83,6 +83,8 @@ export declare namespace Chat {
83
83
  last_name?: string;
84
84
  /** True, if the supergroup chat is a forum (has topics enabled) */
85
85
  is_forum?: undefined;
86
+ /** True, if the chat is the direct messages chat of a channel */
87
+ is_direct_messages?: undefined;
86
88
  }
87
89
  /** Internal type for group chats */
88
90
  interface GroupChat {
@@ -100,6 +102,8 @@ export declare namespace Chat {
100
102
  last_name?: undefined;
101
103
  /** True, if the supergroup chat is a forum (has topics enabled) */
102
104
  is_forum?: undefined;
105
+ /** True, if the chat is the direct messages chat of a channel */
106
+ is_direct_messages?: undefined;
103
107
  }
104
108
  /** Internal type for supergroup chats */
105
109
  interface SupergroupChat {
@@ -117,6 +121,8 @@ export declare namespace Chat {
117
121
  last_name?: undefined;
118
122
  /** True, if the supergroup chat is a forum (has topics enabled) */
119
123
  is_forum?: true;
124
+ /** True, if the chat is the direct messages chat of a channel */
125
+ is_direct_messages?: true;
120
126
  }
121
127
  /** Internal type for channel chats */
122
128
  interface ChannelChat {
@@ -134,6 +140,8 @@ export declare namespace Chat {
134
140
  last_name?: undefined;
135
141
  /** True, if the supergroup chat is a forum (has topics enabled) */
136
142
  is_forum?: undefined;
143
+ /** True, if the chat is the direct messages chat of a channel */
144
+ is_direct_messages?: undefined;
137
145
  }
138
146
  }
139
147
  /** This object represents a chat. */
@@ -229,6 +237,8 @@ export declare namespace ChatFullInfo {
229
237
  custom_emoji_sticker_set_name?: undefined;
230
238
  /** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
231
239
  linked_chat_id?: undefined;
240
+ /** Information about the corresponding channel chat; for direct messages chats only */
241
+ parent_chat?: undefined;
232
242
  /** For supergroups, the location to which the supergroup is connected */
233
243
  location?: undefined;
234
244
  }
@@ -322,6 +332,8 @@ export declare namespace ChatFullInfo {
322
332
  custom_emoji_sticker_set_name?: undefined;
323
333
  /** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
324
334
  linked_chat_id?: undefined;
335
+ /** Information about the corresponding channel chat; for direct messages chats only */
336
+ parent_chat?: undefined;
325
337
  /** For supergroups, the location to which the supergroup is connected */
326
338
  location?: undefined;
327
339
  }
@@ -415,6 +427,8 @@ export declare namespace ChatFullInfo {
415
427
  custom_emoji_sticker_set_name?: string;
416
428
  /** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
417
429
  linked_chat_id?: number;
430
+ /** Information about the corresponding channel chat; for direct messages chats only */
431
+ parent_chat?: Chat.ChannelChat;
418
432
  /** For supergroups, the location to which the supergroup is connected */
419
433
  location?: ChatLocation;
420
434
  }
@@ -508,6 +522,8 @@ export declare namespace ChatFullInfo {
508
522
  custom_emoji_sticker_set_name?: undefined;
509
523
  /** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
510
524
  linked_chat_id?: number;
525
+ /** Information about the corresponding channel chat; for direct messages chats only */
526
+ parent_chat?: undefined;
511
527
  /** For supergroups, the location to which the supergroup is connected */
512
528
  location?: undefined;
513
529
  }
@@ -563,7 +579,7 @@ export interface ChatInviteLink {
563
579
  export interface ChatAdministratorRights {
564
580
  /** True, if the user's presence in the chat is hidden */
565
581
  is_anonymous: boolean;
566
- /** True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. */
582
+ /** True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. */
567
583
  can_manage_chat: boolean;
568
584
  /** True, if the administrator can delete messages of other users */
569
585
  can_delete_messages: boolean;
@@ -583,7 +599,7 @@ export interface ChatAdministratorRights {
583
599
  can_edit_stories: boolean;
584
600
  /** True, if the administrator can delete stories posted by other users */
585
601
  can_delete_stories: boolean;
586
- /** True, if the administrator can post messages in the channel, or access channel statistics; for channels only */
602
+ /** True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only */
587
603
  can_post_messages?: boolean;
588
604
  /** True, if the administrator can edit messages of other users and can pin messages; for channels only */
589
605
  can_edit_messages?: boolean;
@@ -591,6 +607,8 @@ export interface ChatAdministratorRights {
591
607
  can_pin_messages?: boolean;
592
608
  /** True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only */
593
609
  can_manage_topics?: boolean;
610
+ /** True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only */
611
+ can_manage_direct_messages?: boolean;
594
612
  }
595
613
  /** This object represents changes in the status of a chat member. */
596
614
  export interface ChatMemberUpdated {
@@ -640,7 +658,7 @@ export interface ChatMemberAdministrator {
640
658
  can_be_edited: boolean;
641
659
  /** True, if the user's presence in the chat is hidden */
642
660
  is_anonymous: boolean;
643
- /** True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. */
661
+ /** True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. */
644
662
  can_manage_chat: boolean;
645
663
  /** True, if the administrator can delete messages of other users */
646
664
  can_delete_messages: boolean;
@@ -660,7 +678,7 @@ export interface ChatMemberAdministrator {
660
678
  can_edit_stories: boolean;
661
679
  /** True, if the administrator can delete stories posted by other users */
662
680
  can_delete_stories: boolean;
663
- /** True, if the administrator can post messages in the channel, or access channel statistics; for channels only */
681
+ /** True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only */
664
682
  can_post_messages?: boolean;
665
683
  /** True, if the administrator can edit messages of other users and can pin messages; for channels only */
666
684
  can_edit_messages?: boolean;
@@ -668,6 +686,8 @@ export interface ChatMemberAdministrator {
668
686
  can_pin_messages?: boolean;
669
687
  /** True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only */
670
688
  can_manage_topics?: boolean;
689
+ /** True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only */
690
+ can_manage_direct_messages?: boolean;
671
691
  /** Custom title for this user */
672
692
  custom_title?: string;
673
693
  }
@@ -702,7 +722,7 @@ export interface ChatMemberRestricted {
702
722
  can_send_video_notes: boolean;
703
723
  /** True, if the user is allowed to send voice notes */
704
724
  can_send_voice_notes: boolean;
705
- /** True, if the user is allowed to send polls */
725
+ /** True, if the user is allowed to send polls and checklists */
706
726
  can_send_polls: boolean;
707
727
  /** True, if the user is allowed to send animations, games, stickers and use inline bots */
708
728
  can_send_other_messages: boolean;
@@ -766,7 +786,7 @@ export interface ChatPermissions {
766
786
  can_send_video_notes?: boolean;
767
787
  /** True, if the user is allowed to send voice notes */
768
788
  can_send_voice_notes?: boolean;
769
- /** True, if the user is allowed to send polls */
789
+ /** True, if the user is allowed to send polls and checklists */
770
790
  can_send_polls?: boolean;
771
791
  /** True, if the user is allowed to send animations, games, stickers and use inline bots */
772
792
  can_send_other_messages?: boolean;
package/markup.d.ts CHANGED
@@ -27,17 +27,17 @@ export declare namespace InlineKeyboardButton {
27
27
  login_url: LoginUrl;
28
28
  }
29
29
  interface SwitchInlineButton extends AbstractInlineKeyboardButton {
30
- /** If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account. */
30
+ /** If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account. */
31
31
  switch_inline_query: string;
32
32
  }
33
33
  interface SwitchInlineCurrentChatButton extends AbstractInlineKeyboardButton {
34
- /** If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted.
34
+ /** If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.
35
35
 
36
- This offers a quick way for the user to open your bot in inline mode in the same chat good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account. */
36
+ This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account. */
37
37
  switch_inline_query_current_chat: string;
38
38
  }
39
39
  interface SwitchInlineChosenChatButton extends AbstractInlineKeyboardButton {
40
- /** If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account. */
40
+ /** If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account. */
41
41
  switch_inline_query_chosen_chat: SwitchInlineQueryChosenChat;
42
42
  }
43
43
  interface CopyTextButtonButton extends AbstractInlineKeyboardButton {
package/message.d.ts CHANGED
@@ -1,7 +1,8 @@
1
+ import type { Checklist, ChecklistTasksAdded, ChecklistTasksDone } from "./checklist.js";
1
2
  import type { Chat, User } from "./manage.js";
2
3
  import type { InlineKeyboardMarkup } from "./markup.js";
3
4
  import type { PassportData } from "./passport.js";
4
- import type { GiftInfo, Invoice, PaidMessagePriceChanged, RefundedPayment, SuccessfulPayment, UniqueGiftInfo } from "./payment.js";
5
+ import type { GiftInfo, Invoice, PaidMessagePriceChanged, RefundedPayment, SuccessfulPayment, SuggestedPostApprovalFailed, SuggestedPostApproved, SuggestedPostDeclined, SuggestedPostInfo, SuggestedPostPaid, SuggestedPostPrice, SuggestedPostRefunded, UniqueGiftInfo } from "./payment.js";
5
6
  type MsgWith<P extends keyof Message> = Record<P, NonNullable<Message[P]>>;
6
7
  export declare namespace Message {
7
8
  interface ServiceMessage {
@@ -21,6 +22,8 @@ export declare namespace Message {
21
22
  chat: Chat;
22
23
  /** True, if the message is sent to a forum topic */
23
24
  is_topic_message?: boolean;
25
+ /** Information about the direct messages chat topic that contains the message */
26
+ direct_messages_topic?: DirectMessagesTopic;
24
27
  }
25
28
  interface CommonMessage extends ServiceMessage {
26
29
  /** If the sender of the message boosted the chat, the number of boosts added by the user */
@@ -33,6 +36,10 @@ export declare namespace Message {
33
36
  is_automatic_forward?: true;
34
37
  /** For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. */
35
38
  reply_to_message?: ReplyMessage;
39
+ /** Identifier of the specific checklist task that is being replied to */
40
+ reply_to_checklist_task_id?: number;
41
+ /** True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited. */
42
+ is_paid_post?: true;
36
43
  /** Information about the message that is being replied to, which may come from another chat or forum topic */
37
44
  external_reply?: ExternalReplyInfo;
38
45
  /** For replies that quote part of the original message, the quoted part of the message */
@@ -89,6 +96,16 @@ export declare namespace Message {
89
96
  type VenueMessage = LocationMessage & MsgWith<"venue">;
90
97
  type LocationMessage = CommonMessage & MsgWith<"location">;
91
98
  type PaidMediaMessage = CommonMessage & MsgWith<"paid_media">;
99
+ type DirectMessagePriceChangedMessage = ServiceMessage & MsgWith<"direct_message_price_changed">;
100
+ type ChecklistMessage = CommonMessage & MsgWith<"checklist">;
101
+ type ChecklistTasksDoneMessage = ServiceMessage & MsgWith<"checklist_tasks_done">;
102
+ type ChecklistTasksAddedMessage = ServiceMessage & MsgWith<"checklist_tasks_added">;
103
+ type SuggestedPostInfoMessage = ServiceMessage & MsgWith<"suggested_post_info">;
104
+ type SuggestedPostApprovedMessage = ServiceMessage & MsgWith<"suggested_post_approved">;
105
+ type SuggestedPostApprovalFailedMessage = ServiceMessage & MsgWith<"suggested_post_approval_failed">;
106
+ type SuggestedPostDeclinedMessage = ServiceMessage & MsgWith<"suggested_post_declined">;
107
+ type SuggestedPostPaidMessage = ServiceMessage & MsgWith<"suggested_post_paid">;
108
+ type SuggestedPostRefundedMessage = ServiceMessage & MsgWith<"suggested_post_refunded">;
92
109
  type NewChatMembersMessage = ServiceMessage & MsgWith<"new_chat_members">;
93
110
  type LeftChatMemberMessage = ServiceMessage & MsgWith<"left_chat_member">;
94
111
  type NewChatTitleMessage = ServiceMessage & MsgWith<"new_chat_title">;
@@ -172,6 +189,24 @@ export interface Message extends Message.MediaMessage {
172
189
  location?: Location;
173
190
  /** Message contains paid media; information about the paid media */
174
191
  paid_media?: PaidMediaInfo;
192
+ /** Message is a checklist */
193
+ checklist?: Checklist;
194
+ /** Service message: some tasks in a checklist were marked as done or not done */
195
+ checklist_tasks_done?: ChecklistTasksDone;
196
+ /** Service message: tasks were added to a checklist */
197
+ checklist_tasks_added?: ChecklistTasksAdded;
198
+ /** Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is a suggested post, then it can't be edited. */
199
+ suggested_post_info?: SuggestedPostInfo;
200
+ /** Service message: a suggested post was approved */
201
+ suggested_post_approved?: SuggestedPostApproved;
202
+ /** Service message: approval of a suggested post has failed */
203
+ suggested_post_approval_failed?: SuggestedPostApprovalFailed;
204
+ /** Service message: a suggested post was declined */
205
+ suggested_post_declined?: SuggestedPostDeclined;
206
+ /** Service message: payment for a suggested post was received */
207
+ suggested_post_paid?: SuggestedPostPaid;
208
+ /** Service message: payment for a suggested post was refunded */
209
+ suggested_post_refunded?: SuggestedPostRefunded;
175
210
  /** New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) */
176
211
  new_chat_members?: User[];
177
212
  /** A member was removed from the group, information about them (this member may be the bot itself) */
@@ -243,6 +278,8 @@ export interface Message extends Message.MediaMessage {
243
278
  unique_gift?: UniqueGiftInfo;
244
279
  /** Service message: the price for paid messages has changed in the chat */
245
280
  paid_message_price_changed?: PaidMessagePriceChanged;
281
+ /** Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed */
282
+ direct_message_price_changed?: DirectMessagePriceChanged;
246
283
  /** Service message: video chat scheduled */
247
284
  video_chat_scheduled?: VideoChatScheduled;
248
285
  /** Service message: video chat started */
@@ -484,6 +521,8 @@ export interface ExternalReplyInfo {
484
521
  paid_media?: PaidMediaInfo;
485
522
  /** Message is a native poll, information about the poll */
486
523
  poll?: Poll;
524
+ /** Message is a checklist */
525
+ checklist?: Checklist;
487
526
  /** Message is a venue, information about the venue */
488
527
  venue?: Venue;
489
528
  }
@@ -491,8 +530,10 @@ export interface ExternalReplyInfo {
491
530
  export interface ReplyParameters {
492
531
  /** Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified */
493
532
  message_id: number;
494
- /** If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account. */
533
+ /** If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats. */
495
534
  chat_id?: number | string;
535
+ /** Identifier of the specific checklist task to be replied to */
536
+ checklist_task_id?: number;
496
537
  /** Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic. Always True for messages sent on behalf of a business account. */
497
538
  allow_sending_without_reply?: boolean;
498
539
  /** Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message. */
@@ -1017,6 +1058,13 @@ export interface WriteAccessAllowed {
1017
1058
  /** True, if the access was granted when the bot was added to the attachment or side menu */
1018
1059
  from_attachment_menu?: boolean;
1019
1060
  }
1061
+ /** Describes a service message about a change in the price of direct messages sent to a channel chat. */
1062
+ export interface DirectMessagePriceChanged {
1063
+ /** True, if direct messages are enabled for the channel chat; false otherwise */
1064
+ are_direct_messages_enabled: boolean;
1065
+ /** The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Defaults to 0. */
1066
+ direct_message_star_count?: number;
1067
+ }
1020
1068
  /** This object represents a service message about a video chat scheduled in the chat. */
1021
1069
  export interface VideoChatScheduled {
1022
1070
  /** Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator */
@@ -1269,4 +1317,18 @@ export interface PreparedInlineMessage {
1269
1317
  /** Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used */
1270
1318
  expiration_date: number;
1271
1319
  }
1320
+ /** Describes a topic of a direct messages chat. */
1321
+ export interface DirectMessagesTopic {
1322
+ /** Unique identifier of the topic */
1323
+ topic_id: number;
1324
+ /** Information about the user that created the topic. Currently, it is always present */
1325
+ user: User;
1326
+ }
1327
+ /** Contains parameters of a post that is being suggested by the bot. */
1328
+ export interface SuggestedPostParameters {
1329
+ /** Proposed price for the post. If the field is omitted, then the post is unpaid. */
1330
+ price?: SuggestedPostPrice;
1331
+ /** Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it. */
1332
+ send_date?: number;
1333
+ }
1272
1334
  export {};
package/methods.d.ts CHANGED
@@ -1,8 +1,9 @@
1
+ import type { InputChecklist } from "./checklist.js";
1
2
  import type { InlineQueryResult, InlineQueryResultsButton } from "./inline.js";
2
3
  import type { LanguageCode } from "./langs.js";
3
4
  import type { AcceptedGiftTypes, BotCommand, BusinessConnection, ChatAdministratorRights, ChatFullInfo, ChatInviteLink, ChatMember, ChatMemberAdministrator, ChatMemberOwner, ChatPermissions, ForumTopic, UserChatBoosts, UserFromGetMe, UserProfilePhotos, WebhookInfo } from "./manage.js";
4
5
  import type { ForceReply, InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove } from "./markup.js";
5
- import type { File, GameHighScore, InputPollOption, LinkPreviewOptions, MaskPosition, Message, MessageEntity, MessageId, ParseMode, Poll, PreparedInlineMessage, ReactionType, ReplyParameters, SentWebAppMessage, Sticker, StickerSet, Story } from "./message.js";
6
+ import type { File, GameHighScore, InputPollOption, LinkPreviewOptions, MaskPosition, Message, MessageEntity, MessageId, ParseMode, Poll, PreparedInlineMessage, ReactionType, ReplyParameters, SentWebAppMessage, Sticker, StickerSet, Story, SuggestedPostParameters } from "./message.js";
6
7
  import type { PassportElementError } from "./passport.js";
7
8
  import type { Gifts, LabeledPrice, OwnedGifts, ShippingOption, StarAmount, StarTransactions } from "./payment.js";
8
9
  import type { BotCommandScope, BotDescription, BotName, BotShortDescription, MenuButton } from "./settings.js";
@@ -82,6 +83,8 @@ export type ApiMethods<F> = {
82
83
  chat_id: number | string;
83
84
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
84
85
  message_thread_id?: number;
86
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
87
+ direct_messages_topic_id?: number;
85
88
  /** Text of the message to be sent, 1-4096 characters after entities parsing */
86
89
  text: string;
87
90
  /** Mode for parsing entities in the message text. See formatting options for more details. */
@@ -96,6 +99,8 @@ export type ApiMethods<F> = {
96
99
  protect_content?: boolean;
97
100
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
98
101
  allow_paid_broadcast?: boolean;
102
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
103
+ suggested_post_parameters?: SuggestedPostParameters;
99
104
  /** Unique identifier of the message effect to be added to the message; for private chats only */
100
105
  message_effect_id?: string;
101
106
  /** Description of the message to reply to */
@@ -111,10 +116,14 @@ export type ApiMethods<F> = {
111
116
  chat_id: number | string;
112
117
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
113
118
  message_thread_id?: number;
119
+ /** Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat */
120
+ direct_messages_topic_id?: number;
114
121
  /** Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) */
115
122
  from_chat_id: number | string;
116
123
  /** New start timestamp for the copied video in the message */
117
124
  video_start_timestamp?: number;
125
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only */
126
+ suggested_post_parameters?: SuggestedPostParameters;
118
127
  /** Sends the message silently. Users will receive a notification with no sound. */
119
128
  disable_notification?: boolean;
120
129
  /** Protects the contents of the forwarded message from forwarding and saving */
@@ -128,6 +137,8 @@ export type ApiMethods<F> = {
128
137
  chat_id: number | string;
129
138
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
130
139
  message_thread_id?: number;
140
+ /** Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat */
141
+ direct_messages_topic_id?: number;
131
142
  /** Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername) */
132
143
  from_chat_id: number | string;
133
144
  /** A list of 1-100 identifiers of messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order. */
@@ -143,6 +154,8 @@ export type ApiMethods<F> = {
143
154
  chat_id: number | string;
144
155
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
145
156
  message_thread_id?: number;
157
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
158
+ direct_messages_topic_id?: number;
146
159
  /** Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) */
147
160
  from_chat_id: number | string;
148
161
  /** Message identifier in the chat specified in from_chat_id */
@@ -163,6 +176,8 @@ export type ApiMethods<F> = {
163
176
  protect_content?: boolean;
164
177
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
165
178
  allow_paid_broadcast?: boolean;
179
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
180
+ suggested_post_parameters?: SuggestedPostParameters;
166
181
  /** Description of the message to reply to */
167
182
  reply_parameters?: ReplyParameters;
168
183
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
@@ -176,6 +191,8 @@ export type ApiMethods<F> = {
176
191
  chat_id: number | string;
177
192
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
178
193
  message_thread_id?: number;
194
+ /** Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat */
195
+ direct_messages_topic_id?: number;
179
196
  /** Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername) */
180
197
  from_chat_id: number | string;
181
198
  /** A list of 1-100 identifiers of messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order. */
@@ -195,6 +212,8 @@ export type ApiMethods<F> = {
195
212
  chat_id: number | string;
196
213
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
197
214
  message_thread_id?: number;
215
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
216
+ direct_messages_topic_id?: number;
198
217
  /** Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. */
199
218
  photo: F | string;
200
219
  /** Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing */
@@ -213,6 +232,8 @@ export type ApiMethods<F> = {
213
232
  protect_content?: boolean;
214
233
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
215
234
  allow_paid_broadcast?: boolean;
235
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
236
+ suggested_post_parameters?: SuggestedPostParameters;
216
237
  /** Unique identifier of the message effect to be added to the message; for private chats only */
217
238
  message_effect_id?: string;
218
239
  /** Description of the message to reply to */
@@ -232,6 +253,8 @@ export type ApiMethods<F> = {
232
253
  chat_id: number | string;
233
254
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
234
255
  message_thread_id?: number;
256
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
257
+ direct_messages_topic_id?: number;
235
258
  /** Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. */
236
259
  audio: F | string;
237
260
  /** Audio caption, 0-1024 characters after entities parsing */
@@ -254,6 +277,8 @@ export type ApiMethods<F> = {
254
277
  protect_content?: boolean;
255
278
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
256
279
  allow_paid_broadcast?: boolean;
280
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
281
+ suggested_post_parameters?: SuggestedPostParameters;
257
282
  /** Unique identifier of the message effect to be added to the message; for private chats only */
258
283
  message_effect_id?: string;
259
284
  /** Description of the message to reply to */
@@ -271,6 +296,8 @@ export type ApiMethods<F> = {
271
296
  chat_id: number | string;
272
297
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
273
298
  message_thread_id?: number;
299
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
300
+ direct_messages_topic_id?: number;
274
301
  /** File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. */
275
302
  document: F | string;
276
303
  /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass "attach://<file_attach_name>" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. */
@@ -289,6 +316,8 @@ export type ApiMethods<F> = {
289
316
  protect_content?: boolean;
290
317
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
291
318
  allow_paid_broadcast?: boolean;
319
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
320
+ suggested_post_parameters?: SuggestedPostParameters;
292
321
  /** Unique identifier of the message effect to be added to the message; for private chats only */
293
322
  message_effect_id?: string;
294
323
  /** Description of the message to reply to */
@@ -306,6 +335,8 @@ export type ApiMethods<F> = {
306
335
  chat_id: number | string;
307
336
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
308
337
  message_thread_id?: number;
338
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
339
+ direct_messages_topic_id?: number;
309
340
  /** Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. */
310
341
  video: F | string;
311
342
  /** Duration of sent video in seconds */
@@ -338,6 +369,8 @@ export type ApiMethods<F> = {
338
369
  protect_content?: boolean;
339
370
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
340
371
  allow_paid_broadcast?: boolean;
372
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
373
+ suggested_post_parameters?: SuggestedPostParameters;
341
374
  /** Unique identifier of the message effect to be added to the message; for private chats only */
342
375
  message_effect_id?: string;
343
376
  /** Description of the message to reply to */
@@ -355,6 +388,8 @@ export type ApiMethods<F> = {
355
388
  chat_id: number | string;
356
389
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
357
390
  message_thread_id?: number;
391
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
392
+ direct_messages_topic_id?: number;
358
393
  /** Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. */
359
394
  animation: F | string;
360
395
  /** Duration of sent animation in seconds */
@@ -381,6 +416,8 @@ export type ApiMethods<F> = {
381
416
  protect_content?: boolean;
382
417
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
383
418
  allow_paid_broadcast?: boolean;
419
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
420
+ suggested_post_parameters?: SuggestedPostParameters;
384
421
  /** Unique identifier of the message effect to be added to the message; for private chats only */
385
422
  message_effect_id?: string;
386
423
  /** Description of the message to reply to */
@@ -398,6 +435,8 @@ export type ApiMethods<F> = {
398
435
  chat_id: number | string;
399
436
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
400
437
  message_thread_id?: number;
438
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
439
+ direct_messages_topic_id?: number;
401
440
  /** Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. */
402
441
  voice: F | string;
403
442
  /** Voice message caption, 0-1024 characters after entities parsing */
@@ -414,6 +453,8 @@ export type ApiMethods<F> = {
414
453
  protect_content?: boolean;
415
454
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
416
455
  allow_paid_broadcast?: boolean;
456
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
457
+ suggested_post_parameters?: SuggestedPostParameters;
417
458
  /** Unique identifier of the message effect to be added to the message; for private chats only */
418
459
  message_effect_id?: string;
419
460
  /** Description of the message to reply to */
@@ -432,6 +473,8 @@ export type ApiMethods<F> = {
432
473
  chat_id: number | string;
433
474
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
434
475
  message_thread_id?: number;
476
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
477
+ direct_messages_topic_id?: number;
435
478
  /** Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data.. Sending video notes by a URL is currently unsupported */
436
479
  video_note: F | string;
437
480
  /** Duration of sent video in seconds */
@@ -446,6 +489,8 @@ export type ApiMethods<F> = {
446
489
  protect_content?: boolean;
447
490
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
448
491
  allow_paid_broadcast?: boolean;
492
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
493
+ suggested_post_parameters?: SuggestedPostParameters;
449
494
  /** Unique identifier of the message effect to be added to the message; for private chats only */
450
495
  message_effect_id?: string;
451
496
  /** Description of the message to reply to */
@@ -463,6 +508,8 @@ export type ApiMethods<F> = {
463
508
  chat_id: number | string;
464
509
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
465
510
  message_thread_id?: number;
511
+ /** Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat */
512
+ direct_messages_topic_id?: number;
466
513
  /** An array describing messages to be sent, must include 2-10 items */
467
514
  media: ReadonlyArray<InputMediaAudio<F> | InputMediaDocument<F> | InputMediaPhoto<F> | InputMediaVideo<F>>;
468
515
  /** Sends the messages silently. Users will receive a notification with no sound. */
@@ -486,6 +533,8 @@ export type ApiMethods<F> = {
486
533
  chat_id: number | string;
487
534
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
488
535
  message_thread_id?: number;
536
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
537
+ direct_messages_topic_id?: number;
489
538
  /** Latitude of the location */
490
539
  latitude: number;
491
540
  /** Longitude of the location */
@@ -504,6 +553,8 @@ export type ApiMethods<F> = {
504
553
  protect_content?: boolean;
505
554
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
506
555
  allow_paid_broadcast?: boolean;
556
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
557
+ suggested_post_parameters?: SuggestedPostParameters;
507
558
  /** Unique identifier of the message effect to be added to the message; for private chats only */
508
559
  message_effect_id?: string;
509
560
  /** Description of the message to reply to */
@@ -557,6 +608,8 @@ export type ApiMethods<F> = {
557
608
  business_connection_id?: string;
558
609
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance. */
559
610
  chat_id: number | string;
611
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
612
+ direct_messages_topic_id?: number;
560
613
  /** The number of Telegram Stars that must be paid to buy access to the media; 1-2500 */
561
614
  star_count: number;
562
615
  /** An array describing the media to be sent; up to 10 items */
@@ -577,6 +630,8 @@ export type ApiMethods<F> = {
577
630
  protect_content?: boolean;
578
631
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
579
632
  allow_paid_broadcast?: boolean;
633
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
634
+ suggested_post_parameters?: SuggestedPostParameters;
580
635
  /** Description of the message to reply to */
581
636
  reply_parameters?: ReplyParameters;
582
637
  /** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user */
@@ -590,6 +645,8 @@ export type ApiMethods<F> = {
590
645
  chat_id: number | string;
591
646
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
592
647
  message_thread_id?: number;
648
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
649
+ direct_messages_topic_id?: number;
593
650
  /** Latitude of the venue */
594
651
  latitude: number;
595
652
  /** Longitude of the venue */
@@ -612,6 +669,8 @@ export type ApiMethods<F> = {
612
669
  protect_content?: boolean;
613
670
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
614
671
  allow_paid_broadcast?: boolean;
672
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
673
+ suggested_post_parameters?: SuggestedPostParameters;
615
674
  /** Unique identifier of the message effect to be added to the message; for private chats only */
616
675
  message_effect_id?: string;
617
676
  /** Description of the message to reply to */
@@ -629,6 +688,8 @@ export type ApiMethods<F> = {
629
688
  chat_id: number | string;
630
689
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
631
690
  message_thread_id?: number;
691
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
692
+ direct_messages_topic_id?: number;
632
693
  /** Contact's phone number */
633
694
  phone_number: string;
634
695
  /** Contact's first name */
@@ -643,6 +704,8 @@ export type ApiMethods<F> = {
643
704
  protect_content?: boolean;
644
705
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
645
706
  allow_paid_broadcast?: boolean;
707
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
708
+ suggested_post_parameters?: SuggestedPostParameters;
646
709
  /** Unique identifier of the message effect to be added to the message; for private chats only */
647
710
  message_effect_id?: string;
648
711
  /** Description of the message to reply to */
@@ -656,7 +719,7 @@ export type ApiMethods<F> = {
656
719
  sendPoll(args: {
657
720
  /** Unique identifier of the business connection on behalf of which the message will be sent */
658
721
  business_connection_id?: string;
659
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
722
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername). Polls can't be sent to channel direct messages chats. */
660
723
  chat_id: number | string;
661
724
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
662
725
  message_thread_id?: number;
@@ -666,7 +729,7 @@ export type ApiMethods<F> = {
666
729
  question_parse_mode?: ParseMode;
667
730
  /** A list of special entities that appear in the poll question. It can be specified instead of question_parse_mode */
668
731
  question_entities?: MessageEntity[];
669
- /** A list of 2-10 answer options */
732
+ /** A list of 2-12 answer options */
670
733
  options: InputPollOption[];
671
734
  /** True, if the poll needs to be anonymous, defaults to True */
672
735
  is_anonymous?: boolean;
@@ -703,6 +766,38 @@ export type ApiMethods<F> = {
703
766
  /** @deprecated Use `reply_parameters` instead. */
704
767
  reply_to_message_id?: number;
705
768
  }): Message.PollMessage;
769
+ /** Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned. */
770
+ sendChecklist(args: {
771
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
772
+ business_connection_id: string;
773
+ /** Unique identifier for the target chat */
774
+ chat_id: number;
775
+ /** An object for the checklist to send */
776
+ checklist: InputChecklist;
777
+ /** Sends the message silently. Users will receive a notification with no sound. */
778
+ disable_notification?: boolean;
779
+ /** Protects the contents of the sent message from forwarding and saving */
780
+ protect_content?: boolean;
781
+ /** Unique identifier of the message effect to be added to the message */
782
+ message_effect_id?: string;
783
+ /** An object for description of the message to reply to */
784
+ reply_parameters?: ReplyParameters;
785
+ /** An object for an inline keyboard */
786
+ reply_markup?: InlineKeyboardMarkup;
787
+ }): Message.ChecklistMessage;
788
+ /** Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned. */
789
+ editMessageChecklist(args: {
790
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
791
+ business_connection_id: string;
792
+ /** Unique identifier for the target chat */
793
+ chat_id: number;
794
+ /** Unique identifier for the target message */
795
+ message_id: number;
796
+ /** An object for the new checklist */
797
+ checklist: InputChecklist;
798
+ /** An object for the new inline keyboard for the message */
799
+ reply_markup?: InlineKeyboardMarkup;
800
+ }): Message.ChecklistMessage;
706
801
  /** Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned. */
707
802
  sendDice(args: {
708
803
  /** Unique identifier of the business connection on behalf of which the message will be sent */
@@ -711,6 +806,8 @@ export type ApiMethods<F> = {
711
806
  chat_id: number | string;
712
807
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
713
808
  message_thread_id?: number;
809
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
810
+ direct_messages_topic_id?: number;
714
811
  /** Emoji on which the dice throw animation is based. Currently, must be one of "🎲", "🎯", "🏀", "⚽", "🎳", or "🎰". Dice can have values 1-6 for "🎲", "🎯" and "🎳", values 1-5 for "🏀" and "⚽", and values 1-64 for "🎰". Defaults to "🎲" */
715
812
  emoji?: (string & Record<never, never>) | "🎲" | "🎯" | "🏀" | "⚽" | "🎳" | "🎰";
716
813
  /** Sends the message silently. Users will receive a notification with no sound. */
@@ -719,6 +816,8 @@ export type ApiMethods<F> = {
719
816
  protect_content?: boolean;
720
817
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
721
818
  allow_paid_broadcast?: boolean;
819
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
820
+ suggested_post_parameters?: SuggestedPostParameters;
722
821
  /** Unique identifier of the message effect to be added to the message; for private chats only */
723
822
  message_effect_id?: string;
724
823
  /** Description of the message to reply to */
@@ -736,7 +835,7 @@ export type ApiMethods<F> = {
736
835
  sendChatAction(args: {
737
836
  /** Unique identifier of the business connection on behalf of which the action will be sent */
738
837
  business_connection_id?: string;
739
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
838
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel chats and channel direct messages chats aren't supported. */
740
839
  chat_id: number | string;
741
840
  /** Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes. */
742
841
  action: "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "choose_sticker" | "find_location" | "record_video_note" | "upload_video_note";
@@ -823,7 +922,7 @@ export type ApiMethods<F> = {
823
922
  user_id: number;
824
923
  /** Pass True if the administrator's presence in the chat is hidden */
825
924
  is_anonymous?: boolean;
826
- /** Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. */
925
+ /** Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. */
827
926
  can_manage_chat?: boolean;
828
927
  /** Pass True if the administrator can delete messages of other users */
829
928
  can_delete_messages?: boolean;
@@ -843,7 +942,7 @@ export type ApiMethods<F> = {
843
942
  can_edit_stories?: boolean;
844
943
  /** True if the administrator can delete stories posted by other users */
845
944
  can_delete_stories?: boolean;
846
- /** True if the administrator can post messages in the channel, or access channel statistics; for channels only */
945
+ /** Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only */
847
946
  can_post_messages?: boolean;
848
947
  /** True if the administrator can edit messages of other users and can pin messages; for channels only */
849
948
  can_edit_messages?: boolean;
@@ -851,6 +950,8 @@ export type ApiMethods<F> = {
851
950
  can_pin_messages?: boolean;
852
951
  /** True if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only */
853
952
  can_manage_topics?: boolean;
953
+ /** Pass True if the administrator can manage direct messages within the channel and decline suggested posts; for channels only */
954
+ can_manage_direct_messages?: boolean;
854
955
  }): true;
855
956
  /** Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success. */
856
957
  setChatAdministratorCustomTitle(args: {
@@ -960,6 +1061,24 @@ export type ApiMethods<F> = {
960
1061
  /** Unique identifier of the target user */
961
1062
  user_id: number;
962
1063
  }): true;
1064
+ /** Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success. */
1065
+ approveSuggestedPost(args: {
1066
+ /** Unique identifier for the target direct messages chat */
1067
+ chat_id: number;
1068
+ /** Identifier of a suggested post message to approve */
1069
+ message_id: number;
1070
+ /** Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created */
1071
+ send_date?: number;
1072
+ }): true;
1073
+ /** Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns True on success. */
1074
+ declineSuggestedPost(args: {
1075
+ /** Unique identifier for the target direct messages chat */
1076
+ chat_id: number;
1077
+ /** Identifier of a suggested post message to decline */
1078
+ message_id: number;
1079
+ /** Comment for the creator of the suggested post */
1080
+ comment?: string;
1081
+ }): true;
963
1082
  /** Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. */
964
1083
  setChatPhoto(args: {
965
1084
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
@@ -986,7 +1105,7 @@ export type ApiMethods<F> = {
986
1105
  /** New chat description, 0-255 characters */
987
1106
  description?: string;
988
1107
  }): true;
989
- /** Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns True on success. */
1108
+ /** Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns True on success. */
990
1109
  pinChatMessage(args: {
991
1110
  /** Unique identifier of the business connection on behalf of which the message will be pinned */
992
1111
  business_connection_id?: string;
@@ -997,7 +1116,7 @@ export type ApiMethods<F> = {
997
1116
  /** Pass True if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. */
998
1117
  disable_notification?: boolean;
999
1118
  }): true;
1000
- /** Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns True on success. */
1119
+ /** Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin messages in groups and channels respectively. Returns True on success. */
1001
1120
  unpinChatMessage(args: {
1002
1121
  /** Unique identifier of the business connection on behalf of which the message will be unpinned */
1003
1122
  business_connection_id?: string;
@@ -1006,14 +1125,14 @@ export type ApiMethods<F> = {
1006
1125
  /** Identifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be unpinned. */
1007
1126
  message_id?: number;
1008
1127
  }): true;
1009
- /** Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in a supergroup or 'can_edit_messages' admin right in a channel. Returns True on success. */
1128
+ /** Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns True on success. */
1010
1129
  unpinAllChatMessages(args: {
1011
1130
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1012
1131
  chat_id: number | string;
1013
1132
  }): true;
1014
1133
  /** Use this method for your bot to leave a group, supergroup or channel. Returns True on success. */
1015
1134
  leaveChat(args: {
1016
- /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
1135
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername). Channel direct messages chats aren't supported; leave the corresponding channel instead. */
1017
1136
  chat_id: number | string;
1018
1137
  }): true;
1019
1138
  /** Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success. */
@@ -1249,6 +1368,8 @@ export type ApiMethods<F> = {
1249
1368
  /** Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned. */
1250
1369
  for_channels?: boolean;
1251
1370
  }): ChatAdministratorRights;
1371
+ /** A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object. */
1372
+ getMyStarBalance(): StarAmount;
1252
1373
  /** Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent. */
1253
1374
  editMessageText(args: {
1254
1375
  /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
@@ -1338,7 +1459,8 @@ export type ApiMethods<F> = {
1338
1459
  - Bots can delete incoming messages in private chats.
1339
1460
  - Bots granted can_post_messages permissions can delete outgoing messages in channels.
1340
1461
  - If the bot is an administrator of a group, it can delete any message there.
1341
- - If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.
1462
+ - If the bot has can_delete_messages administrator right in a supergroup or a channel, it can delete any message there.
1463
+ - If the bot has can_manage_direct_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat.
1342
1464
  Returns True on success. */
1343
1465
  deleteMessage(args: {
1344
1466
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
@@ -1523,6 +1645,8 @@ export type ApiMethods<F> = {
1523
1645
  chat_id: number | string;
1524
1646
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1525
1647
  message_thread_id?: number;
1648
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
1649
+ direct_messages_topic_id?: number;
1526
1650
  /** Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. Video and animated stickers can't be sent via an HTTP URL. */
1527
1651
  sticker: F | string;
1528
1652
  /** Emoji associated with the sticker; only for just uploaded stickers */
@@ -1533,6 +1657,8 @@ export type ApiMethods<F> = {
1533
1657
  protect_content?: boolean;
1534
1658
  /** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
1535
1659
  allow_paid_broadcast?: boolean;
1660
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
1661
+ suggested_post_parameters?: SuggestedPostParameters;
1536
1662
  /** Unique identifier of the message effect to be added to the message; for private chats only */
1537
1663
  message_effect_id?: string;
1538
1664
  /** Description of the message to reply to */
@@ -1739,6 +1865,8 @@ export type ApiMethods<F> = {
1739
1865
  chat_id: number | string;
1740
1866
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1741
1867
  message_thread_id?: number;
1868
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
1869
+ direct_messages_topic_id?: number;
1742
1870
  /** Product name, 1-32 characters */
1743
1871
  title: string;
1744
1872
  /** Product description, 1-255 characters */
@@ -1781,6 +1909,8 @@ export type ApiMethods<F> = {
1781
1909
  send_email_to_provider?: boolean;
1782
1910
  /** Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars. */
1783
1911
  is_flexible?: boolean;
1912
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
1913
+ suggested_post_parameters?: SuggestedPostParameters;
1784
1914
  /** Sends the message silently. Users will receive a notification with no sound. */
1785
1915
  disable_notification?: boolean;
1786
1916
  /** Protects the contents of the sent message from forwarding and saving */
@@ -1895,7 +2025,7 @@ export type ApiMethods<F> = {
1895
2025
  }): true;
1896
2026
  /** Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success. */
1897
2027
  verifyChat(args: {
1898
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
2028
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername). Channel direct messages chats can't be verified. */
1899
2029
  chat_id: number | string;
1900
2030
  /** Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description. */
1901
2031
  custom_description?: string;
@@ -1932,7 +2062,7 @@ export type ApiMethods<F> = {
1932
2062
  sendGame(args: {
1933
2063
  /** Unique identifier of the business connection on behalf of which the message will be sent */
1934
2064
  business_connection_id?: string;
1935
- /** Unique identifier for the target chat */
2065
+ /** Unique identifier for the target chat. Games can't be sent to channel direct messages chats and channel chats. */
1936
2066
  chat_id: number;
1937
2067
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1938
2068
  message_thread_id?: number;
package/mod.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./api.js";
2
+ export * from "./checklist.js";
2
3
  export * from "./inline.js";
3
4
  export * from "./manage.js";
4
5
  export * from "./markup.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grammyjs/types",
3
- "version": "3.20.0",
3
+ "version": "3.22.0",
4
4
  "description": "Telegram Bot API type declarations for grammY",
5
5
  "main": "mod.js",
6
6
  "repository": {
package/payment.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Chat, User } from "./manage.js";
2
- import type { MessageEntity, PaidMedia, Sticker } from "./message.js";
2
+ import type { Message, MessageEntity, PaidMedia, Sticker } from "./message.js";
3
3
  /** This object represents a portion of the price for goods or services. */
4
4
  export interface LabeledPrice {
5
5
  /** Portion label */
@@ -263,6 +263,8 @@ export interface PaidMediaPurchased {
263
263
  export interface Gift {
264
264
  /** Unique identifier of the gift */
265
265
  id: string;
266
+ /** Information about the chat that published the gift */
267
+ publisher_chat?: Chat;
266
268
  /** The sticker that represents the gift */
267
269
  sticker: Sticker;
268
270
  /** The number of Telegram Stars that must be paid to send the sticker */
@@ -323,6 +325,8 @@ export interface UniqueGift {
323
325
  base_name: string;
324
326
  /** Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas */
325
327
  name: string;
328
+ /** Information about the chat that published the gift */
329
+ publisher_chat?: Chat;
326
330
  /** Unique number of the upgraded gift among gifts upgraded from the same regular gift */
327
331
  number: number;
328
332
  /** Model of the gift */
@@ -355,12 +359,16 @@ export interface GiftInfo {
355
359
  export interface UniqueGiftInfo {
356
360
  /** Information about the gift */
357
361
  gift: UniqueGift;
358
- /** Origin of the gift. Currently, either “upgrade” or “transfer” */
359
- origin: "upgrade" | "transfer";
362
+ /** Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, or “resale” for gifts bought from other users */
363
+ origin: "upgrade" | "transfer" | "resale";
360
364
  /** Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts */
361
365
  owned_gift_id?: string;
362
366
  /** Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift */
363
367
  transfer_star_count?: number;
368
+ /** For gifts bought from other users, the price paid for the gift */
369
+ last_resale_star_count?: number;
370
+ /** Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now */
371
+ next_transfer_date?: string;
364
372
  }
365
373
  /** Describes a service message about a change in the price of paid messages within a chat. */
366
374
  export interface PaidMessagePriceChanged {
@@ -426,6 +434,8 @@ export interface OwnedGiftUnique {
426
434
  can_be_transferred?: true;
427
435
  /** Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift */
428
436
  transfer_star_count?: number;
437
+ /** Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now */
438
+ next_transfer_date?: string;
429
439
  }
430
440
  /** Contains the list of gifts received and owned by a user or a chat. */
431
441
  export interface OwnedGifts {
@@ -436,3 +446,60 @@ export interface OwnedGifts {
436
446
  /** Offset for the next request. If empty, then there are no more results */
437
447
  next_offset?: string;
438
448
  }
449
+ /** Desribes price of a suggested post. */
450
+ export interface SuggestedPostPrice {
451
+ /** Currency in which the post will be paid. Currently, must be one of “XTR” for Telegram Stars or “TON” for toncoins */
452
+ currency: "XTR" | "TON";
453
+ /** The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000. */
454
+ amount: number;
455
+ }
456
+ /** Contains information about a suggested post. */
457
+ export interface SuggestedPostInfo {
458
+ /** State of the suggested post. Currently, it can be one of “pending”, “approved”, “declined”. */
459
+ state: "pending" | "approved" | "declined";
460
+ /** Proposed price of the post. If the field is omitted, then the post is unpaid. */
461
+ price?: SuggestedPostPrice;
462
+ /** Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it. */
463
+ send_date?: number;
464
+ }
465
+ /** Describes a service message about the approval of a suggested post. */
466
+ export interface SuggestedPostApproved {
467
+ /** Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply. */
468
+ suggested_post_message?: Message;
469
+ /** Amount paid for the post */
470
+ price?: SuggestedPostPrice;
471
+ /** Date when the post will be published */
472
+ send_date: number;
473
+ }
474
+ /** Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval. */
475
+ export interface SuggestedPostApprovalFailed {
476
+ /** Message containing the suggested post whose approval has failed. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply. */
477
+ suggested_post_message?: Message;
478
+ /** Expected price of the post */
479
+ price: SuggestedPostPrice;
480
+ }
481
+ /** Describes a service message about the rejection of a suggested post. */
482
+ export interface SuggestedPostDeclined {
483
+ /** Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply. */
484
+ suggested_post_message?: Message;
485
+ /** Comment with which the post was declined */
486
+ comment?: string;
487
+ }
488
+ /** Describes a service message about a successful payment for a suggested post. */
489
+ export interface SuggestedPostPaid {
490
+ /** Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply. */
491
+ suggested_post_message?: Message;
492
+ /** Currency in which the payment was made. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins */
493
+ currency: string;
494
+ /** The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only */
495
+ amount?: number;
496
+ /** The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only */
497
+ star_amount?: StarAmount;
498
+ }
499
+ /** Describes a service message about a payment refund for a suggested post. */
500
+ export interface SuggestedPostRefunded {
501
+ /** Message containing the suggested post. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply. */
502
+ suggested_post_message?: Message;
503
+ /** Reason for the refund. Currently, one of “post_deleted” if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or “payment_refunded” if the payer refunded their payment. */
504
+ reason: string;
505
+ }
package/settings.d.ts CHANGED
@@ -99,21 +99,21 @@ export interface BotCommandScopeAllChatAdministrators {
99
99
  export interface BotCommandScopeChat {
100
100
  /** Scope type, must be chat */
101
101
  type: "chat";
102
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
102
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported. */
103
103
  chat_id: number | string;
104
104
  }
105
105
  /** Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat. */
106
106
  export interface BotCommandScopeChatAdministrators {
107
107
  /** Scope type, must be chat_administrators */
108
108
  type: "chat_administrators";
109
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
109
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported. */
110
110
  chat_id: number | string;
111
111
  }
112
112
  /** Represents the scope of bot commands, covering a specific member of a group or supergroup chat. */
113
113
  export interface BotCommandScopeChatMember {
114
114
  /** Scope type, must be chat_member */
115
115
  type: "chat_member";
116
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
116
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername). Channel direct messages chats and channel chats aren't supported. */
117
117
  chat_id: number | string;
118
118
  /** Unique identifier of the target user */
119
119
  user_id: number;