@grammyjs/types 2.8.1 → 2.9.1
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/README.md +1 -1
- package/inline.d.ts +8 -8
- package/manage.d.ts +2 -0
- package/markup.d.ts +1 -1
- package/message.d.ts +18 -8
- package/package.json +1 -1
- package/proxied.d.ts +67 -60
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ The actual type definitions themselves are never different.
|
|
|
82
82
|
1. No formatting.
|
|
83
83
|
We do not leverage the markdown capabilities of JSDoc for the sake of easier copying and thus reduced maintenance efforts.
|
|
84
84
|
2. No mentions of `JSON-serialized`.
|
|
85
|
-
As underlying libraries handle serialization, these words are removed from the
|
|
85
|
+
As underlying libraries handle serialization, these words are removed from the explanations.
|
|
86
86
|
3. No mentions of integer numbers that exceed 2^31 but not 2^51.
|
|
87
87
|
All numbers are 64-bit floats in JS, so this is irrelevant.
|
|
88
88
|
Note that JS bit operators cast numbers to 32-bit integers and back, but we deliberately ignore this because people who use bit operators on identifiers or file sizes should know what they're doing, and they should also know that it's a bad idea.
|
package/inline.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export interface InlineQueryResultArticle {
|
|
|
78
78
|
reply_markup?: InlineKeyboardMarkup;
|
|
79
79
|
/** URL of the result */
|
|
80
80
|
url?: string;
|
|
81
|
-
/** Pass True
|
|
81
|
+
/** Pass True if you don't want the URL to be shown in the message */
|
|
82
82
|
hide_url?: boolean;
|
|
83
83
|
/** Short description of the result */
|
|
84
84
|
description?: string;
|
|
@@ -691,19 +691,19 @@ export interface InputInvoiceMessageContent {
|
|
|
691
691
|
photo_width?: number;
|
|
692
692
|
/** Photo height */
|
|
693
693
|
photo_height?: number;
|
|
694
|
-
/** Pass True
|
|
694
|
+
/** Pass True if you require the user's full name to complete the order */
|
|
695
695
|
need_name?: boolean;
|
|
696
|
-
/** Pass True
|
|
696
|
+
/** Pass True if you require the user's phone number to complete the order */
|
|
697
697
|
need_phone_number?: boolean;
|
|
698
|
-
/** Pass True
|
|
698
|
+
/** Pass True if you require the user's email address to complete the order */
|
|
699
699
|
need_email?: boolean;
|
|
700
|
-
/** Pass True
|
|
700
|
+
/** Pass True if you require the user's shipping address to complete the order */
|
|
701
701
|
need_shipping_address?: boolean;
|
|
702
|
-
/** Pass True
|
|
702
|
+
/** Pass True if the user's phone number should be sent to provider */
|
|
703
703
|
send_phone_number_to_provider?: boolean;
|
|
704
|
-
/** Pass True
|
|
704
|
+
/** Pass True if the user's email address should be sent to provider */
|
|
705
705
|
send_email_to_provider?: boolean;
|
|
706
|
-
/** Pass True
|
|
706
|
+
/** Pass True if the final price depends on the shipping method */
|
|
707
707
|
is_flexible?: boolean;
|
|
708
708
|
}
|
|
709
709
|
|
package/manage.d.ts
CHANGED
|
@@ -143,6 +143,8 @@ export namespace Chat {
|
|
|
143
143
|
bio?: string;
|
|
144
144
|
/** 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. */
|
|
145
145
|
has_private_forwards?: true;
|
|
146
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat. */
|
|
147
|
+
has_restricted_voice_and_video_messages?: true;
|
|
146
148
|
}
|
|
147
149
|
/** Internal type representing group chats returned from `getChat`. */
|
|
148
150
|
export interface GroupGetChat extends GroupChat, MultiUserGetChat {}
|
package/markup.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export type InlineKeyboardButton =
|
|
|
69
69
|
/** This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in.
|
|
70
70
|
Telegram apps support these buttons as of version 5.7. */
|
|
71
71
|
export interface LoginUrl {
|
|
72
|
-
/** An
|
|
72
|
+
/** An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
|
|
73
73
|
|
|
74
74
|
NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization. */
|
|
75
75
|
url: string;
|
package/message.d.ts
CHANGED
|
@@ -315,7 +315,7 @@ export type ParseMode = "Markdown" | "MarkdownV2" | "HTML";
|
|
|
315
315
|
|
|
316
316
|
export namespace MessageEntity {
|
|
317
317
|
interface AbstractMessageEntity {
|
|
318
|
-
/** Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames) */
|
|
318
|
+
/** Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers) */
|
|
319
319
|
type: string;
|
|
320
320
|
/** Offset in UTF-16 code units to the start of the entity */
|
|
321
321
|
offset: number;
|
|
@@ -338,6 +338,11 @@ export namespace MessageEntity {
|
|
|
338
338
|
| "spoiler"
|
|
339
339
|
| "code";
|
|
340
340
|
}
|
|
341
|
+
export interface PreMessageEntity extends AbstractMessageEntity {
|
|
342
|
+
type: "pre";
|
|
343
|
+
/** For “pre” only, the programming language of the entity text */
|
|
344
|
+
language?: string;
|
|
345
|
+
}
|
|
341
346
|
export interface TextLinkMessageEntity extends AbstractMessageEntity {
|
|
342
347
|
type: "text_link";
|
|
343
348
|
/** For “text_link” only, URL that will be opened after user taps on the text */
|
|
@@ -348,16 +353,17 @@ export namespace MessageEntity {
|
|
|
348
353
|
/** For “text_mention” only, the mentioned user */
|
|
349
354
|
user: User;
|
|
350
355
|
}
|
|
351
|
-
export interface
|
|
352
|
-
type: "
|
|
353
|
-
/** For “
|
|
354
|
-
|
|
356
|
+
export interface CustomEmojiMessageEntity extends AbstractMessageEntity {
|
|
357
|
+
type: "custom_emoji";
|
|
358
|
+
/** For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker */
|
|
359
|
+
custom_emoji_id: string;
|
|
355
360
|
}
|
|
356
361
|
}
|
|
357
362
|
|
|
358
363
|
/** This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. */
|
|
359
364
|
export type MessageEntity =
|
|
360
365
|
| MessageEntity.CommonMessageEntity
|
|
366
|
+
| MessageEntity.CustomEmojiMessageEntity
|
|
361
367
|
| MessageEntity.PreMessageEntity
|
|
362
368
|
| MessageEntity.TextLinkMessageEntity
|
|
363
369
|
| MessageEntity.TextMentionMessageEntity;
|
|
@@ -643,6 +649,8 @@ export interface Sticker {
|
|
|
643
649
|
file_id: string;
|
|
644
650
|
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
645
651
|
file_unique_id: string;
|
|
652
|
+
/** Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video. */
|
|
653
|
+
type: "regular" | "mask" | "custom_emoji";
|
|
646
654
|
/** Sticker width */
|
|
647
655
|
width: number;
|
|
648
656
|
/** Sticker height */
|
|
@@ -657,10 +665,12 @@ export interface Sticker {
|
|
|
657
665
|
emoji?: string;
|
|
658
666
|
/** Name of the sticker set to which the sticker belongs */
|
|
659
667
|
set_name?: string;
|
|
660
|
-
/**
|
|
668
|
+
/** For premium regular stickers, premium animation for the sticker */
|
|
661
669
|
premium_animation?: File;
|
|
662
670
|
/** For mask stickers, the position where the mask should be placed */
|
|
663
671
|
mask_position?: MaskPosition;
|
|
672
|
+
/** For custom emoji stickers, unique identifier of the custom emoji */
|
|
673
|
+
custom_emoji_id?: string;
|
|
664
674
|
/** File size in bytes */
|
|
665
675
|
file_size?: number;
|
|
666
676
|
}
|
|
@@ -671,12 +681,12 @@ export interface StickerSet {
|
|
|
671
681
|
name: string;
|
|
672
682
|
/** Sticker set title */
|
|
673
683
|
title: string;
|
|
684
|
+
/** Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji” */
|
|
685
|
+
sticker_type: "regular" | "mask" | "custom_emoji";
|
|
674
686
|
/** True, if the sticker set contains animated stickers */
|
|
675
687
|
is_animated: boolean;
|
|
676
688
|
/** True, if the sticker set contains video stickers */
|
|
677
689
|
is_video: boolean;
|
|
678
|
-
/** True, if the sticker set contains masks */
|
|
679
|
-
contains_masks: boolean;
|
|
680
690
|
/** List of all set stickers */
|
|
681
691
|
stickers: Sticker[];
|
|
682
692
|
/** Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format */
|
package/package.json
CHANGED
package/proxied.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
ParseMode,
|
|
30
30
|
Poll,
|
|
31
31
|
SentWebAppMessage,
|
|
32
|
+
Sticker,
|
|
32
33
|
StickerSet,
|
|
33
34
|
} from "./message";
|
|
34
35
|
import { PassportElementError } from "./passport";
|
|
@@ -48,9 +49,9 @@ export interface InputFileProxy<F> {
|
|
|
48
49
|
undefined ? {} : NonNullable<Params<M, F>[0]>;
|
|
49
50
|
};
|
|
50
51
|
|
|
51
|
-
/** Wrapper type to bundle all methods of the Telegram API */
|
|
52
|
+
/** Wrapper type to bundle all methods of the Telegram Bot API */
|
|
52
53
|
Telegram: {
|
|
53
|
-
/** Use this method to receive incoming updates using long polling (wiki).
|
|
54
|
+
/** Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.
|
|
54
55
|
|
|
55
56
|
Notes
|
|
56
57
|
1. This method will not work if an outgoing webhook is set up.
|
|
@@ -65,7 +66,7 @@ export interface InputFileProxy<F> {
|
|
|
65
66
|
/** 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 (default). If not specified, the previous setting will be used.
|
|
66
67
|
|
|
67
68
|
Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. */
|
|
68
|
-
allowed_updates?:
|
|
69
|
+
allowed_updates?: ReadonlyArray<Exclude<keyof Update, "update_id">>;
|
|
69
70
|
}): Update[];
|
|
70
71
|
|
|
71
72
|
/** 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.
|
|
@@ -133,7 +134,7 @@ export interface InputFileProxy<F> {
|
|
|
133
134
|
protect_content?: boolean;
|
|
134
135
|
/** If the message is a reply, ID of the original message */
|
|
135
136
|
reply_to_message_id?: number;
|
|
136
|
-
/** Pass True
|
|
137
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
137
138
|
allow_sending_without_reply?: boolean;
|
|
138
139
|
/** 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. */
|
|
139
140
|
reply_markup?:
|
|
@@ -157,7 +158,7 @@ export interface InputFileProxy<F> {
|
|
|
157
158
|
message_id: number;
|
|
158
159
|
}): Message;
|
|
159
160
|
|
|
160
|
-
/** Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success. */
|
|
161
|
+
/** Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success. */
|
|
161
162
|
copyMessage(args: {
|
|
162
163
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
163
164
|
chat_id: number | string;
|
|
@@ -177,7 +178,7 @@ export interface InputFileProxy<F> {
|
|
|
177
178
|
protect_content?: boolean;
|
|
178
179
|
/** If the message is a reply, ID of the original message */
|
|
179
180
|
reply_to_message_id?: number;
|
|
180
|
-
/** Pass True
|
|
181
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
181
182
|
allow_sending_without_reply?: boolean;
|
|
182
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. */
|
|
183
184
|
reply_markup?:
|
|
@@ -205,7 +206,7 @@ export interface InputFileProxy<F> {
|
|
|
205
206
|
protect_content?: boolean;
|
|
206
207
|
/** If the message is a reply, ID of the original message */
|
|
207
208
|
reply_to_message_id?: number;
|
|
208
|
-
/** Pass True
|
|
209
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
209
210
|
allow_sending_without_reply?: boolean;
|
|
210
211
|
/** 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. */
|
|
211
212
|
reply_markup?:
|
|
@@ -243,7 +244,7 @@ export interface InputFileProxy<F> {
|
|
|
243
244
|
protect_content?: boolean;
|
|
244
245
|
/** If the message is a reply, ID of the original message */
|
|
245
246
|
reply_to_message_id?: number;
|
|
246
|
-
/** Pass True
|
|
247
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
247
248
|
allow_sending_without_reply?: boolean;
|
|
248
249
|
/** 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. */
|
|
249
250
|
reply_markup?:
|
|
@@ -275,7 +276,7 @@ export interface InputFileProxy<F> {
|
|
|
275
276
|
protect_content?: boolean;
|
|
276
277
|
/** If the message is a reply, ID of the original message */
|
|
277
278
|
reply_to_message_id?: number;
|
|
278
|
-
/** Pass True
|
|
279
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
279
280
|
allow_sending_without_reply?: boolean;
|
|
280
281
|
/** 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. */
|
|
281
282
|
reply_markup?:
|
|
@@ -305,7 +306,7 @@ export interface InputFileProxy<F> {
|
|
|
305
306
|
parse_mode?: ParseMode;
|
|
306
307
|
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
307
308
|
caption_entities?: MessageEntity[];
|
|
308
|
-
/** Pass True
|
|
309
|
+
/** Pass True if the uploaded video is suitable for streaming */
|
|
309
310
|
supports_streaming?: boolean;
|
|
310
311
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
311
312
|
disable_notification?: boolean;
|
|
@@ -313,7 +314,7 @@ export interface InputFileProxy<F> {
|
|
|
313
314
|
protect_content?: boolean;
|
|
314
315
|
/** If the message is a reply, ID of the original message */
|
|
315
316
|
reply_to_message_id?: number;
|
|
316
|
-
/** Pass True
|
|
317
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
317
318
|
allow_sending_without_reply?: boolean;
|
|
318
319
|
/** 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. */
|
|
319
320
|
reply_markup?:
|
|
@@ -349,7 +350,7 @@ export interface InputFileProxy<F> {
|
|
|
349
350
|
protect_content?: boolean;
|
|
350
351
|
/** If the message is a reply, ID of the original message */
|
|
351
352
|
reply_to_message_id?: number;
|
|
352
|
-
/** Pass True
|
|
353
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
353
354
|
allow_sending_without_reply?: boolean;
|
|
354
355
|
/** 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. */
|
|
355
356
|
reply_markup?:
|
|
@@ -379,7 +380,7 @@ export interface InputFileProxy<F> {
|
|
|
379
380
|
protect_content?: boolean;
|
|
380
381
|
/** If the message is a reply, ID of the original message */
|
|
381
382
|
reply_to_message_id?: number;
|
|
382
|
-
/** Pass True
|
|
383
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
383
384
|
allow_sending_without_reply?: boolean;
|
|
384
385
|
/** 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. */
|
|
385
386
|
reply_markup?:
|
|
@@ -408,7 +409,7 @@ export interface InputFileProxy<F> {
|
|
|
408
409
|
protect_content?: boolean;
|
|
409
410
|
/** If the message is a reply, ID of the original message */
|
|
410
411
|
reply_to_message_id?: number;
|
|
411
|
-
/** Pass True
|
|
412
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
412
413
|
allow_sending_without_reply?: boolean;
|
|
413
414
|
/** 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. */
|
|
414
415
|
reply_markup?:
|
|
@@ -435,7 +436,7 @@ export interface InputFileProxy<F> {
|
|
|
435
436
|
protect_content?: boolean;
|
|
436
437
|
/** If messages are a reply, ID of the original message */
|
|
437
438
|
reply_to_message_id?: number;
|
|
438
|
-
/** Pass True
|
|
439
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
439
440
|
allow_sending_without_reply?: boolean;
|
|
440
441
|
}): Array<
|
|
441
442
|
| Message.AudioMessage
|
|
@@ -466,7 +467,7 @@ export interface InputFileProxy<F> {
|
|
|
466
467
|
protect_content?: boolean;
|
|
467
468
|
/** If the message is a reply, ID of the original message */
|
|
468
469
|
reply_to_message_id?: number;
|
|
469
|
-
/** Pass True
|
|
470
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
470
471
|
allow_sending_without_reply?: boolean;
|
|
471
472
|
/** 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. */
|
|
472
473
|
reply_markup?:
|
|
@@ -536,7 +537,7 @@ export interface InputFileProxy<F> {
|
|
|
536
537
|
protect_content?: boolean;
|
|
537
538
|
/** If the message is a reply, ID of the original message */
|
|
538
539
|
reply_to_message_id?: number;
|
|
539
|
-
/** Pass True
|
|
540
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
540
541
|
allow_sending_without_reply?: boolean;
|
|
541
542
|
/** 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. */
|
|
542
543
|
reply_markup?:
|
|
@@ -564,7 +565,7 @@ export interface InputFileProxy<F> {
|
|
|
564
565
|
protect_content?: boolean;
|
|
565
566
|
/** If the message is a reply, ID of the original message */
|
|
566
567
|
reply_to_message_id?: number;
|
|
567
|
-
/** Pass True
|
|
568
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
568
569
|
allow_sending_without_reply?: boolean;
|
|
569
570
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove keyboard or to force a reply from the user. */
|
|
570
571
|
reply_markup?:
|
|
@@ -600,7 +601,7 @@ export interface InputFileProxy<F> {
|
|
|
600
601
|
open_period?: number;
|
|
601
602
|
/** Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period. */
|
|
602
603
|
close_date?: number;
|
|
603
|
-
/** Pass True
|
|
604
|
+
/** Pass True if the poll needs to be immediately closed. This can be useful for poll preview. */
|
|
604
605
|
is_closed?: boolean;
|
|
605
606
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
606
607
|
disable_notification?: boolean;
|
|
@@ -608,7 +609,7 @@ export interface InputFileProxy<F> {
|
|
|
608
609
|
protect_content?: boolean;
|
|
609
610
|
/** If the message is a reply, ID of the original message */
|
|
610
611
|
reply_to_message_id?: number;
|
|
611
|
-
/** Pass True
|
|
612
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
612
613
|
allow_sending_without_reply?: boolean;
|
|
613
614
|
/** 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. */
|
|
614
615
|
reply_markup?:
|
|
@@ -630,7 +631,7 @@ export interface InputFileProxy<F> {
|
|
|
630
631
|
protect_content?: boolean;
|
|
631
632
|
/** If the message is a reply, ID of the original message */
|
|
632
633
|
reply_to_message_id?: number;
|
|
633
|
-
/** Pass True
|
|
634
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
634
635
|
allow_sending_without_reply?: boolean;
|
|
635
636
|
/** 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. */
|
|
636
637
|
reply_markup?:
|
|
@@ -725,27 +726,27 @@ export interface InputFileProxy<F> {
|
|
|
725
726
|
chat_id: number | string;
|
|
726
727
|
/** Unique identifier of the target user */
|
|
727
728
|
user_id: number;
|
|
728
|
-
/** Pass True
|
|
729
|
+
/** Pass True if the administrator's presence in the chat is hidden */
|
|
729
730
|
is_anonymous?: boolean;
|
|
730
|
-
/** Pass True
|
|
731
|
+
/** Pass True if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
|
|
731
732
|
can_manage_chat?: boolean;
|
|
732
|
-
/** Pass True
|
|
733
|
+
/** Pass True if the administrator can create channel posts, channels only */
|
|
733
734
|
can_post_messages?: boolean;
|
|
734
|
-
/** Pass True
|
|
735
|
+
/** Pass True if the administrator can edit messages of other users and can pin messages, channels only */
|
|
735
736
|
can_edit_messages?: boolean;
|
|
736
|
-
/** Pass True
|
|
737
|
+
/** Pass True if the administrator can delete messages of other users */
|
|
737
738
|
can_delete_messages?: boolean;
|
|
738
|
-
/** Pass True
|
|
739
|
+
/** Pass True if the administrator can manage video chats */
|
|
739
740
|
can_manage_video_chats?: boolean;
|
|
740
|
-
/** Pass True
|
|
741
|
+
/** Pass True if the administrator can restrict, ban or unban chat members */
|
|
741
742
|
can_restrict_members?: boolean;
|
|
742
|
-
/** Pass True
|
|
743
|
+
/** Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him) */
|
|
743
744
|
can_promote_members?: boolean;
|
|
744
|
-
/** Pass True
|
|
745
|
+
/** Pass True if the administrator can change chat title, photo and other settings */
|
|
745
746
|
can_change_info?: boolean;
|
|
746
|
-
/** Pass True
|
|
747
|
+
/** Pass True if the administrator can invite new users to the chat */
|
|
747
748
|
can_invite_users?: boolean;
|
|
748
|
-
/** Pass True
|
|
749
|
+
/** Pass True if the administrator can pin messages, supergroups only */
|
|
749
750
|
can_pin_messages?: boolean;
|
|
750
751
|
}): true;
|
|
751
752
|
|
|
@@ -881,7 +882,7 @@ export interface InputFileProxy<F> {
|
|
|
881
882
|
chat_id: number | string;
|
|
882
883
|
/** Identifier of a message to pin */
|
|
883
884
|
message_id: number;
|
|
884
|
-
/** Pass True
|
|
885
|
+
/** 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. */
|
|
885
886
|
disable_notification?: boolean;
|
|
886
887
|
}): true;
|
|
887
888
|
|
|
@@ -911,7 +912,7 @@ export interface InputFileProxy<F> {
|
|
|
911
912
|
chat_id: number | string;
|
|
912
913
|
}): ChatFromGetChat;
|
|
913
914
|
|
|
914
|
-
/** Use this method to get a list of administrators in a chat
|
|
915
|
+
/** Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects. */
|
|
915
916
|
getChatAdministrators(args: {
|
|
916
917
|
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
|
|
917
918
|
chat_id: number | string;
|
|
@@ -985,7 +986,7 @@ export interface InputFileProxy<F> {
|
|
|
985
986
|
language_code?: string;
|
|
986
987
|
}): true;
|
|
987
988
|
|
|
988
|
-
/** Use this method to get the current list of the bot's commands for the given scope and user language. Returns Array of BotCommand
|
|
989
|
+
/** Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned. */
|
|
989
990
|
getMyCommands(args: {
|
|
990
991
|
/** An object, describing scope of users. Defaults to BotCommandScopeDefault. */
|
|
991
992
|
scope?: BotCommandScope;
|
|
@@ -1129,7 +1130,7 @@ export interface InputFileProxy<F> {
|
|
|
1129
1130
|
protect_content?: boolean;
|
|
1130
1131
|
/** If the message is a reply, ID of the original message */
|
|
1131
1132
|
reply_to_message_id?: number;
|
|
1132
|
-
/** Pass True
|
|
1133
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
1133
1134
|
allow_sending_without_reply?: boolean;
|
|
1134
1135
|
/** 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. */
|
|
1135
1136
|
reply_markup?:
|
|
@@ -1145,6 +1146,12 @@ export interface InputFileProxy<F> {
|
|
|
1145
1146
|
name: string;
|
|
1146
1147
|
}): StickerSet;
|
|
1147
1148
|
|
|
1149
|
+
/** Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects. */
|
|
1150
|
+
getCustomEmojiStickers(args: {
|
|
1151
|
+
/** List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified. */
|
|
1152
|
+
custom_emoji_ids: string[];
|
|
1153
|
+
}): Sticker[];
|
|
1154
|
+
|
|
1148
1155
|
/** Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success. */
|
|
1149
1156
|
uploadStickerFile(args: {
|
|
1150
1157
|
/** User identifier of sticker file owner */
|
|
@@ -1167,10 +1174,10 @@ export interface InputFileProxy<F> {
|
|
|
1167
1174
|
tgs_sticker?: F;
|
|
1168
1175
|
/** WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements */
|
|
1169
1176
|
webm_sticker?: F;
|
|
1177
|
+
/** Type of stickers in the set, pass “regular” or “mask”. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created. */
|
|
1178
|
+
sticker_type?: "regular" | "mask";
|
|
1170
1179
|
/** One or more emoji corresponding to the sticker */
|
|
1171
1180
|
emojis: string;
|
|
1172
|
-
/** Pass True, if a set of mask stickers should be created */
|
|
1173
|
-
contains_masks?: boolean;
|
|
1174
1181
|
/** An object for position where the mask should be placed on faces */
|
|
1175
1182
|
mask_position?: MaskPosition;
|
|
1176
1183
|
}): true;
|
|
@@ -1228,7 +1235,7 @@ export interface InputFileProxy<F> {
|
|
|
1228
1235
|
results: readonly InlineQueryResult[];
|
|
1229
1236
|
/** The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. */
|
|
1230
1237
|
cache_time?: number;
|
|
1231
|
-
/** Pass True
|
|
1238
|
+
/** 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 */
|
|
1232
1239
|
is_personal?: boolean;
|
|
1233
1240
|
/** 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. */
|
|
1234
1241
|
next_offset?: string;
|
|
@@ -1278,19 +1285,19 @@ export interface InputFileProxy<F> {
|
|
|
1278
1285
|
photo_width?: number;
|
|
1279
1286
|
/** Photo height */
|
|
1280
1287
|
photo_height?: number;
|
|
1281
|
-
/** Pass True
|
|
1288
|
+
/** Pass True if you require the user's full name to complete the order */
|
|
1282
1289
|
need_name?: boolean;
|
|
1283
|
-
/** Pass True
|
|
1290
|
+
/** Pass True if you require the user's phone number to complete the order */
|
|
1284
1291
|
need_phone_number?: boolean;
|
|
1285
|
-
/** Pass True
|
|
1292
|
+
/** Pass True if you require the user's email address to complete the order */
|
|
1286
1293
|
need_email?: boolean;
|
|
1287
|
-
/** Pass True
|
|
1294
|
+
/** Pass True if you require the user's shipping address to complete the order */
|
|
1288
1295
|
need_shipping_address?: boolean;
|
|
1289
|
-
/** Pass True
|
|
1296
|
+
/** Pass True if the user's phone number should be sent to provider */
|
|
1290
1297
|
send_phone_number_to_provider?: boolean;
|
|
1291
|
-
/** Pass True
|
|
1298
|
+
/** Pass True if the user's email address should be sent to provider */
|
|
1292
1299
|
send_email_to_provider?: boolean;
|
|
1293
|
-
/** Pass True
|
|
1300
|
+
/** Pass True if the final price depends on the shipping method */
|
|
1294
1301
|
is_flexible?: boolean;
|
|
1295
1302
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1296
1303
|
disable_notification?: boolean;
|
|
@@ -1298,7 +1305,7 @@ export interface InputFileProxy<F> {
|
|
|
1298
1305
|
protect_content?: boolean;
|
|
1299
1306
|
/** If the message is a reply, ID of the original message */
|
|
1300
1307
|
reply_to_message_id?: number;
|
|
1301
|
-
/** Pass True
|
|
1308
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
1302
1309
|
allow_sending_without_reply?: boolean;
|
|
1303
1310
|
/** An object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button. */
|
|
1304
1311
|
reply_markup?: InlineKeyboardMarkup;
|
|
@@ -1332,19 +1339,19 @@ export interface InputFileProxy<F> {
|
|
|
1332
1339
|
photo_width?: number;
|
|
1333
1340
|
/** Photo height */
|
|
1334
1341
|
photo_height?: number;
|
|
1335
|
-
/** Pass True
|
|
1342
|
+
/** Pass True if you require the user's full name to complete the order */
|
|
1336
1343
|
need_name?: boolean;
|
|
1337
|
-
/** Pass True
|
|
1344
|
+
/** Pass True if you require the user's phone number to complete the order */
|
|
1338
1345
|
need_phone_number?: boolean;
|
|
1339
|
-
/** Pass True
|
|
1346
|
+
/** Pass True if you require the user's email address to complete the order */
|
|
1340
1347
|
need_email?: boolean;
|
|
1341
|
-
/** Pass True
|
|
1348
|
+
/** Pass True if you require the user's shipping address to complete the order */
|
|
1342
1349
|
need_shipping_address?: boolean;
|
|
1343
|
-
/** Pass True
|
|
1350
|
+
/** Pass True if the user's phone number should be sent to the provider */
|
|
1344
1351
|
send_phone_number_to_provider?: boolean;
|
|
1345
|
-
/** Pass True
|
|
1352
|
+
/** Pass True if the user's email address should be sent to the provider */
|
|
1346
1353
|
send_email_to_provider?: boolean;
|
|
1347
|
-
/** Pass True
|
|
1354
|
+
/** Pass True if the final price depends on the shipping method */
|
|
1348
1355
|
is_flexible?: boolean;
|
|
1349
1356
|
}): string;
|
|
1350
1357
|
|
|
@@ -1352,7 +1359,7 @@ export interface InputFileProxy<F> {
|
|
|
1352
1359
|
answerShippingQuery(args: {
|
|
1353
1360
|
/** Unique identifier for the query to be answered */
|
|
1354
1361
|
shipping_query_id: string;
|
|
1355
|
-
/**
|
|
1362
|
+
/** Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible) */
|
|
1356
1363
|
ok: boolean;
|
|
1357
1364
|
/** Required if ok is True. An array of available shipping options. */
|
|
1358
1365
|
shipping_options?: readonly ShippingOption[];
|
|
@@ -1392,7 +1399,7 @@ export interface InputFileProxy<F> {
|
|
|
1392
1399
|
protect_content?: boolean;
|
|
1393
1400
|
/** If the message is a reply, ID of the original message */
|
|
1394
1401
|
reply_to_message_id?: number;
|
|
1395
|
-
/** Pass True
|
|
1402
|
+
/** Pass True if the message should be sent even if the specified replied-to message is not found */
|
|
1396
1403
|
allow_sending_without_reply?: boolean;
|
|
1397
1404
|
/** An object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. */
|
|
1398
1405
|
reply_markup?: InlineKeyboardMarkup;
|
|
@@ -1404,9 +1411,9 @@ export interface InputFileProxy<F> {
|
|
|
1404
1411
|
user_id: number;
|
|
1405
1412
|
/** New score, must be non-negative */
|
|
1406
1413
|
score: number;
|
|
1407
|
-
/** Pass True
|
|
1414
|
+
/** Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters */
|
|
1408
1415
|
force?: boolean;
|
|
1409
|
-
/** Pass True
|
|
1416
|
+
/** Pass True if the game message should not be automatically edited to include the current scoreboard */
|
|
1410
1417
|
disable_edit_message?: boolean;
|
|
1411
1418
|
/** Required if inline_message_id is not specified. Unique identifier for the target chat */
|
|
1412
1419
|
chat_id?: number;
|
|
@@ -1416,7 +1423,7 @@ export interface InputFileProxy<F> {
|
|
|
1416
1423
|
inline_message_id?: string;
|
|
1417
1424
|
}): (Update.Edited & Message.GameMessage) | true;
|
|
1418
1425
|
|
|
1419
|
-
/** Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game.
|
|
1426
|
+
/** Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.
|
|
1420
1427
|
|
|
1421
1428
|
This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change. */
|
|
1422
1429
|
getGameHighScores(args: {
|
|
@@ -1478,7 +1485,7 @@ export interface InputFileProxy<F> {
|
|
|
1478
1485
|
height?: number;
|
|
1479
1486
|
/** Video duration in seconds */
|
|
1480
1487
|
duration?: number;
|
|
1481
|
-
/** Pass True
|
|
1488
|
+
/** Pass True if the uploaded video is suitable for streaming */
|
|
1482
1489
|
supports_streaming?: boolean;
|
|
1483
1490
|
};
|
|
1484
1491
|
|