@grammyjs/types 3.1.2 → 3.2.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/manage.d.ts +14 -13
- package/markup.d.ts +10 -13
- package/message.d.ts +68 -62
- package/methods.d.ts +6 -1
- package/package.json +1 -1
package/manage.d.ts
CHANGED
|
@@ -11,15 +11,15 @@ export interface WebhookInfo {
|
|
|
11
11
|
/** Currently used webhook IP address */
|
|
12
12
|
ip_address?: string;
|
|
13
13
|
/** Unix time for the most recent error that happened when trying to deliver an update via webhook */
|
|
14
|
-
last_error_date
|
|
14
|
+
last_error_date?: number;
|
|
15
15
|
/** Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook */
|
|
16
|
-
last_error_message
|
|
16
|
+
last_error_message?: string;
|
|
17
17
|
/** Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters */
|
|
18
18
|
last_synchronization_error_date?: number;
|
|
19
19
|
/** The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery */
|
|
20
|
-
max_connections
|
|
20
|
+
max_connections?: number;
|
|
21
21
|
/** A list of update types the bot is subscribed to. Defaults to all update types except chat_member */
|
|
22
|
-
allowed_updates
|
|
22
|
+
allowed_updates?: Array<Exclude<keyof Update, "update_id">>;
|
|
23
23
|
}
|
|
24
24
|
/** This object represents a Telegram user or bot. */
|
|
25
25
|
export interface User {
|
|
@@ -70,7 +70,7 @@ export declare namespace Chat {
|
|
|
70
70
|
title: string;
|
|
71
71
|
}
|
|
72
72
|
/** Internal type representing private chats. */
|
|
73
|
-
|
|
73
|
+
interface PrivateChat extends AbstractChat, UserNameChat {
|
|
74
74
|
type: "private";
|
|
75
75
|
/** First name of the other party in a private chat */
|
|
76
76
|
first_name: string;
|
|
@@ -78,17 +78,17 @@ export declare namespace Chat {
|
|
|
78
78
|
last_name?: string;
|
|
79
79
|
}
|
|
80
80
|
/** Internal type representing group chats. */
|
|
81
|
-
|
|
81
|
+
interface GroupChat extends AbstractChat, TitleChat {
|
|
82
82
|
type: "group";
|
|
83
83
|
}
|
|
84
84
|
/** Internal type representing super group chats. */
|
|
85
|
-
|
|
85
|
+
interface SupergroupChat extends AbstractChat, UserNameChat, TitleChat {
|
|
86
86
|
type: "supergroup";
|
|
87
87
|
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
88
88
|
is_forum?: true;
|
|
89
89
|
}
|
|
90
90
|
/** Internal type representing channel chats. */
|
|
91
|
-
|
|
91
|
+
interface ChannelChat extends AbstractChat, UserNameChat, TitleChat {
|
|
92
92
|
type: "channel";
|
|
93
93
|
}
|
|
94
94
|
/** Internal type holding properties that those chats returned from `getChat` share. */
|
|
@@ -127,9 +127,11 @@ export declare namespace Chat {
|
|
|
127
127
|
linked_chat_id?: number;
|
|
128
128
|
}
|
|
129
129
|
/** Internal type representing private chats returned from `getChat`. */
|
|
130
|
-
|
|
130
|
+
interface PrivateGetChat extends PrivateChat, NonGroupGetChat, GetChat {
|
|
131
131
|
/** Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat. */
|
|
132
132
|
emoji_status_custom_emoji_id?: string;
|
|
133
|
+
/** Expiration date of the emoji status of the other party in a private chat, if any. Returned only in getChat. */
|
|
134
|
+
emoji_status_expiration_date?: number;
|
|
133
135
|
/** Bio of the other party in a private chat. Returned only in getChat. */
|
|
134
136
|
bio?: string;
|
|
135
137
|
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat. */
|
|
@@ -138,10 +140,10 @@ export declare namespace Chat {
|
|
|
138
140
|
has_restricted_voice_and_video_messages?: true;
|
|
139
141
|
}
|
|
140
142
|
/** Internal type representing group chats returned from `getChat`. */
|
|
141
|
-
|
|
143
|
+
interface GroupGetChat extends GroupChat, MultiUserGetChat {
|
|
142
144
|
}
|
|
143
145
|
/** Internal type representing supergroup chats returned from `getChat`. */
|
|
144
|
-
|
|
146
|
+
interface SupergroupGetChat extends SupergroupChat, NonGroupGetChat, MultiUserGetChat, LargeGetChat {
|
|
145
147
|
/** True, if users need to join the supergroup before they can send messages. Returned only in getChat. */
|
|
146
148
|
join_to_send_messages?: true;
|
|
147
149
|
/** True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat. */
|
|
@@ -156,9 +158,8 @@ export declare namespace Chat {
|
|
|
156
158
|
location?: ChatLocation;
|
|
157
159
|
}
|
|
158
160
|
/** Internal type representing channel chats returned from `getChat`. */
|
|
159
|
-
|
|
161
|
+
interface ChannelGetChat extends ChannelChat, NonGroupGetChat, LargeGetChat {
|
|
160
162
|
}
|
|
161
|
-
export {};
|
|
162
163
|
}
|
|
163
164
|
/** This object represents a chat. */
|
|
164
165
|
export type Chat = Chat.PrivateChat | Chat.GroupChat | Chat.SupergroupChat | Chat.ChannelChat;
|
package/markup.d.ts
CHANGED
|
@@ -10,51 +10,48 @@ export declare namespace InlineKeyboardButton {
|
|
|
10
10
|
/** Label text on the button */
|
|
11
11
|
text: string;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
interface UrlButton extends AbstractInlineKeyboardButton {
|
|
14
14
|
/** HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings. */
|
|
15
15
|
url: string;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
interface CallbackButton extends AbstractInlineKeyboardButton {
|
|
18
18
|
/** Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes */
|
|
19
19
|
callback_data: string;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
interface WebAppButton extends AbstractInlineKeyboardButton {
|
|
22
22
|
/** Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. */
|
|
23
23
|
web_app: WebAppInfo;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
interface LoginButton extends AbstractInlineKeyboardButton {
|
|
26
26
|
/** An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget. */
|
|
27
27
|
login_url: LoginUrl;
|
|
28
28
|
}
|
|
29
|
-
|
|
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. Can be empty, in which case just the bot's username will be inserted.
|
|
31
|
-
|
|
32
|
-
Note: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm... actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen. */
|
|
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. Can be empty, in which case just the bot's username will be inserted. */
|
|
33
31
|
switch_inline_query: string;
|
|
34
32
|
}
|
|
35
|
-
|
|
33
|
+
interface SwitchInlineCurrentChatButton extends AbstractInlineKeyboardButton {
|
|
36
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.
|
|
37
35
|
|
|
38
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. */
|
|
39
37
|
switch_inline_query_current_chat: string;
|
|
40
38
|
}
|
|
41
|
-
|
|
39
|
+
interface SwitchInlineChosenChatButton extends AbstractInlineKeyboardButton {
|
|
42
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 */
|
|
43
41
|
switch_inline_query_chosen_chat: SwitchInlineQueryChosenChat;
|
|
44
42
|
}
|
|
45
|
-
|
|
43
|
+
interface GameButton extends AbstractInlineKeyboardButton {
|
|
46
44
|
/** Description of the game that will be launched when the user presses the button.
|
|
47
45
|
|
|
48
46
|
NOTE: This type of button must always be the first button in the first row. */
|
|
49
47
|
callback_game: CallbackGame;
|
|
50
48
|
}
|
|
51
|
-
|
|
49
|
+
interface PayButton extends AbstractInlineKeyboardButton {
|
|
52
50
|
/** Specify True, to send a Pay button.
|
|
53
51
|
|
|
54
52
|
NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages. */
|
|
55
53
|
pay: boolean;
|
|
56
54
|
}
|
|
57
|
-
export {};
|
|
58
55
|
}
|
|
59
56
|
/** This object represents one button of an inline keyboard. You must use exactly one of the optional fields. */
|
|
60
57
|
export type InlineKeyboardButton = InlineKeyboardButton.CallbackButton | InlineKeyboardButton.GameButton | InlineKeyboardButton.LoginButton | InlineKeyboardButton.PayButton | InlineKeyboardButton.SwitchInlineButton | InlineKeyboardButton.SwitchInlineCurrentChatButton | InlineKeyboardButton.SwitchInlineChosenChatButton | InlineKeyboardButton.UrlButton | InlineKeyboardButton.WebAppButton;
|
package/message.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare namespace Message {
|
|
|
20
20
|
/** True, if the message is sent to a forum topic */
|
|
21
21
|
is_topic_message?: boolean;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
interface CommonMessage extends ServiceMessage {
|
|
24
24
|
/** For forwarded messages, sender of the original message */
|
|
25
25
|
forward_from?: User;
|
|
26
26
|
/** For messages forwarded from channels or from anonymous administrators, information about the original sender chat */
|
|
@@ -48,65 +48,65 @@ export declare namespace Message {
|
|
|
48
48
|
/** Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */
|
|
49
49
|
reply_markup?: InlineKeyboardMarkup;
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
interface CaptionableMessage extends CommonMessage {
|
|
52
52
|
/** Caption for the animation, audio, document, photo, video or voice */
|
|
53
53
|
caption?: string;
|
|
54
54
|
/** For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption */
|
|
55
55
|
caption_entities?: MessageEntity[];
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
interface MediaMessage extends CaptionableMessage {
|
|
58
58
|
/** The unique identifier of a media message group this message belongs to */
|
|
59
59
|
media_group_id?: string;
|
|
60
60
|
/** True, if the message media is covered by a spoiler animation */
|
|
61
61
|
has_media_spoiler?: true;
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
63
|
+
type TextMessage = CommonMessage & MsgWith<"text">;
|
|
64
|
+
type AudioMessage = CaptionableMessage & MsgWith<"audio">;
|
|
65
|
+
type DocumentMessage = CaptionableMessage & MsgWith<"document">;
|
|
66
|
+
type AnimationMessage = DocumentMessage & MsgWith<"animation">;
|
|
67
|
+
type PhotoMessage = MediaMessage & MsgWith<"photo">;
|
|
68
|
+
type StickerMessage = CommonMessage & MsgWith<"sticker">;
|
|
69
|
+
type StoryMessage = CommonMessage & MsgWith<"story">;
|
|
70
|
+
type VideoMessage = MediaMessage & MsgWith<"video">;
|
|
71
|
+
type VideoNoteMessage = CommonMessage & MsgWith<"video_note">;
|
|
72
|
+
type VoiceMessage = CaptionableMessage & MsgWith<"voice">;
|
|
73
|
+
type ContactMessage = CommonMessage & MsgWith<"contact">;
|
|
74
|
+
type DiceMessage = CommonMessage & MsgWith<"dice">;
|
|
75
|
+
type GameMessage = CommonMessage & MsgWith<"game">;
|
|
76
|
+
type PollMessage = CommonMessage & MsgWith<"poll">;
|
|
77
|
+
type LocationMessage = CommonMessage & MsgWith<"location">;
|
|
78
|
+
type VenueMessage = LocationMessage & MsgWith<"venue">;
|
|
79
|
+
type NewChatMembersMessage = ServiceMessage & MsgWith<"new_chat_members">;
|
|
80
|
+
type LeftChatMemberMessage = ServiceMessage & MsgWith<"left_chat_member">;
|
|
81
|
+
type NewChatTitleMessage = ServiceMessage & MsgWith<"new_chat_title">;
|
|
82
|
+
type NewChatPhotoMessage = ServiceMessage & MsgWith<"new_chat_photo">;
|
|
83
|
+
type DeleteChatPhotoMessage = ServiceMessage & MsgWith<"delete_chat_photo">;
|
|
84
|
+
type GroupChatCreatedMessage = ServiceMessage & MsgWith<"group_chat_created">;
|
|
85
|
+
type SupergroupChatCreated = ServiceMessage & MsgWith<"supergroup_chat_created">;
|
|
86
|
+
type ChannelChatCreatedMessage = ServiceMessage & MsgWith<"channel_chat_created">;
|
|
87
|
+
type MessageAutoDeleteTimerChangedMessage = ServiceMessage & MsgWith<"message_auto_delete_timer_changed">;
|
|
88
|
+
type MigrateToChatIdMessage = ServiceMessage & MsgWith<"migrate_to_chat_id">;
|
|
89
|
+
type MigrateFromChatIdMessage = ServiceMessage & MsgWith<"migrate_from_chat_id">;
|
|
90
|
+
type PinnedMessageMessage = ServiceMessage & MsgWith<"pinned_message">;
|
|
91
|
+
type InvoiceMessage = ServiceMessage & MsgWith<"invoice">;
|
|
92
|
+
type SuccessfulPaymentMessage = ServiceMessage & MsgWith<"successful_payment">;
|
|
93
|
+
type UserSharedMessage = ServiceMessage & MsgWith<"user_shared">;
|
|
94
|
+
type ChatSharedMessage = ServiceMessage & MsgWith<"chat_shared">;
|
|
95
|
+
type ConnectedWebsiteMessage = ServiceMessage & MsgWith<"connected_website">;
|
|
96
|
+
type WriteAccessAllowedMessage = ServiceMessage & MsgWith<"write_access_allowed">;
|
|
97
|
+
type PassportDataMessage = ServiceMessage & MsgWith<"passport_data">;
|
|
98
|
+
type ProximityAlertTriggeredMessage = ServiceMessage & MsgWith<"proximity_alert_triggered">;
|
|
99
|
+
type ForumTopicCreatedMessage = ServiceMessage & MsgWith<"forum_topic_created">;
|
|
100
|
+
type ForumTopicEditedMessage = ServiceMessage & MsgWith<"forum_topic_edited">;
|
|
101
|
+
type ForumTopicClosedMessage = ServiceMessage & MsgWith<"forum_topic_closed">;
|
|
102
|
+
type ForumTopicReopenedMessage = ServiceMessage & MsgWith<"forum_topic_reopened">;
|
|
103
|
+
type GeneralForumTopicHiddenMessage = ServiceMessage & MsgWith<"general_forum_topic_hidden">;
|
|
104
|
+
type GeneralForumTopicUnhiddenMessage = ServiceMessage & MsgWith<"general_forum_topic_unhidden">;
|
|
105
|
+
type VideoChatScheduledMessage = ServiceMessage & MsgWith<"video_chat_scheduled">;
|
|
106
|
+
type VideoChatStartedMessage = ServiceMessage & MsgWith<"video_chat_started">;
|
|
107
|
+
type VideoChatEndedMessage = ServiceMessage & MsgWith<"video_chat_ended">;
|
|
108
|
+
type VideoChatParticipantsInvitedMessage = ServiceMessage & MsgWith<"video_chat_participants_invited">;
|
|
109
|
+
type WebAppDataMessage = ServiceMessage & MsgWith<"web_app_data">;
|
|
110
110
|
}
|
|
111
111
|
type ReplyMessage = Message & {
|
|
112
112
|
reply_to_message: undefined;
|
|
@@ -126,6 +126,8 @@ export interface Message extends Message.MediaMessage {
|
|
|
126
126
|
photo?: PhotoSize[];
|
|
127
127
|
/** Message is a sticker, information about the sticker */
|
|
128
128
|
sticker?: Sticker;
|
|
129
|
+
/** Message is a forwarded story */
|
|
130
|
+
story?: Story;
|
|
129
131
|
/** Message is a video, information about the video */
|
|
130
132
|
video?: Video;
|
|
131
133
|
/** Message is a video note, information about the video message */
|
|
@@ -256,11 +258,11 @@ Please note:
|
|
|
256
258
|
|
|
257
259
|
- Any character with code between 1 and 126 inclusively can be escaped anywhere with a preceding '\' character, in which case it is treated as an ordinary character and not a part of the markup. This implies that '\' character usually must be escaped with a preceding '\' character.
|
|
258
260
|
- Inside `pre` and `code` entities, all '`' and '\' characters must be escaped with a preceding '\' character.
|
|
259
|
-
- Inside `(...)` part of inline link definition, all ')' and '\' must be escaped with a preceding '\' character.
|
|
260
|
-
- A valid emoji must be provided as an alternative value for the custom emoji. The emoji will be shown instead of the custom emoji in places where a custom emoji cannot be displayed (e.g., system notifications) or if the message is forwarded by a non-premium user. It is recommended to use the emoji from the emoji field of the custom emoji sticker.
|
|
261
|
-
- Custom emoji entities can only be used by bots that purchased additional usernames on Fragment.
|
|
261
|
+
- Inside the `(...)` part of the inline link and custom emoji definition, all ')' and '\' must be escaped with a preceding '\' character.
|
|
262
262
|
- In all other places characters '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' must be escaped with the preceding character '\'.
|
|
263
263
|
- In case of ambiguity between `italic` and `underline` entities `__` is always greadily treated from left to right as beginning or end of `underline` entity, so instead of `___italic underline___` use `___italic underline_\r__`, where `\r` is a character with code 13, which will be ignored.
|
|
264
|
+
- A valid emoji must be provided as an alternative value for the custom emoji. The emoji will be shown instead of the custom emoji in places where a custom emoji cannot be displayed (e.g., system notifications) or if the message is forwarded by a non-premium user. It is recommended to use the emoji from the emoji field of the custom emoji sticker.
|
|
265
|
+
- Custom emoji entities can only be used by bots that purchased additional usernames on Fragment.
|
|
264
266
|
|
|
265
267
|
#### HTML style
|
|
266
268
|
To use this mode, pass *HTML* in the *parse_mode* field. The following tags are currently supported:
|
|
@@ -322,30 +324,29 @@ export declare namespace MessageEntity {
|
|
|
322
324
|
/** Length of the entity in UTF-16 code units */
|
|
323
325
|
length: number;
|
|
324
326
|
}
|
|
325
|
-
|
|
327
|
+
interface CommonMessageEntity extends AbstractMessageEntity {
|
|
326
328
|
type: "mention" | "hashtag" | "cashtag" | "bot_command" | "url" | "email" | "phone_number" | "bold" | "italic" | "underline" | "strikethrough" | "spoiler" | "code";
|
|
327
329
|
}
|
|
328
|
-
|
|
330
|
+
interface PreMessageEntity extends AbstractMessageEntity {
|
|
329
331
|
type: "pre";
|
|
330
332
|
/** For “pre” only, the programming language of the entity text */
|
|
331
333
|
language?: string;
|
|
332
334
|
}
|
|
333
|
-
|
|
335
|
+
interface TextLinkMessageEntity extends AbstractMessageEntity {
|
|
334
336
|
type: "text_link";
|
|
335
337
|
/** For “text_link” only, URL that will be opened after user taps on the text */
|
|
336
338
|
url: string;
|
|
337
339
|
}
|
|
338
|
-
|
|
340
|
+
interface TextMentionMessageEntity extends AbstractMessageEntity {
|
|
339
341
|
type: "text_mention";
|
|
340
342
|
/** For “text_mention” only, the mentioned user */
|
|
341
343
|
user: User;
|
|
342
344
|
}
|
|
343
|
-
|
|
345
|
+
interface CustomEmojiMessageEntity extends AbstractMessageEntity {
|
|
344
346
|
type: "custom_emoji";
|
|
345
347
|
/** For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker */
|
|
346
348
|
custom_emoji_id: string;
|
|
347
349
|
}
|
|
348
|
-
export {};
|
|
349
350
|
}
|
|
350
351
|
/** This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. */
|
|
351
352
|
export type MessageEntity = MessageEntity.CommonMessageEntity | MessageEntity.CustomEmojiMessageEntity | MessageEntity.PreMessageEntity | MessageEntity.TextLinkMessageEntity | MessageEntity.TextMentionMessageEntity;
|
|
@@ -499,9 +500,11 @@ export interface PollOption {
|
|
|
499
500
|
export interface PollAnswer {
|
|
500
501
|
/** Unique poll identifier */
|
|
501
502
|
poll_id: string;
|
|
502
|
-
/** The
|
|
503
|
-
|
|
504
|
-
/**
|
|
503
|
+
/** The chat that changed the answer to the poll, if the voter is anonymous */
|
|
504
|
+
voter_chat?: Chat;
|
|
505
|
+
/** The user that changed the answer to the poll, if the voter isn't anonymous */
|
|
506
|
+
user?: User;
|
|
507
|
+
/** 0-based identifiers of chosen answer options. May be empty if the vote was retracted. */
|
|
505
508
|
option_ids: number[];
|
|
506
509
|
}
|
|
507
510
|
/** This object contains information about a poll. */
|
|
@@ -565,6 +568,9 @@ export interface Venue {
|
|
|
565
568
|
/** Google Places type of the venue. (See supported types.) */
|
|
566
569
|
google_place_type?: string;
|
|
567
570
|
}
|
|
571
|
+
/** This object represents a message about a forwarded story in the chat. Currently holds no information. */
|
|
572
|
+
export interface Story {
|
|
573
|
+
}
|
|
568
574
|
/** This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. */
|
|
569
575
|
export interface ProximityAlertTriggered {
|
|
570
576
|
/** User that triggered the alert */
|
package/methods.d.ts
CHANGED
|
@@ -903,6 +903,11 @@ export type ApiMethods<F> = {
|
|
|
903
903
|
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
904
904
|
chat_id: number | string;
|
|
905
905
|
}): true;
|
|
906
|
+
/** Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success. */
|
|
907
|
+
unpinAllGeneralForumTopicMessages(args: {
|
|
908
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
909
|
+
chat_id: number | string;
|
|
910
|
+
}): true;
|
|
906
911
|
/** Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
|
|
907
912
|
|
|
908
913
|
Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter. */
|
|
@@ -1226,7 +1231,7 @@ export type ApiMethods<F> = {
|
|
|
1226
1231
|
results: readonly InlineQueryResult[];
|
|
1227
1232
|
/** The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. */
|
|
1228
1233
|
cache_time?: number;
|
|
1229
|
-
/** Pass True if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query */
|
|
1234
|
+
/** Pass True if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query. */
|
|
1230
1235
|
is_personal?: boolean;
|
|
1231
1236
|
/** Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. */
|
|
1232
1237
|
next_offset?: string;
|