@grammyjs/types 3.17.0 → 3.18.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/inline.d.ts +2 -4
- package/manage.d.ts +28 -28
- package/message.d.ts +1 -1
- package/methods.d.ts +31 -5
- package/package.json +1 -1
- package/payment.d.ts +2 -0
package/inline.d.ts
CHANGED
|
@@ -55,8 +55,6 @@ export interface InlineQueryResultArticle {
|
|
|
55
55
|
reply_markup?: InlineKeyboardMarkup;
|
|
56
56
|
/** URL of the result */
|
|
57
57
|
url?: string;
|
|
58
|
-
/** Pass True if you don't want the URL to be shown in the message */
|
|
59
|
-
hide_url?: boolean;
|
|
60
58
|
/** Short description of the result */
|
|
61
59
|
description?: string;
|
|
62
60
|
/** Url of the thumbnail for the result */
|
|
@@ -103,7 +101,7 @@ export interface InlineQueryResultGif {
|
|
|
103
101
|
type: "gif";
|
|
104
102
|
/** Unique identifier for this result, 1-64 bytes */
|
|
105
103
|
id: string;
|
|
106
|
-
/** A valid URL for the GIF file
|
|
104
|
+
/** A valid URL for the GIF file */
|
|
107
105
|
gif_url: string;
|
|
108
106
|
/** Width of the GIF */
|
|
109
107
|
gif_width?: number;
|
|
@@ -136,7 +134,7 @@ export interface InlineQueryResultMpeg4Gif {
|
|
|
136
134
|
type: "mpeg4_gif";
|
|
137
135
|
/** Unique identifier for this result, 1-64 bytes */
|
|
138
136
|
id: string;
|
|
139
|
-
/** A valid URL for the MPEG4 file
|
|
137
|
+
/** A valid URL for the MPEG4 file */
|
|
140
138
|
mpeg4_url: string;
|
|
141
139
|
/** Video width */
|
|
142
140
|
mpeg4_width?: number;
|
package/manage.d.ts
CHANGED
|
@@ -136,11 +136,11 @@ export declare namespace ChatFullInfo {
|
|
|
136
136
|
type: "private";
|
|
137
137
|
/** Title, for supergroups, channels and group chats */
|
|
138
138
|
title?: undefined;
|
|
139
|
-
/**
|
|
139
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
140
140
|
username?: string;
|
|
141
|
-
/**
|
|
141
|
+
/** First name of the other party in a private chat */
|
|
142
142
|
first_name: string;
|
|
143
|
-
/**
|
|
143
|
+
/** Last name of the other party in a private chat */
|
|
144
144
|
last_name?: string;
|
|
145
145
|
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
146
146
|
is_forum?: undefined;
|
|
@@ -170,7 +170,7 @@ export declare namespace ChatFullInfo {
|
|
|
170
170
|
profile_accent_color_id?: number;
|
|
171
171
|
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
172
172
|
profile_background_custom_emoji_id?: string;
|
|
173
|
-
/**
|
|
173
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
174
174
|
emoji_status_custom_emoji_id?: string;
|
|
175
175
|
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
176
176
|
emoji_status_expiration_date?: number;
|
|
@@ -186,7 +186,7 @@ export declare namespace ChatFullInfo {
|
|
|
186
186
|
join_by_request?: undefined;
|
|
187
187
|
/** Description, for groups, supergroups and channel chats */
|
|
188
188
|
description?: undefined;
|
|
189
|
-
/**
|
|
189
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
190
190
|
invite_link?: undefined;
|
|
191
191
|
/** The most recent pinned message (by sending date) */
|
|
192
192
|
pinned_message?: Message;
|
|
@@ -194,9 +194,9 @@ export declare namespace ChatFullInfo {
|
|
|
194
194
|
permissions?: undefined;
|
|
195
195
|
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
196
196
|
slow_mode_delay?: undefined;
|
|
197
|
-
/**
|
|
197
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
198
198
|
unrestrict_boost_count?: undefined;
|
|
199
|
-
/**
|
|
199
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
200
200
|
message_auto_delete_time?: number;
|
|
201
201
|
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
202
202
|
has_aggressive_anti_spam_enabled?: undefined;
|
|
@@ -227,11 +227,11 @@ export declare namespace ChatFullInfo {
|
|
|
227
227
|
type: "group";
|
|
228
228
|
/** Title, for supergroups, channels and group chats */
|
|
229
229
|
title: string;
|
|
230
|
-
/**
|
|
230
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
231
231
|
username?: undefined;
|
|
232
|
-
/**
|
|
232
|
+
/** First name of the other party in a private chat */
|
|
233
233
|
first_name?: undefined;
|
|
234
|
-
/**
|
|
234
|
+
/** Last name of the other party in a private chat */
|
|
235
235
|
last_name?: undefined;
|
|
236
236
|
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
237
237
|
is_forum?: undefined;
|
|
@@ -261,7 +261,7 @@ export declare namespace ChatFullInfo {
|
|
|
261
261
|
profile_accent_color_id?: number;
|
|
262
262
|
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
263
263
|
profile_background_custom_emoji_id?: string;
|
|
264
|
-
/**
|
|
264
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
265
265
|
emoji_status_custom_emoji_id?: string;
|
|
266
266
|
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
267
267
|
emoji_status_expiration_date?: number;
|
|
@@ -277,7 +277,7 @@ export declare namespace ChatFullInfo {
|
|
|
277
277
|
join_by_request?: undefined;
|
|
278
278
|
/** Description, for groups, supergroups and channel chats */
|
|
279
279
|
description?: string;
|
|
280
|
-
/**
|
|
280
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
281
281
|
invite_link?: string;
|
|
282
282
|
/** The most recent pinned message (by sending date) */
|
|
283
283
|
pinned_message?: Message;
|
|
@@ -285,9 +285,9 @@ export declare namespace ChatFullInfo {
|
|
|
285
285
|
permissions?: ChatPermissions;
|
|
286
286
|
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
287
287
|
slow_mode_delay?: undefined;
|
|
288
|
-
/**
|
|
288
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
289
289
|
unrestrict_boost_count?: undefined;
|
|
290
|
-
/**
|
|
290
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
291
291
|
message_auto_delete_time?: number;
|
|
292
292
|
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
293
293
|
has_aggressive_anti_spam_enabled?: undefined;
|
|
@@ -318,11 +318,11 @@ export declare namespace ChatFullInfo {
|
|
|
318
318
|
type: "supergroup";
|
|
319
319
|
/** Title, for supergroups, channels and group chats */
|
|
320
320
|
title: string;
|
|
321
|
-
/**
|
|
321
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
322
322
|
username?: string;
|
|
323
|
-
/**
|
|
323
|
+
/** First name of the other party in a private chat */
|
|
324
324
|
first_name?: undefined;
|
|
325
|
-
/**
|
|
325
|
+
/** Last name of the other party in a private chat */
|
|
326
326
|
last_name?: undefined;
|
|
327
327
|
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
328
328
|
is_forum?: true;
|
|
@@ -352,7 +352,7 @@ export declare namespace ChatFullInfo {
|
|
|
352
352
|
profile_accent_color_id?: number;
|
|
353
353
|
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
354
354
|
profile_background_custom_emoji_id?: string;
|
|
355
|
-
/**
|
|
355
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
356
356
|
emoji_status_custom_emoji_id?: string;
|
|
357
357
|
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
358
358
|
emoji_status_expiration_date?: number;
|
|
@@ -368,7 +368,7 @@ export declare namespace ChatFullInfo {
|
|
|
368
368
|
join_by_request?: true;
|
|
369
369
|
/** Description, for groups, supergroups and channel chats */
|
|
370
370
|
description?: string;
|
|
371
|
-
/**
|
|
371
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
372
372
|
invite_link?: string;
|
|
373
373
|
/** The most recent pinned message (by sending date) */
|
|
374
374
|
pinned_message?: Message;
|
|
@@ -376,9 +376,9 @@ export declare namespace ChatFullInfo {
|
|
|
376
376
|
permissions?: ChatPermissions;
|
|
377
377
|
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
378
378
|
slow_mode_delay?: number;
|
|
379
|
-
/**
|
|
379
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
380
380
|
unrestrict_boost_count?: number;
|
|
381
|
-
/**
|
|
381
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
382
382
|
message_auto_delete_time?: number;
|
|
383
383
|
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
384
384
|
has_aggressive_anti_spam_enabled?: true;
|
|
@@ -409,11 +409,11 @@ export declare namespace ChatFullInfo {
|
|
|
409
409
|
type: "channel";
|
|
410
410
|
/** Title, for supergroups, channels and group chats */
|
|
411
411
|
title: string;
|
|
412
|
-
/**
|
|
412
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
413
413
|
username?: string;
|
|
414
|
-
/**
|
|
414
|
+
/** First name of the other party in a private chat */
|
|
415
415
|
first_name?: undefined;
|
|
416
|
-
/**
|
|
416
|
+
/** Last name of the other party in a private chat */
|
|
417
417
|
last_name?: undefined;
|
|
418
418
|
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
419
419
|
is_forum?: undefined;
|
|
@@ -443,7 +443,7 @@ export declare namespace ChatFullInfo {
|
|
|
443
443
|
profile_accent_color_id?: number;
|
|
444
444
|
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
445
445
|
profile_background_custom_emoji_id?: string;
|
|
446
|
-
/**
|
|
446
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
447
447
|
emoji_status_custom_emoji_id?: string;
|
|
448
448
|
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
449
449
|
emoji_status_expiration_date?: number;
|
|
@@ -459,7 +459,7 @@ export declare namespace ChatFullInfo {
|
|
|
459
459
|
join_by_request?: undefined;
|
|
460
460
|
/** Description, for groups, supergroups and channel chats */
|
|
461
461
|
description?: string;
|
|
462
|
-
/**
|
|
462
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
463
463
|
invite_link?: string;
|
|
464
464
|
/** The most recent pinned message (by sending date) */
|
|
465
465
|
pinned_message?: Message;
|
|
@@ -467,9 +467,9 @@ export declare namespace ChatFullInfo {
|
|
|
467
467
|
permissions?: undefined;
|
|
468
468
|
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
469
469
|
slow_mode_delay?: undefined;
|
|
470
|
-
/**
|
|
470
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
471
471
|
unrestrict_boost_count?: undefined;
|
|
472
|
-
/**
|
|
472
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
473
473
|
message_auto_delete_time?: number;
|
|
474
474
|
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
475
475
|
has_aggressive_anti_spam_enabled?: undefined;
|
package/message.d.ts
CHANGED
|
@@ -905,7 +905,7 @@ export interface BackgroundTypeWallpaper {
|
|
|
905
905
|
/** True, if the background moves slightly when the device is tilted */
|
|
906
906
|
is_moving?: true;
|
|
907
907
|
}
|
|
908
|
-
/** The background is a PNG or TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user. */
|
|
908
|
+
/** The background is a .PNG or .TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user. */
|
|
909
909
|
export interface BackgroundTypePattern {
|
|
910
910
|
/** Type of the background, always “pattern” */
|
|
911
911
|
type: "pattern";
|
package/methods.d.ts
CHANGED
|
@@ -29,10 +29,10 @@ export type ApiMethods<F> = {
|
|
|
29
29
|
timeout?: number;
|
|
30
30
|
/** A list of the update types you want your bot to receive. For example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.
|
|
31
31
|
|
|
32
|
-
Please note that this parameter doesn't affect updates created before the call to
|
|
32
|
+
Please note that this parameter doesn't affect updates created before the call to getUpdates, so unwanted updates may be received for a short period of time. */
|
|
33
33
|
allowed_updates?: ReadonlyArray<Exclude<keyof Update, "update_id">>;
|
|
34
34
|
}): Update[];
|
|
35
|
-
/** Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.
|
|
35
|
+
/** Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request (a request with response HTTP status code different from 2XY), we will repeat the request and give up after a reasonable amount of attempts. Returns True on success.
|
|
36
36
|
|
|
37
37
|
If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.
|
|
38
38
|
|
|
@@ -1476,9 +1476,9 @@ export type ApiMethods<F> = {
|
|
|
1476
1476
|
name: string;
|
|
1477
1477
|
/** User identifier of the sticker set owner */
|
|
1478
1478
|
user_id: number;
|
|
1479
|
-
/** A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animation-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, 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. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail. */
|
|
1479
|
+
/** A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animation-requirements for animated sticker technical requirements), or a .WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, 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. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail. */
|
|
1480
1480
|
thumbnail?: F | string;
|
|
1481
|
-
/** Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a WEBM video */
|
|
1481
|
+
/** Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a .WEBM video */
|
|
1482
1482
|
format: "static" | "animated" | "video";
|
|
1483
1483
|
}): true;
|
|
1484
1484
|
/** Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success. */
|
|
@@ -1496,6 +1496,8 @@ export type ApiMethods<F> = {
|
|
|
1496
1496
|
user_id: number;
|
|
1497
1497
|
/** Identifier of the gift */
|
|
1498
1498
|
gift_id: string;
|
|
1499
|
+
/** Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver */
|
|
1500
|
+
pay_for_upgrade?: boolean;
|
|
1499
1501
|
/** Text that will be shown along with the gift; 0-255 characters */
|
|
1500
1502
|
text?: string;
|
|
1501
1503
|
/** Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored. */
|
|
@@ -1696,6 +1698,30 @@ export type ApiMethods<F> = {
|
|
|
1696
1698
|
/** Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot. */
|
|
1697
1699
|
is_canceled: boolean;
|
|
1698
1700
|
}): true;
|
|
1701
|
+
/** Verifies a user on behalf of the organization which is represented by the bot. Returns True on success. */
|
|
1702
|
+
verifyUser(args: {
|
|
1703
|
+
/** Unique identifier of the target user */
|
|
1704
|
+
user_id: number;
|
|
1705
|
+
/** Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description. */
|
|
1706
|
+
custom_description?: string;
|
|
1707
|
+
}): true;
|
|
1708
|
+
/** Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success. */
|
|
1709
|
+
verifyChat(args: {
|
|
1710
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1711
|
+
chat_id: number | string;
|
|
1712
|
+
/** Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description. */
|
|
1713
|
+
custom_description?: string;
|
|
1714
|
+
}): true;
|
|
1715
|
+
/** Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success. */
|
|
1716
|
+
removeUserVerification(args: {
|
|
1717
|
+
/** Unique identifier of the target user */
|
|
1718
|
+
user_id: number;
|
|
1719
|
+
}): true;
|
|
1720
|
+
/** Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success. */
|
|
1721
|
+
removeChatVerification(args: {
|
|
1722
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1723
|
+
chat_id: number | string;
|
|
1724
|
+
}): true;
|
|
1699
1725
|
/** Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.
|
|
1700
1726
|
|
|
1701
1727
|
Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. */
|
|
@@ -1765,7 +1791,7 @@ export type ApiMethods<F> = {
|
|
|
1765
1791
|
export interface InputSticker<F> {
|
|
1766
1792
|
/** The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, 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. Animated and video stickers can't be uploaded via HTTP URL. */
|
|
1767
1793
|
sticker: F | string;
|
|
1768
|
-
/** Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a WEBM video */
|
|
1794
|
+
/** Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a .WEBM video */
|
|
1769
1795
|
format: "static" | "animated" | "video";
|
|
1770
1796
|
/** List of 1-20 emoji associated with the sticker */
|
|
1771
1797
|
emoji_list: string[];
|
package/package.json
CHANGED
package/payment.d.ts
CHANGED
|
@@ -253,6 +253,8 @@ export interface Gift {
|
|
|
253
253
|
sticker: Sticker;
|
|
254
254
|
/** The number of Telegram Stars that must be paid to send the sticker */
|
|
255
255
|
star_count: number;
|
|
256
|
+
/** The number of Telegram Stars that must be paid to upgrade the gift to a unique one */
|
|
257
|
+
upgrade_star_count?: number;
|
|
256
258
|
/** The total number of the gifts of this type that can be sent; for limited gifts only */
|
|
257
259
|
total_count?: number;
|
|
258
260
|
/** The number of remaining gifts of this type that can be sent; for limited gifts only */
|