@grammyjs/types 3.6.2 → 3.8.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 +30 -14
- package/manage.d.ts +400 -102
- package/markup.d.ts +14 -14
- package/message.d.ts +148 -29
- package/methods.d.ts +104 -40
- package/package.json +1 -1
- package/payment.d.ts +3 -3
- package/update.d.ts +1 -1
package/methods.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { InlineQueryResult, InlineQueryResultsButton } from "./inline.js";
|
|
2
|
-
import type { BotCommand, BusinessConnection, ChatAdministratorRights,
|
|
2
|
+
import type { BotCommand, BusinessConnection, ChatAdministratorRights, ChatInviteLink, ChatMember, ChatMemberAdministrator, ChatMemberOwner, ChatPermissions, ForumTopic, UserChatBoosts, UserFromGetMe, UserProfilePhotos, WebhookInfo } from "./manage.js";
|
|
3
|
+
import type { ChatFullInfo } from "./manage.js";
|
|
3
4
|
import type { ForceReply, InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove } from "./markup.js";
|
|
4
|
-
import type { File, GameHighScore, LinkPreviewOptions, MaskPosition, Message, MessageEntity, MessageId, ParseMode, Poll, ReactionType, ReplyParameters, SentWebAppMessage, Sticker, StickerSet } from "./message.js";
|
|
5
|
+
import type { File, GameHighScore, InputPollOption, LinkPreviewOptions, MaskPosition, Message, MessageEntity, MessageId, ParseMode, Poll, ReactionType, ReplyParameters, SentWebAppMessage, Sticker, StickerSet } from "./message.js";
|
|
5
6
|
import type { PassportElementError } from "./passport.js";
|
|
6
7
|
import type { LabeledPrice, ShippingOption } from "./payment.js";
|
|
7
8
|
import type { BotCommandScope, BotDescription, BotName, BotShortDescription, MenuButton } from "./settings.js";
|
|
@@ -92,9 +93,11 @@ export type ApiMethods<F> = {
|
|
|
92
93
|
disable_notification?: boolean;
|
|
93
94
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
94
95
|
protect_content?: boolean;
|
|
96
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
97
|
+
message_effect_id?: string;
|
|
95
98
|
/** Description of the message to reply to */
|
|
96
99
|
reply_parameters?: ReplyParameters;
|
|
97
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
100
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
98
101
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
99
102
|
/** @deprecated Use `reply_parameters` instead. */
|
|
100
103
|
reply_to_message_id?: number;
|
|
@@ -145,6 +148,8 @@ export type ApiMethods<F> = {
|
|
|
145
148
|
parse_mode?: string;
|
|
146
149
|
/** A list of special entities that appear in the new caption, which can be specified instead of parse_mode */
|
|
147
150
|
caption_entities?: MessageEntity[];
|
|
151
|
+
/** Pass True, if the caption must be shown above the message media. Ignored if a new caption isn't specified. */
|
|
152
|
+
show_caption_above_media?: boolean;
|
|
148
153
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
149
154
|
disable_notification?: boolean;
|
|
150
155
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
@@ -189,15 +194,19 @@ export type ApiMethods<F> = {
|
|
|
189
194
|
parse_mode?: ParseMode;
|
|
190
195
|
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
191
196
|
caption_entities?: MessageEntity[];
|
|
197
|
+
/** Pass True, if the caption must be shown above the message media */
|
|
198
|
+
show_caption_above_media?: boolean;
|
|
192
199
|
/** Pass True if the photo needs to be covered with a spoiler animation */
|
|
193
200
|
has_spoiler?: boolean;
|
|
194
201
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
195
202
|
disable_notification?: boolean;
|
|
196
203
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
197
204
|
protect_content?: boolean;
|
|
205
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
206
|
+
message_effect_id?: string;
|
|
198
207
|
/** Description of the message to reply to */
|
|
199
208
|
reply_parameters?: ReplyParameters;
|
|
200
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
209
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
201
210
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
202
211
|
/** @deprecated Use `reply_parameters` instead. */
|
|
203
212
|
reply_to_message_id?: number;
|
|
@@ -232,9 +241,11 @@ export type ApiMethods<F> = {
|
|
|
232
241
|
disable_notification?: boolean;
|
|
233
242
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
234
243
|
protect_content?: boolean;
|
|
244
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
245
|
+
message_effect_id?: string;
|
|
235
246
|
/** Description of the message to reply to */
|
|
236
247
|
reply_parameters?: ReplyParameters;
|
|
237
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
248
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
238
249
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
239
250
|
/** @deprecated Use `reply_parameters` instead. */
|
|
240
251
|
reply_to_message_id?: number;
|
|
@@ -263,9 +274,11 @@ export type ApiMethods<F> = {
|
|
|
263
274
|
disable_notification?: boolean;
|
|
264
275
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
265
276
|
protect_content?: boolean;
|
|
277
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
278
|
+
message_effect_id?: string;
|
|
266
279
|
/** Description of the message to reply to */
|
|
267
280
|
reply_parameters?: ReplyParameters;
|
|
268
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
281
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
269
282
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
270
283
|
/** @deprecated Use `reply_parameters` instead. */
|
|
271
284
|
reply_to_message_id?: number;
|
|
@@ -294,6 +307,8 @@ export type ApiMethods<F> = {
|
|
|
294
307
|
parse_mode?: ParseMode;
|
|
295
308
|
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
296
309
|
caption_entities?: MessageEntity[];
|
|
310
|
+
/** Pass True, if the caption must be shown above the message media */
|
|
311
|
+
show_caption_above_media?: boolean;
|
|
297
312
|
/** Pass True if the video needs to be covered with a spoiler animation */
|
|
298
313
|
has_spoiler?: boolean;
|
|
299
314
|
/** Pass True if the uploaded video is suitable for streaming */
|
|
@@ -302,9 +317,11 @@ export type ApiMethods<F> = {
|
|
|
302
317
|
disable_notification?: boolean;
|
|
303
318
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
304
319
|
protect_content?: boolean;
|
|
320
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
321
|
+
message_effect_id?: string;
|
|
305
322
|
/** Description of the message to reply to */
|
|
306
323
|
reply_parameters?: ReplyParameters;
|
|
307
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
324
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
308
325
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
309
326
|
/** @deprecated Use `reply_parameters` instead. */
|
|
310
327
|
reply_to_message_id?: number;
|
|
@@ -333,20 +350,24 @@ export type ApiMethods<F> = {
|
|
|
333
350
|
parse_mode?: ParseMode;
|
|
334
351
|
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
335
352
|
caption_entities?: MessageEntity[];
|
|
353
|
+
/** Pass True, if the caption must be shown above the message media */
|
|
354
|
+
show_caption_above_media?: boolean;
|
|
336
355
|
/** Pass True if the animation needs to be covered with a spoiler animation */
|
|
337
356
|
has_spoiler?: boolean;
|
|
338
357
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
339
358
|
disable_notification?: boolean;
|
|
340
359
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
341
360
|
protect_content?: boolean;
|
|
361
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
362
|
+
message_effect_id?: string;
|
|
342
363
|
/** Description of the message to reply to */
|
|
343
364
|
reply_parameters?: ReplyParameters;
|
|
344
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
365
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
345
366
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
346
367
|
/** @deprecated Use `reply_parameters` instead. */
|
|
347
368
|
reply_to_message_id?: number;
|
|
348
369
|
}): Message.AnimationMessage;
|
|
349
|
-
/** Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. */
|
|
370
|
+
/** Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. */
|
|
350
371
|
sendVoice(args: {
|
|
351
372
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
352
373
|
business_connection_id?: string;
|
|
@@ -368,9 +389,11 @@ export type ApiMethods<F> = {
|
|
|
368
389
|
disable_notification?: boolean;
|
|
369
390
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
370
391
|
protect_content?: boolean;
|
|
392
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
393
|
+
message_effect_id?: string;
|
|
371
394
|
/** Description of the message to reply to */
|
|
372
395
|
reply_parameters?: ReplyParameters;
|
|
373
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
396
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
374
397
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
375
398
|
/** @deprecated Use `reply_parameters` instead. */
|
|
376
399
|
reply_to_message_id?: number;
|
|
@@ -396,9 +419,11 @@ export type ApiMethods<F> = {
|
|
|
396
419
|
disable_notification?: boolean;
|
|
397
420
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
398
421
|
protect_content?: boolean;
|
|
422
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
423
|
+
message_effect_id?: string;
|
|
399
424
|
/** Description of the message to reply to */
|
|
400
425
|
reply_parameters?: ReplyParameters;
|
|
401
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
426
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
402
427
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
403
428
|
/** @deprecated Use `reply_parameters` instead. */
|
|
404
429
|
reply_to_message_id?: number;
|
|
@@ -417,6 +442,8 @@ export type ApiMethods<F> = {
|
|
|
417
442
|
disable_notification?: boolean;
|
|
418
443
|
/** Protects the contents of the sent messages from forwarding and saving */
|
|
419
444
|
protect_content?: boolean;
|
|
445
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
446
|
+
message_effect_id?: string;
|
|
420
447
|
/** Description of the message to reply to */
|
|
421
448
|
reply_parameters?: ReplyParameters;
|
|
422
449
|
/** @deprecated Use `reply_parameters` instead. */
|
|
@@ -436,7 +463,7 @@ export type ApiMethods<F> = {
|
|
|
436
463
|
longitude: number;
|
|
437
464
|
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
438
465
|
horizontal_accuracy?: number;
|
|
439
|
-
/** Period in seconds
|
|
466
|
+
/** Period in seconds during which the location will be updated (see Live Locations, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. */
|
|
440
467
|
live_period?: number;
|
|
441
468
|
/** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
|
|
442
469
|
heading?: number;
|
|
@@ -446,9 +473,11 @@ export type ApiMethods<F> = {
|
|
|
446
473
|
disable_notification?: boolean;
|
|
447
474
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
448
475
|
protect_content?: boolean;
|
|
476
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
477
|
+
message_effect_id?: string;
|
|
449
478
|
/** Description of the message to reply to */
|
|
450
479
|
reply_parameters?: ReplyParameters;
|
|
451
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
480
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
452
481
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
453
482
|
/** @deprecated Use `reply_parameters` instead. */
|
|
454
483
|
reply_to_message_id?: number;
|
|
@@ -465,6 +494,8 @@ export type ApiMethods<F> = {
|
|
|
465
494
|
latitude: number;
|
|
466
495
|
/** Longitude of new location */
|
|
467
496
|
longitude: number;
|
|
497
|
+
/** New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged */
|
|
498
|
+
live_period?: number;
|
|
468
499
|
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
469
500
|
horizontal_accuracy?: number;
|
|
470
501
|
/** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
|
|
@@ -513,9 +544,11 @@ export type ApiMethods<F> = {
|
|
|
513
544
|
disable_notification?: boolean;
|
|
514
545
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
515
546
|
protect_content?: boolean;
|
|
547
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
548
|
+
message_effect_id?: string;
|
|
516
549
|
/** Description of the message to reply to */
|
|
517
550
|
reply_parameters?: ReplyParameters;
|
|
518
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
551
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
519
552
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
520
553
|
/** @deprecated Use `reply_parameters` instead. */
|
|
521
554
|
reply_to_message_id?: number;
|
|
@@ -540,9 +573,11 @@ export type ApiMethods<F> = {
|
|
|
540
573
|
disable_notification?: boolean;
|
|
541
574
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
542
575
|
protect_content?: boolean;
|
|
576
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
577
|
+
message_effect_id?: string;
|
|
543
578
|
/** Description of the message to reply to */
|
|
544
579
|
reply_parameters?: ReplyParameters;
|
|
545
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a keyboard or to force a reply from the user.
|
|
580
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
546
581
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
547
582
|
/** @deprecated Use `reply_parameters` instead. */
|
|
548
583
|
reply_to_message_id?: number;
|
|
@@ -557,8 +592,12 @@ export type ApiMethods<F> = {
|
|
|
557
592
|
message_thread_id?: number;
|
|
558
593
|
/** Poll question, 1-300 characters */
|
|
559
594
|
question: string;
|
|
560
|
-
/**
|
|
561
|
-
|
|
595
|
+
/** Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed */
|
|
596
|
+
question_parse_mode?: string;
|
|
597
|
+
/** A list of special entities that appear in the poll question. It can be specified instead of question_parse_mode */
|
|
598
|
+
question_entities?: MessageEntity[];
|
|
599
|
+
/** A list of 2-10 answer options */
|
|
600
|
+
options: InputPollOption[];
|
|
562
601
|
/** True, if the poll needs to be anonymous, defaults to True */
|
|
563
602
|
is_anonymous?: boolean;
|
|
564
603
|
/** Poll type, “quiz” or “regular”, defaults to “regular” */
|
|
@@ -571,7 +610,7 @@ export type ApiMethods<F> = {
|
|
|
571
610
|
explanation?: string;
|
|
572
611
|
/** Mode for parsing entities in the explanation. See formatting options for more details. */
|
|
573
612
|
explanation_parse_mode?: ParseMode;
|
|
574
|
-
/** A list of special entities that appear in the poll explanation
|
|
613
|
+
/** A list of special entities that appear in the poll explanation. It can be specified instead of explanation_parse_mode */
|
|
575
614
|
explanation_entities?: MessageEntity[];
|
|
576
615
|
/** Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date. */
|
|
577
616
|
open_period?: number;
|
|
@@ -583,9 +622,11 @@ export type ApiMethods<F> = {
|
|
|
583
622
|
disable_notification?: boolean;
|
|
584
623
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
585
624
|
protect_content?: boolean;
|
|
625
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
626
|
+
message_effect_id?: string;
|
|
586
627
|
/** Description of the message to reply to */
|
|
587
628
|
reply_parameters?: ReplyParameters;
|
|
588
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
629
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
589
630
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
590
631
|
/** @deprecated Use `reply_parameters` instead. */
|
|
591
632
|
reply_to_message_id?: number;
|
|
@@ -604,9 +645,11 @@ export type ApiMethods<F> = {
|
|
|
604
645
|
disable_notification?: boolean;
|
|
605
646
|
/** Protects the contents of the sent message from forwarding */
|
|
606
647
|
protect_content?: boolean;
|
|
648
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
649
|
+
message_effect_id?: string;
|
|
607
650
|
/** Description of the message to reply to */
|
|
608
651
|
reply_parameters?: ReplyParameters;
|
|
609
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
652
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
610
653
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
611
654
|
/** @deprecated Use `reply_parameters` instead. */
|
|
612
655
|
reply_to_message_id?: number;
|
|
@@ -713,7 +756,7 @@ export type ApiMethods<F> = {
|
|
|
713
756
|
can_invite_users?: boolean;
|
|
714
757
|
/** True if the administrator can post stories to the chat */
|
|
715
758
|
can_post_stories?: boolean;
|
|
716
|
-
/** True if the administrator can edit stories posted by other users */
|
|
759
|
+
/** Pass True if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
|
|
717
760
|
can_edit_stories?: boolean;
|
|
718
761
|
/** True if the administrator can delete stories posted by other users */
|
|
719
762
|
can_delete_stories?: boolean;
|
|
@@ -866,11 +909,11 @@ export type ApiMethods<F> = {
|
|
|
866
909
|
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
|
|
867
910
|
chat_id: number | string;
|
|
868
911
|
}): true;
|
|
869
|
-
/** Use this method to get up
|
|
912
|
+
/** Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success. */
|
|
870
913
|
getChat(args: {
|
|
871
914
|
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
|
|
872
915
|
chat_id: number | string;
|
|
873
|
-
}):
|
|
916
|
+
}): ChatFullInfo;
|
|
874
917
|
/** Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects. */
|
|
875
918
|
getChatAdministrators(args: {
|
|
876
919
|
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
|
|
@@ -1016,7 +1059,7 @@ export type ApiMethods<F> = {
|
|
|
1016
1059
|
/** Unique identifier of the business connection */
|
|
1017
1060
|
business_connection_id: string;
|
|
1018
1061
|
}): BusinessConnection;
|
|
1019
|
-
/** Use this method to change the list of the bot's commands. See https://core.telegram.org/bots#commands for more details about bot commands. Returns True on success. */
|
|
1062
|
+
/** Use this method to change the list of the bot's commands. See https://core.telegram.org/bots/features#commands for more details about bot commands. Returns True on success. */
|
|
1020
1063
|
setMyCommands(args: {
|
|
1021
1064
|
/** A list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. */
|
|
1022
1065
|
commands: readonly BotCommand[];
|
|
@@ -1132,6 +1175,8 @@ export type ApiMethods<F> = {
|
|
|
1132
1175
|
parse_mode?: ParseMode;
|
|
1133
1176
|
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1134
1177
|
caption_entities?: MessageEntity[];
|
|
1178
|
+
/** Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages. */
|
|
1179
|
+
show_caption_above_media?: boolean;
|
|
1135
1180
|
/** An object for an inline keyboard. */
|
|
1136
1181
|
reply_markup?: InlineKeyboardMarkup;
|
|
1137
1182
|
}): (Update.Edited & Message.CaptionableMessage) | true;
|
|
@@ -1207,9 +1252,11 @@ export type ApiMethods<F> = {
|
|
|
1207
1252
|
disable_notification?: boolean;
|
|
1208
1253
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
1209
1254
|
protect_content?: boolean;
|
|
1255
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
1256
|
+
message_effect_id?: string;
|
|
1210
1257
|
/** Description of the message to reply to */
|
|
1211
1258
|
reply_parameters?: ReplyParameters;
|
|
1212
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
1259
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
1213
1260
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1214
1261
|
/** @deprecated Use `reply_parameters` instead. */
|
|
1215
1262
|
reply_to_message_id?: number;
|
|
@@ -1368,13 +1415,13 @@ export type ApiMethods<F> = {
|
|
|
1368
1415
|
description: string;
|
|
1369
1416
|
/** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. */
|
|
1370
1417
|
payload: string;
|
|
1371
|
-
/** Payment provider token, obtained via
|
|
1372
|
-
provider_token
|
|
1373
|
-
/** Three-letter ISO 4217 currency code, see more on currencies */
|
|
1418
|
+
/** Payment provider token, obtained via BotFather. Pass an empty string for payments in Telegram Stars. */
|
|
1419
|
+
provider_token?: string;
|
|
1420
|
+
/** Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars. */
|
|
1374
1421
|
currency: string;
|
|
1375
|
-
/** Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) */
|
|
1422
|
+
/** Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars. */
|
|
1376
1423
|
prices: readonly LabeledPrice[];
|
|
1377
|
-
/** The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 */
|
|
1424
|
+
/** The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars. */
|
|
1378
1425
|
max_tip_amount?: number;
|
|
1379
1426
|
/** An array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount. */
|
|
1380
1427
|
suggested_tip_amounts?: number[];
|
|
@@ -1390,24 +1437,26 @@ export type ApiMethods<F> = {
|
|
|
1390
1437
|
photo_width?: number;
|
|
1391
1438
|
/** Photo height */
|
|
1392
1439
|
photo_height?: number;
|
|
1393
|
-
/** Pass True if you require the user's full name to complete the order */
|
|
1440
|
+
/** Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars. */
|
|
1394
1441
|
need_name?: boolean;
|
|
1395
|
-
/** Pass True if you require the user's phone number to complete the order */
|
|
1442
|
+
/** Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars. */
|
|
1396
1443
|
need_phone_number?: boolean;
|
|
1397
|
-
/** Pass True if you require the user's email address to complete the order */
|
|
1444
|
+
/** Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars. */
|
|
1398
1445
|
need_email?: boolean;
|
|
1399
|
-
/** Pass True if you require the user's shipping address to complete the order */
|
|
1446
|
+
/** Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars. */
|
|
1400
1447
|
need_shipping_address?: boolean;
|
|
1401
|
-
/** Pass True if the user's phone number should be sent to provider */
|
|
1448
|
+
/** Pass True if the user's phone number should be sent to provider. Ignored for payments in Telegram Stars. */
|
|
1402
1449
|
send_phone_number_to_provider?: boolean;
|
|
1403
|
-
/** Pass True if the user's email address should be sent to provider */
|
|
1450
|
+
/** Pass True if the user's email address should be sent to provider. Ignored for payments in Telegram Stars. */
|
|
1404
1451
|
send_email_to_provider?: boolean;
|
|
1405
|
-
/** Pass True if the final price depends on the shipping method */
|
|
1452
|
+
/** Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars. */
|
|
1406
1453
|
is_flexible?: boolean;
|
|
1407
1454
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1408
1455
|
disable_notification?: boolean;
|
|
1409
1456
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
1410
1457
|
protect_content?: boolean;
|
|
1458
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
1459
|
+
message_effect_id?: string;
|
|
1411
1460
|
/** Description of the message to reply to */
|
|
1412
1461
|
reply_parameters?: ReplyParameters;
|
|
1413
1462
|
/** 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. */
|
|
@@ -1423,8 +1472,8 @@ export type ApiMethods<F> = {
|
|
|
1423
1472
|
description: string;
|
|
1424
1473
|
/** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. */
|
|
1425
1474
|
payload: string;
|
|
1426
|
-
/** Payment provider token, obtained via BotFather */
|
|
1427
|
-
provider_token
|
|
1475
|
+
/** Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. */
|
|
1476
|
+
provider_token?: string;
|
|
1428
1477
|
/** Three-letter ISO 4217 currency code, see more on currencies */
|
|
1429
1478
|
currency: string;
|
|
1430
1479
|
/** Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) */
|
|
@@ -1478,6 +1527,13 @@ export type ApiMethods<F> = {
|
|
|
1478
1527
|
/** Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. */
|
|
1479
1528
|
error_message?: string;
|
|
1480
1529
|
}): true;
|
|
1530
|
+
/** Refunds a successful payment in Telegram Stars. Returns True on success. */
|
|
1531
|
+
refundStarPayment(args: {
|
|
1532
|
+
/** Identifier of the user whose payment will be refunded */
|
|
1533
|
+
user_id: number;
|
|
1534
|
+
/** Telegram payment identifier */
|
|
1535
|
+
telegram_payment_charge_id: string;
|
|
1536
|
+
}): true;
|
|
1481
1537
|
/** 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.
|
|
1482
1538
|
|
|
1483
1539
|
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. */
|
|
@@ -1501,9 +1557,11 @@ export type ApiMethods<F> = {
|
|
|
1501
1557
|
disable_notification?: boolean;
|
|
1502
1558
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
1503
1559
|
protect_content?: boolean;
|
|
1560
|
+
/** Unique identifier of the message effect to be added to the message */
|
|
1561
|
+
message_effect_id?: string;
|
|
1504
1562
|
/** Description of the message to reply to */
|
|
1505
1563
|
reply_parameters?: ReplyParameters;
|
|
1506
|
-
/** 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.
|
|
1564
|
+
/** 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. */
|
|
1507
1565
|
reply_markup?: InlineKeyboardMarkup;
|
|
1508
1566
|
/** @deprecated Use `reply_parameters` instead. */
|
|
1509
1567
|
reply_to_message_id?: number;
|
|
@@ -1567,6 +1625,8 @@ export interface InputMediaPhoto<F> {
|
|
|
1567
1625
|
media: F | string;
|
|
1568
1626
|
/** Caption of the photo to be sent, 0-1024 characters after entities parsing */
|
|
1569
1627
|
caption?: string;
|
|
1628
|
+
/** Pass True, if the caption must be shown above the message media */
|
|
1629
|
+
show_caption_above_media?: boolean;
|
|
1570
1630
|
/** Mode for parsing entities in the photo caption. See formatting options for more details. */
|
|
1571
1631
|
parse_mode?: ParseMode;
|
|
1572
1632
|
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
@@ -1584,6 +1644,8 @@ export interface InputMediaVideo<F> {
|
|
|
1584
1644
|
thumbnail?: F;
|
|
1585
1645
|
/** Caption of the video to be sent, 0-1024 characters after entities parsing */
|
|
1586
1646
|
caption?: string;
|
|
1647
|
+
/** Pass True, if the caption must be shown above the message media */
|
|
1648
|
+
show_caption_above_media?: boolean;
|
|
1587
1649
|
/** Mode for parsing entities in the video caption. See formatting options for more details. */
|
|
1588
1650
|
parse_mode?: ParseMode;
|
|
1589
1651
|
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
@@ -1609,6 +1671,8 @@ export interface InputMediaAnimation<F> {
|
|
|
1609
1671
|
thumbnail?: F;
|
|
1610
1672
|
/** Caption of the animation to be sent, 0-1024 characters after entities parsing */
|
|
1611
1673
|
caption?: string;
|
|
1674
|
+
/** Pass True, if the caption must be shown above the message media */
|
|
1675
|
+
show_caption_above_media?: boolean;
|
|
1612
1676
|
/** Mode for parsing entities in the animation caption. See formatting options for more details. */
|
|
1613
1677
|
parse_mode?: ParseMode;
|
|
1614
1678
|
/** List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
package/package.json
CHANGED
package/payment.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface Invoice {
|
|
|
14
14
|
description: string;
|
|
15
15
|
/** Unique bot deep-linking parameter that can be used to generate this invoice */
|
|
16
16
|
start_parameter: string;
|
|
17
|
-
/** Three-letter ISO 4217 currency code */
|
|
17
|
+
/** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars */
|
|
18
18
|
currency: string;
|
|
19
19
|
/** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */
|
|
20
20
|
total_amount: number;
|
|
@@ -56,7 +56,7 @@ export interface ShippingOption {
|
|
|
56
56
|
}
|
|
57
57
|
/** This object contains basic information about a successful payment. */
|
|
58
58
|
export interface SuccessfulPayment {
|
|
59
|
-
/** Three-letter ISO 4217 currency code */
|
|
59
|
+
/** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars */
|
|
60
60
|
currency: string;
|
|
61
61
|
/** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */
|
|
62
62
|
total_amount: number;
|
|
@@ -88,7 +88,7 @@ export interface PreCheckoutQuery {
|
|
|
88
88
|
id: string;
|
|
89
89
|
/** User who sent the query */
|
|
90
90
|
from: User;
|
|
91
|
-
/** Three-letter ISO 4217 currency code */
|
|
91
|
+
/** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars */
|
|
92
92
|
currency: string;
|
|
93
93
|
/** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */
|
|
94
94
|
total_amount: number;
|
package/update.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export interface Update {
|
|
|
39
39
|
edited_channel_post?: Message & Update.Edited & Update.Channel;
|
|
40
40
|
/** The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot */
|
|
41
41
|
business_connection?: BusinessConnection;
|
|
42
|
-
/** New
|
|
42
|
+
/** New message from a connected business account */
|
|
43
43
|
business_message?: Message & Update.Private;
|
|
44
44
|
/** New version of a message from a connected business account */
|
|
45
45
|
edited_business_message?: Message & Update.Edited & Update.Private;
|