@telegram.ts/types 1.3.2 → 1.3.3
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/package.json +1 -1
- package/src/apiMethodsTypes.d.ts +5 -0
- package/src/inlineTypes.d.ts +14 -2
- package/src/manageTypes.d.ts +2 -0
- package/src/messageTypes.d.ts +10 -3
package/package.json
CHANGED
package/src/apiMethodsTypes.d.ts
CHANGED
|
@@ -1027,6 +1027,11 @@ export type ApiMethods<F> = {
|
|
|
1027
1027
|
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1028
1028
|
chat_id: number | string;
|
|
1029
1029
|
}): true;
|
|
1030
|
+
/** 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. */
|
|
1031
|
+
unpinAllGeneralForumTopicMessages(args: {
|
|
1032
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1033
|
+
chat_id: number | string;
|
|
1034
|
+
}): true;
|
|
1030
1035
|
/** 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.
|
|
1031
1036
|
|
|
1032
1037
|
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. */
|
package/src/inlineTypes.d.ts
CHANGED
|
@@ -139,6 +139,8 @@ export interface InlineQueryResultGif {
|
|
|
139
139
|
caption?: string;
|
|
140
140
|
/** Mode for parsing entities in the caption. See formatting options for more details. */
|
|
141
141
|
parse_mode?: ParseMode;
|
|
142
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
143
|
+
caption_entities?: MessageEntity[];
|
|
142
144
|
/** Inline keyboard attached to the message */
|
|
143
145
|
reply_markup?: InlineKeyboardMarkup;
|
|
144
146
|
/** Content of the message to be sent instead of the GIF animation */
|
|
@@ -168,6 +170,8 @@ export interface InlineQueryResultMpeg4Gif {
|
|
|
168
170
|
caption?: string;
|
|
169
171
|
/** Mode for parsing entities in the caption. See formatting options for more details. */
|
|
170
172
|
parse_mode?: ParseMode;
|
|
173
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
174
|
+
caption_entities?: MessageEntity[];
|
|
171
175
|
/** Inline keyboard attached to the message */
|
|
172
176
|
reply_markup?: InlineKeyboardMarkup;
|
|
173
177
|
/** Content of the message to be sent instead of the video animation */
|
|
@@ -251,6 +255,8 @@ export interface InlineQueryResultVoice {
|
|
|
251
255
|
caption?: string;
|
|
252
256
|
/** Mode for parsing entities in the voice message caption. See formatting options for more details. */
|
|
253
257
|
parse_mode?: ParseMode;
|
|
258
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
259
|
+
caption_entities?: MessageEntity[];
|
|
254
260
|
/** Recording duration in seconds */
|
|
255
261
|
voice_duration?: number;
|
|
256
262
|
/** Inline keyboard attached to the message */
|
|
@@ -309,9 +315,9 @@ export interface InlineQueryResultLocation {
|
|
|
309
315
|
horizontal_accuracy?: number;
|
|
310
316
|
/** Period in seconds for which the location can be updated, should be between 60 and 86400. */
|
|
311
317
|
live_period?: number;
|
|
312
|
-
/**
|
|
318
|
+
/** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
|
|
313
319
|
heading?: number;
|
|
314
|
-
/**
|
|
320
|
+
/** For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. */
|
|
315
321
|
proximity_alert_radius?: number;
|
|
316
322
|
/** Inline keyboard attached to the message */
|
|
317
323
|
reply_markup?: InlineKeyboardMarkup;
|
|
@@ -436,6 +442,8 @@ export interface InlineQueryResultCachedGif {
|
|
|
436
442
|
caption?: string;
|
|
437
443
|
/** Mode for parsing entities in the caption. See formatting options for more details. */
|
|
438
444
|
parse_mode?: ParseMode;
|
|
445
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
446
|
+
caption_entities?: MessageEntity[];
|
|
439
447
|
/** Inline keyboard attached to the message */
|
|
440
448
|
reply_markup?: InlineKeyboardMarkup;
|
|
441
449
|
/** Content of the message to be sent instead of the GIF animation */
|
|
@@ -455,6 +463,8 @@ export interface InlineQueryResultCachedMpeg4Gif {
|
|
|
455
463
|
caption?: string;
|
|
456
464
|
/** Mode for parsing entities in the caption. See formatting options for more details. */
|
|
457
465
|
parse_mode?: ParseMode;
|
|
466
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
467
|
+
caption_entities?: MessageEntity[];
|
|
458
468
|
/** Inline keyboard attached to the message */
|
|
459
469
|
reply_markup?: InlineKeyboardMarkup;
|
|
460
470
|
/** Content of the message to be sent instead of the video animation */
|
|
@@ -540,6 +550,8 @@ export interface InlineQueryResultCachedVoice {
|
|
|
540
550
|
caption?: string;
|
|
541
551
|
/** Mode for parsing entities in the voice message caption. See formatting options for more details. */
|
|
542
552
|
parse_mode?: ParseMode;
|
|
553
|
+
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
554
|
+
caption_entities?: MessageEntity[];
|
|
543
555
|
/** Inline keyboard attached to the message */
|
|
544
556
|
reply_markup?: InlineKeyboardMarkup;
|
|
545
557
|
/** Content of the message to be sent instead of the voice message */
|
package/src/manageTypes.d.ts
CHANGED
|
@@ -136,6 +136,8 @@ export declare namespace Chat {
|
|
|
136
136
|
GetChat {
|
|
137
137
|
/** Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat. */
|
|
138
138
|
emoji_status_custom_emoji_id?: string;
|
|
139
|
+
/** Expiration date of the emoji status of the other party in a private chat, if any. Returned only in getChat. */
|
|
140
|
+
emoji_status_expiration_date?: number;
|
|
139
141
|
/** Bio of the other party in a private chat. Returned only in getChat. */
|
|
140
142
|
bio?: string;
|
|
141
143
|
/** 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. */
|
package/src/messageTypes.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export declare namespace Message {
|
|
|
66
66
|
export type AnimationMessage = DocumentMessage & MsgWith<"animation">;
|
|
67
67
|
export type PhotoMessage = MediaMessage & MsgWith<"photo">;
|
|
68
68
|
export type StickerMessage = CommonMessage & MsgWith<"sticker">;
|
|
69
|
+
export type StoryMessage = CommonMessage & MsgWith<"story">;
|
|
69
70
|
export type VideoMessage = MediaMessage & MsgWith<"video">;
|
|
70
71
|
export type VideoNoteMessage = CommonMessage & MsgWith<"video_note">;
|
|
71
72
|
export type VoiceMessage = CaptionableMessage & MsgWith<"voice">;
|
|
@@ -175,6 +176,8 @@ export interface Message extends Message.MediaMessage {
|
|
|
175
176
|
new_chat_title?: string;
|
|
176
177
|
/** A chat photo was change to this value */
|
|
177
178
|
new_chat_photo?: PhotoSize[];
|
|
179
|
+
/** Message is a forwarded story */
|
|
180
|
+
story?: Story;
|
|
178
181
|
/** Service message: the chat photo was deleted */
|
|
179
182
|
delete_chat_photo?: true;
|
|
180
183
|
/** Service message: the group has been created */
|
|
@@ -540,9 +543,11 @@ export interface PollOption {
|
|
|
540
543
|
export interface PollAnswer {
|
|
541
544
|
/** Unique poll identifier */
|
|
542
545
|
poll_id: string;
|
|
543
|
-
/** The
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
+
/** The chat that changed the answer to the poll, if the voter is anonymous */
|
|
547
|
+
voter_chat?: Chat;
|
|
548
|
+
/** The user that changed the answer to the poll, if the voter isn't anonymous */
|
|
549
|
+
user?: User;
|
|
550
|
+
/** 0-based identifiers of chosen answer options. May be empty if the vote was retracted. */
|
|
546
551
|
option_ids: number[];
|
|
547
552
|
}
|
|
548
553
|
/** This object contains information about a poll. */
|
|
@@ -606,6 +611,8 @@ export interface Venue {
|
|
|
606
611
|
/** Google Places type of the venue. (See supported types.) */
|
|
607
612
|
google_place_type?: string;
|
|
608
613
|
}
|
|
614
|
+
/** This object represents a message about a forwarded story in the chat. Currently holds no information. */
|
|
615
|
+
export interface Story {}
|
|
609
616
|
/** This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. */
|
|
610
617
|
export interface ProximityAlertTriggered {
|
|
611
618
|
/** User that triggered the alert */
|