@mtkruto/node 0.1.105 → 0.1.107

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.
Files changed (85) hide show
  1. package/esm/4_constants.d.ts +2 -2
  2. package/esm/4_constants.js +2 -2
  3. package/esm/client/3_types.d.ts +17 -12
  4. package/esm/client/4_client.d.ts +70 -15
  5. package/esm/client/4_client.js +73 -27
  6. package/esm/tl/2_types.d.ts +231 -55
  7. package/esm/tl/2_types.js +782 -150
  8. package/esm/tl/3_functions.d.ts +159 -53
  9. package/esm/tl/3_functions.js +488 -147
  10. package/esm/types/0_audio.d.ts +9 -9
  11. package/esm/types/0_bot_command.d.ts +2 -0
  12. package/esm/types/0_chat_action.d.ts +1 -0
  13. package/esm/types/0_chat_administrator_rights.d.ts +13 -13
  14. package/esm/types/0_chat_photo.d.ts +7 -6
  15. package/esm/types/0_chat_photo.js +1 -1
  16. package/esm/types/0_contact.d.ts +6 -6
  17. package/esm/types/0_dice.d.ts +3 -3
  18. package/esm/types/0_force_reply.d.ts +4 -4
  19. package/esm/types/0_input_contact_message_content.d.ts +5 -0
  20. package/esm/types/0_input_location_message_content.d.ts +7 -0
  21. package/esm/types/0_input_venue_message_content.d.ts +10 -1
  22. package/esm/types/0_keyboard_button_poll_type.d.ts +3 -3
  23. package/esm/types/0_location.d.ts +7 -7
  24. package/esm/types/0_login_url.d.ts +4 -5
  25. package/esm/types/0_mask_position.d.ts +0 -1
  26. package/esm/types/0_message_entity.d.ts +5 -5
  27. package/esm/types/0_parse_mode.d.ts +1 -0
  28. package/esm/types/0_poll_option.d.ts +2 -2
  29. package/esm/types/0_reply_keyboard_remove.d.ts +3 -3
  30. package/esm/types/0_thumbnail.d.ts +6 -6
  31. package/esm/types/0_venue.d.ts +6 -6
  32. package/esm/types/0_voice.d.ts +6 -6
  33. package/esm/types/0_web_app_info.d.ts +1 -2
  34. package/esm/types/1_animation.d.ts +9 -9
  35. package/esm/types/1_chat.d.ts +29 -34
  36. package/esm/types/1_document.d.ts +6 -7
  37. package/esm/types/1_keyboard_button.d.ts +1 -1
  38. package/esm/types/1_photo.d.ts +3 -3
  39. package/esm/types/1_sticker.d.ts +2 -2
  40. package/esm/types/1_user.d.ts +2 -1
  41. package/esm/types/1_video.d.ts +4 -4
  42. package/esm/types/1_video_note.d.ts +3 -3
  43. package/package.json +1 -1
  44. package/script/4_constants.d.ts +2 -2
  45. package/script/4_constants.js +2 -2
  46. package/script/client/3_types.d.ts +17 -12
  47. package/script/client/4_client.d.ts +70 -15
  48. package/script/client/4_client.js +85 -39
  49. package/script/tl/2_types.d.ts +231 -55
  50. package/script/tl/2_types.js +824 -179
  51. package/script/tl/3_functions.d.ts +159 -53
  52. package/script/tl/3_functions.js +510 -159
  53. package/script/types/0_audio.d.ts +9 -9
  54. package/script/types/0_bot_command.d.ts +2 -0
  55. package/script/types/0_chat_action.d.ts +1 -0
  56. package/script/types/0_chat_administrator_rights.d.ts +13 -13
  57. package/script/types/0_chat_photo.d.ts +7 -6
  58. package/script/types/0_chat_photo.js +1 -1
  59. package/script/types/0_contact.d.ts +6 -6
  60. package/script/types/0_dice.d.ts +3 -3
  61. package/script/types/0_force_reply.d.ts +4 -4
  62. package/script/types/0_input_contact_message_content.d.ts +5 -0
  63. package/script/types/0_input_location_message_content.d.ts +7 -0
  64. package/script/types/0_input_venue_message_content.d.ts +10 -1
  65. package/script/types/0_keyboard_button_poll_type.d.ts +3 -3
  66. package/script/types/0_location.d.ts +7 -7
  67. package/script/types/0_login_url.d.ts +4 -5
  68. package/script/types/0_mask_position.d.ts +0 -1
  69. package/script/types/0_message_entity.d.ts +5 -5
  70. package/script/types/0_parse_mode.d.ts +1 -0
  71. package/script/types/0_poll_option.d.ts +2 -2
  72. package/script/types/0_reply_keyboard_remove.d.ts +3 -3
  73. package/script/types/0_thumbnail.d.ts +6 -6
  74. package/script/types/0_venue.d.ts +6 -6
  75. package/script/types/0_voice.d.ts +6 -6
  76. package/script/types/0_web_app_info.d.ts +1 -2
  77. package/script/types/1_animation.d.ts +9 -9
  78. package/script/types/1_chat.d.ts +29 -34
  79. package/script/types/1_document.d.ts +6 -7
  80. package/script/types/1_keyboard_button.d.ts +1 -1
  81. package/script/types/1_photo.d.ts +3 -3
  82. package/script/types/1_sticker.d.ts +2 -2
  83. package/script/types/1_user.d.ts +2 -1
  84. package/script/types/1_video.d.ts +4 -4
  85. package/script/types/1_video_note.d.ts +3 -3
@@ -1,22 +1,22 @@
1
1
  import { types } from "../2_tl.js";
2
2
  import { Thumbnail } from "./0_thumbnail.js";
3
- /** This object represents an audio file to be treated as music by the Telegram clients. */
3
+ /** An audio file. */
4
4
  export interface Audio {
5
- /** Identifier for this file, which can be used to download or reuse the file */
5
+ /** A file identifier that can be used to download or reuse this file. */
6
6
  fileId: string;
7
- /** Unique identifier for this file, which is supposed to be the same over time and for different users and bots. Can't be used to download or reuse the file. */
7
+ /** A file identifier that can be used to identify this file. */
8
8
  fileUniqueId: string;
9
- /** Duration of the audio in seconds as defined by sender */
9
+ /** Duration of the audio in seconds. */
10
10
  duration: number;
11
- /** Performer of the audio as defined by sender or by audio tags */
11
+ /** Authors of the audio. */
12
12
  performer?: string;
13
- /** Title of the audio as defined by sender or by audio tags */
13
+ /** Title of the audio. */
14
14
  title?: string;
15
- /** MIME type of the file as defined by sender */
15
+ /** MIME type of the file. */
16
16
  mimeType: string;
17
- /** File size in bytes */
17
+ /** Size of the file in bytes. */
18
18
  fileSize: number;
19
- /** Thumbnail of the album cover to which the music file belongs */
19
+ /** Thumbnails of the album cover to which the music file belongs. */
20
20
  thumbnails: Thumbnail[];
21
21
  }
22
22
  export declare function constructAudio(document: types.Document, audioAttribute: types.DocumentAttributeAudio | undefined, fileId: string, fileUniqueId: string): Audio;
@@ -1,4 +1,6 @@
1
1
  export interface BotCommand {
2
+ /** The command's name. */
2
3
  command: string;
4
+ /** The command's description. */
3
5
  description: string;
4
6
  }
@@ -1 +1,2 @@
1
+ /** A sign of a possible action by a member of a conversation. */
1
2
  export type ChatAction = "type" | "uploadPhoto" | "recordVideo" | "uploadVideo" | "recordVoice" | "uploadAudio" | "uploadDocument" | "chooseSticker" | "findLocation" | "recordVideoNote" | "uploadVideoNote";
@@ -1,29 +1,29 @@
1
1
  import { types } from "../2_tl.js";
2
- /** Represents the rights of an administrator in a chat. */
2
+ /** The rights of a chat administrator. */
3
3
  export interface ChatAdministratorRights {
4
- /** True, if the user's presence in the chat is hidden */
4
+ /** Whether the admininistrator's presence in the chat is hidden. */
5
5
  isAnonymous: boolean;
6
- /** 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 */
6
+ /** Whether the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and surpass slow mode. */
7
7
  canManageChat: boolean;
8
- /** True, if the administrator can delete messages of other users */
8
+ /** Whether the administrator can delete messages of other users. */
9
9
  canDeleteMessages: boolean;
10
- /** True, if the administrator can manage video chats */
10
+ /** Whether the administrator can manage video chats. */
11
11
  canManageVideoChats: boolean;
12
- /** True, if the administrator can restrict, ban or unban chat members */
12
+ /** Whether the administrator can restrict, ban or unban chat members. */
13
13
  canRestrictMembers: boolean;
14
- /** True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user) */
14
+ /** Whether the administrator can promote regular members to admininistrators. */
15
15
  canPromoteMembers: boolean;
16
- /** True, if the user is allowed to change the chat title, photo and other settings */
16
+ /** Whether the administrator can change the name of the chat, its photo, description and some other settings. */
17
17
  canChangeInfo: boolean;
18
- /** True, if the user is allowed to invite new users to the chat */
18
+ /** Whether the administrator can invite users to the chat. */
19
19
  canInviteUsers: boolean;
20
- /** True, if the administrator can post in the channel; channels only */
20
+ /** Whether the administrator can make posts in the channel. Only available for channels. */
21
21
  canPostMessages?: boolean;
22
- /** True, if the administrator can edit messages of other users and can pin messages; channels only */
22
+ /** Whether the administrator can pin posts and edit posts they didn't send. Only available for channels. */
23
23
  canEditMessages?: boolean;
24
- /** True, if the user is allowed to pin messages; groups and supergroups only */
24
+ /** Whether the administrator can pin messages. Only available for groups and supergroups. */
25
25
  canPinMessages?: boolean;
26
- /** True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */
26
+ /** Whether the administrator can manage topics. Only available for supergroups. */
27
27
  canManageTopics?: boolean;
28
28
  }
29
29
  export declare function constructChatAdministratorRights(rights_: types.ChatAdminRights): ChatAdministratorRights;
@@ -1,19 +1,20 @@
1
1
  import { types } from "../2_tl.js";
2
2
  export declare namespace ChatPhoto {
3
3
  interface Base {
4
- /** File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed. */
4
+ /** A file identifier that can be used to download or reuse the small version of the chat photo (160x160). */
5
5
  smallFileId: string;
6
- /** Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different users and bots. Can't be used to download or reuse the file. */
6
+ /** A file identifier that can be used to identify the small version of the chat photo (160x160). */
7
7
  smallFileUniqueId: string;
8
- /** File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed. */
8
+ /** A file identifier that can be used to download or reuse the big version of the chat photo (640x640). */
9
9
  bigFileId: string;
10
- /** Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different users and bots. Can't be used to download or reuse the file. */
10
+ /** A file identifier that can be used to identify the big version of the chat photo (640x640). */
11
11
  bigFileUniqueId: string;
12
- /** True, if an [animated profile picture](https://core.telegram.org/api/files#animated-profile-pictures) is available for the user */
12
+ /** Whether the chat photo is animated. */
13
13
  hasVideo: boolean;
14
14
  }
15
15
  interface User extends Base {
16
- personal: boolean;
16
+ /** Differentiates between user profile photos. */
17
+ personal: true;
17
18
  }
18
19
  type Chat = Base;
19
20
  }
@@ -35,7 +35,7 @@ function constructChatPhoto(photo, chatId, chatAccessHash) {
35
35
  }
36
36
  else {
37
37
  return {
38
- personal: photo.personal || false,
38
+ personal: photo.personal ? true : undefined,
39
39
  smallFileId,
40
40
  smallFileUniqueId,
41
41
  bigFileId,
@@ -1,15 +1,15 @@
1
1
  import { types } from "../2_tl.js";
2
- /** This object represents a phone contact. */
2
+ /** A shared contact. */
3
3
  export interface Contact {
4
- /** Contact's phone number */
4
+ /** The contact's phone number. */
5
5
  phoneNumber: string;
6
- /** Contact's first name */
6
+ /** The contact's first name. */
7
7
  firstName: string;
8
- /** Contact's last name */
8
+ /** The contact's last name. */
9
9
  lastName?: string;
10
- /** Contact's user identifier in Telegram */
10
+ /** The contact's Telegram identifier. */
11
11
  userId?: number;
12
- /** Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard) */
12
+ /** Additional information in the vCard format. */
13
13
  vcard?: string;
14
14
  }
15
15
  export declare function constructContact(contact: types.MessageMediaContact): Contact;
@@ -1,9 +1,9 @@
1
1
  import { types } from "../2_tl.js";
2
- /** This object represents an animated emoji that displays a random value. */
2
+ /** A rolled dice. */
3
3
  export interface Dice {
4
- /** Emoji on which the dice throw animation is based */
4
+ /** The emoji on which the dice is based on. */
5
5
  emoji: string;
6
- /** Value of the dice, 1-6 for "🎲", "🎯" and "🎳" base emoji, 1-5 for "🏀" and "⚽" base emoji, 1-64 for "🎰" base emoji */
6
+ /** The result of the roll, which is in the range of 1-6 for the emojis "🎲", "🎯" and "🎳", 1-5 for the emojis "🏀" and "⚽", and 1-64 for emoji "🎰". */
7
7
  value: number;
8
8
  }
9
9
  export declare function constructDice(dice_: types.MessageMediaDice): Dice;
@@ -1,11 +1,11 @@
1
1
  import { types } from "../2_tl.js";
2
- /** Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. */
2
+ /** Forces the user's client to select the message as the one that is to be replied. */
3
3
  export interface ForceReply {
4
- /** Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply' */
4
+ /** Differentiate from other reply markup types. */
5
5
  forceReply: true;
6
- /** Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply' */
6
+ /** A placeholder to be shown in the client's message box. */
7
7
  inputFieldPlaceholder?: string;
8
- /** Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. */
8
+ /** Whether to only affect specific users. If true, only users that were mentioned will be affected along with the author of the replied message if any. */
9
9
  selective?: boolean;
10
10
  }
11
11
  export declare function constructForceReply(replyMarkup_: types.ReplyKeyboardForceReply): ForceReply;
@@ -1,6 +1,11 @@
1
+ /** A message content that shares a contact. */
1
2
  export interface InputContactMessageContent {
3
+ /** The contact's phone number. */
2
4
  phoneNumber: string;
5
+ /** The contact's first name. */
3
6
  firstName: string;
7
+ /** The contact's last name. */
4
8
  lastName?: string;
9
+ /** Additional information in the vCard format. */
5
10
  vcard?: string;
6
11
  }
@@ -1,8 +1,15 @@
1
+ /** A message content that shares a location. */
1
2
  export interface InputLocationMessageContent {
3
+ /** The latitude of the location. */
2
4
  latitude: number;
5
+ /** The longitude of the location. */
3
6
  longitude: number;
7
+ /** The accuracy radius of the location in meters. Must be in the range of 0-1500. */
4
8
  horizontalAccuracy?: number;
9
+ /** The duration in which the location can be updated in seconds. Must be in the range of 80-864,000. */
5
10
  livePeriod?: number;
11
+ /** The direction which the user is moving towards. Must be in the range of 1-350. */
6
12
  heading?: number;
13
+ /** The maximum distance for proximity alerts on approaching another chat member in meters. Must be in the range 1-100,000. */
7
14
  proximityAlertRadius?: number;
8
15
  }
@@ -1,10 +1,19 @@
1
+ /** A message content that shares a venue. */
1
2
  export interface InputVenuMessageContent {
3
+ /** The latitude of the venue. */
2
4
  latitude: number;
3
- loingitude: number;
5
+ /** The longitude of the venue. */
6
+ longitude: number;
7
+ /** The name of the venue. */
4
8
  title: string;
9
+ /** The address of the venue. */
5
10
  address: string;
11
+ /** The Foursquare identifier of the venue. */
6
12
  foursquareId?: string;
13
+ /** The Foursquare type of the venue. */
7
14
  foursquareType?: string;
15
+ /** The Google Places identifier of the venue. */
8
16
  googlePlaceId?: string;
17
+ /** The Google Places type of the venue. */
9
18
  googlePlaceType?: string;
10
19
  }
@@ -1,5 +1,5 @@
1
- /** This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. */
1
+ /** A keyboard button representing the type of the poll that is requested to be created. */
2
2
  export interface KeyboardButtonPollType {
3
- /** If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type. */
4
- type?: string;
3
+ /** If a type is not specified, the user will be allowed to choose either type. */
4
+ type?: "regular" | "quiz";
5
5
  }
@@ -1,17 +1,17 @@
1
1
  import { types } from "../2_tl.js";
2
- /** This object represents a point on the map. */
2
+ /** A shared location. */
3
3
  export interface Location {
4
- /** Latitude as defined by sender */
4
+ /** The latitude of the location. */
5
5
  latitude: number;
6
- /** Longitude as defined by sender */
6
+ /** The longitude of the location. */
7
7
  longitude: number;
8
- /** The radius of uncertainty for the location, measured in meters; 0-1500 */
8
+ /** The accuracy radius of the location in meters. Must be in the range of 0-1500. */
9
9
  horizontalAccuracy?: number;
10
- /** Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only. */
10
+ /** The duration in which the location can be updated in seconds. Must be in the range of 80-864,000. */
11
11
  livePeriod?: number;
12
- /** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
12
+ /** The direction which the user is moving towards. Must be in the range of 1-350. */
13
13
  heading?: number;
14
- /** The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. */
14
+ /** The maximum distance for proximity alerts on approaching another chat member in meters. Must be in the range 1-100,000. */
15
15
  proximityAlertRadius?: number;
16
16
  }
17
17
  export declare function constructLocation(geo_: types.MessageMediaGeo | types.MessageMediaGeoLive | types.GeoPoint): Location;
@@ -1,11 +1,10 @@
1
- /** 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](https://core.telegram.org/widgets/login) when the user is coming from Telegram. */
2
1
  export interface LoginUrl {
3
- /** 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](https://core.telegram.org/widgets/login#receiving-authorization-data). */
2
+ /** An HTTPS URL to be opened with the authorization data appended 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. */
4
3
  url: string;
5
- /** New text of the button in forwarded messages. */
4
+ /** A different text to use for the button when the message is forwarded. */
6
5
  forwardText?: string;
7
- /** Username of a bot, which will be used for user authorization. See [Setting up a bot](https://core.telegram.org/widgets/login#setting-up-a-bot) for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See [Linking your domain to the bot](https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot) for more details. */
6
+ /** Username of a bot, which will be used for user authorization. See [Learn more.](https://core.telegram.org/widgets/login#setting-up-a-bot) If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. [Learn more.](https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot) */
8
7
  botUsername?: string;
9
- /** Pass True to request the permission for your bot to send messages to the user. */
8
+ /** Whether to ask the user to allow messages to be received from the specified bot. */
10
9
  requestWriteAccess?: boolean;
11
10
  }
@@ -1,5 +1,4 @@
1
1
  import { types } from "../2_tl.js";
2
- /** This object describes the position on faces where a mask should be placed by default. */
3
2
  export interface MaskPosition {
4
3
  /** The part of the face relative to which the mask should be placed. One of "forehead", "eyes", "mouth", or "chin". */
5
4
  point: "forehead" | "eyes" | "mouth" | "chin";
@@ -31,7 +31,7 @@ export declare namespace MessageEntity {
31
31
  }
32
32
  interface Pre extends Base {
33
33
  type: "pre";
34
- /** For "pre" only, the programming language of the entity text */
34
+ /** The language identifier of the code. */
35
35
  language: string;
36
36
  }
37
37
  interface Code extends Base {
@@ -39,12 +39,12 @@ export declare namespace MessageEntity {
39
39
  }
40
40
  interface TextLink extends Base {
41
41
  type: "textLink";
42
- /** For "textLink" only, URL that will be opened after user taps on the text */
42
+ /** A URL that will be opened after the text is tapped. */
43
43
  url: string;
44
44
  }
45
45
  interface TextMention extends Base {
46
46
  type: "textMention";
47
- /** For "textMention" only, the ID of the mentioned user */
47
+ /** The identifier of the user to mention. */
48
48
  userId: number;
49
49
  }
50
50
  interface Cashtag extends Base {
@@ -70,11 +70,11 @@ export declare namespace MessageEntity {
70
70
  }
71
71
  interface CustomEmoji extends Base {
72
72
  type: "customEmoji";
73
- /** For "customEmoji" only, unique identifier of the custom emoji */
73
+ /** The identifier of the custom emoji. */
74
74
  customEmojiId: string;
75
75
  }
76
76
  }
77
- /** This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. */
77
+ /** A single entity of a message's text or caption. */
78
78
  export type MessageEntity = MessageEntity.Mention | MessageEntity.Hashtag | MessageEntity.BotCommand | MessageEntity.URL | MessageEntity.EmailAddress | MessageEntity.Bold | MessageEntity.Italic | MessageEntity.Code | MessageEntity.Pre | MessageEntity.TextLink | MessageEntity.TextMention | MessageEntity.Cashtag | MessageEntity.PhoneNumber | MessageEntity.Underline | MessageEntity.Strikethrough | MessageEntity.Blockquote | MessageEntity.BankCard | MessageEntity.Spoiler | MessageEntity.CustomEmoji;
79
79
  export declare function constructMessageEntity(obj: types.TypeMessageEntity): MessageEntity | null;
80
80
  export declare function messageEntityToTlObject(entity: MessageEntity): types.MessageEntityMention | types.MessageEntityHashtag | types.MessageEntityBotCommand | types.MessageEntityURL | types.MessageEntityEmail | types.MessageEntityBold | types.MessageEntityItalic | types.MessageEntityCode | types.MessageEntityPre | types.MessageEntityTextURL | types.MessageEntityMentionName | types.MessageEntityPhone | types.MessageEntityCashtag | types.MessageEntityUnderline | types.MessageEntityStrike | types.MessageEntityBlockquote | types.MessageEntityBankCard | types.MessageEntitySpoiler | types.MessageEntityCustomEmoji;
@@ -1 +1,2 @@
1
+ /** Message parse mode. */
1
2
  export type ParseMode = "HTML" | null;
@@ -1,8 +1,8 @@
1
1
  import { types } from "../2_tl.js";
2
2
  export interface PollOption {
3
- /** Option text, 1-100 characters */
3
+ /** The option's text (1-100 characters). */
4
4
  text: string;
5
- /** Number of users that voted for this option */
5
+ /** Number of users that voted this option. */
6
6
  voterCount: number;
7
7
  }
8
8
  export declare function constructPollOption(option: types.PollAnswer, results: Array<types.TypePollAnswerVoters>): PollOption;
@@ -1,9 +1,9 @@
1
1
  import { types } from "../2_tl.js";
2
- /** Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button. */
2
+ /** Makes the user's client hide the current custom keyboard. */
3
3
  export interface ReplyKeyboardRemove {
4
- /** Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use _one_time_keyboard_ in `ReplyKeyboardMarkup`) */
4
+ /** Differentiate from other reply markup types. */
5
5
  removeKeyboard: true;
6
- /** Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the `Message` object; 2) if the bot's message is a reply (has _reply_to_message_id_), sender of the original message. */
6
+ /** Whether to only affect specific users. If true, only users that were mentioned will be affected along with the author of the replied message if any. */
7
7
  selective?: boolean;
8
8
  }
9
9
  export declare function constructReplyKeyboardRemove(replyMarkup_: types.ReplyKeyboardHide): ReplyKeyboardRemove;
@@ -1,15 +1,15 @@
1
1
  import { types } from "../2_tl.js";
2
- /** This object represents thumbnail of a file or a sticker. */
2
+ /** A file or sticker thumbnail. */
3
3
  export interface Thumbnail {
4
- /** Identifier for this file, which can be used to download or reuse the file */
4
+ /** A file identifier that can be used to download or reuse the thumbnail. */
5
5
  fileId: string;
6
- /** Unique identifier for this file, which is supposed to be the same over time and for different users and bots. Can't be used to download or reuse the file. */
6
+ /** A file identifier that can be used to identify the thumbnail. */
7
7
  fileUniqueId: string;
8
- /** Photo width */
8
+ /** The width of the thumbnail. */
9
9
  width: number;
10
- /** Photo height */
10
+ /** The height of the thumbnail. */
11
11
  height: number;
12
- /** File size in bytes */
12
+ /** Size of the file in bytes. */
13
13
  fileSize: number;
14
14
  }
15
15
  export declare function constructThumbnail(size: types.PhotoSize, file: types.Document | types.Photo): Thumbnail;
@@ -1,16 +1,16 @@
1
1
  import { types } from "../2_tl.js";
2
2
  import { Location } from "./0_location.js";
3
- /** */
3
+ /** A shared venue. */
4
4
  export interface Venue {
5
- /** Venue location. Can't be a live location */
5
+ /** The location of the venue. Cannot be a live location. */
6
6
  location: Location;
7
- /** Name of the venue */
7
+ /** The name of the venue. */
8
8
  title: string;
9
- /** Address of the venue */
9
+ /** The address of the venue. */
10
10
  address: string;
11
- /** Foursquare identifier of the venue */
11
+ /** The Foursquare identifier of the venue. */
12
12
  foursquareId?: string;
13
- /** Foursquare type of the venue. (For example, "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".) */
13
+ /** The Foursquare type of the venue. */
14
14
  foursquareType?: string;
15
15
  }
16
16
  export declare function constructVenue(media_: types.MessageMediaVenue): Venue;
@@ -1,15 +1,15 @@
1
1
  import { types } from "../2_tl.js";
2
- /** This object represents a voice note. */
2
+ /** A voice note. */
3
3
  export interface Voice {
4
- /** Identifier for this file, which can be used to download or reuse the file */
4
+ /** A file identifier that can be used to download or reuse this file. */
5
5
  fileId: string;
6
- /** Unique identifier for this file, which is supposed to be the same over time and for different users and bots. Can't be used to download or reuse the file. */
6
+ /** A file identifier that can be used to identify this file. */
7
7
  fileUniqueId: string;
8
- /** Duration of the audio in seconds as defined by sender */
8
+ /** Duration of the audio in seconds. */
9
9
  duration: number;
10
- /** MIME type of the file as defined by sender */
10
+ /** MIME type of the file. */
11
11
  mimeType: string;
12
- /** File size in bytes */
12
+ /** Size of the file in bytes. */
13
13
  fileSize: number;
14
14
  }
15
15
  export declare function constructVoice(document: types.Document, audioAttributes: types.DocumentAttributeAudio, fileId: string, fileUniqueId: string): Voice;
@@ -1,6 +1,5 @@
1
- /** Describes a Web App */
2
1
  export interface WebAppInfo {
3
- /** An HTTPS URL of a Web App to be opened with additional data */
2
+ /** An HTTPS URL of the Web App to be opened with additional data. */
4
3
  url: string;
5
4
  }
6
5
  export declare function constructWebAppInfo(url: string): WebAppInfo;
@@ -2,23 +2,23 @@ import { types } from "../2_tl.js";
2
2
  import { Thumbnail } from "./0_thumbnail.js";
3
3
  /** This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). */
4
4
  export interface Animation {
5
- /** Identifier for this file, which can be used to download or reuse the file */
5
+ /** A file identifier that can be used to download or reuse this file. */
6
6
  fileId: string;
7
- /** Unique identifier for this file, which is supposed to be the same over time and for different users and bots. Can't be used to download or reuse the file. */
7
+ /** A file identifier that can be used to identify this file. */
8
8
  fileUniqueId: string;
9
- /** Video width as defined by sender */
9
+ /** The width of the animation. */
10
10
  width: number;
11
- /** Video height as defined by sender */
11
+ /** The height of the animation. */
12
12
  height: number;
13
- /** Duration of the video in seconds as defined by sender */
13
+ /** Duration of the animation in seconds. */
14
14
  duration: number;
15
- /** Animation thumbnail as defined by sender */
15
+ /** Thumbnails of the animation. */
16
16
  thumbnails: Thumbnail[];
17
- /** Original animation filename as defined by sender */
17
+ /** The original file name. */
18
18
  fileName?: string;
19
- /** MIME type of the file as defined by sender */
19
+ /** MIME type of the file. */
20
20
  mimeType: string;
21
- /** File size in bytes */
21
+ /** Size of the file in bytes. */
22
22
  fileSize: number;
23
23
  }
24
24
  export declare function constructAnimation(document: types.Document, videoAttribute: types.DocumentAttributeVideo | undefined, fileAttribute: types.DocumentAttributeFilename | undefined, fileId: string, fileUniqueId: string): Animation;
@@ -5,82 +5,77 @@ import { RestrictionReason } from "./0_restriction_reason.js";
5
5
  export type ChatType = "private" | "group" | "supergroup" | "channel";
6
6
  export declare namespace Chat {
7
7
  interface Base {
8
- /** Type of chat, can be either "private", "group", "supergroup" or "channel" */
8
+ /** The type of the chat. */
9
9
  type: ChatType;
10
- /** Unique identifier for this chat */
10
+ /** The identifier of the chat. */
11
11
  id: number;
12
+ /** A color that can be displayed instead of the chat's photo. */
12
13
  color: Color;
13
- /** Chat photo. */
14
+ /** The chat's photo. */
14
15
  photo?: ChatPhoto;
15
16
  }
16
17
  interface Private extends Base {
17
18
  type: "private";
18
- /** True, if this user is a bot */
19
+ /** Whether this is a bot's chat. */
19
20
  isBot?: boolean;
20
- /** First name of the other party in a private chat */
21
+ /** The first name of the user. */
21
22
  firstName: string;
22
- /** Last name of the other party in a private chat */
23
+ /** The last name of the user. */
23
24
  lastName?: string;
24
- /** Username, for private chats, supergroups and channels if available */
25
+ /** The user's main username. */
25
26
  username?: string;
26
- /** Additional usernames */
27
+ /** The user's other usernames. */
27
28
  also?: string[];
28
- /** Chat photo. */
29
+ /** The user's profile photo. */
29
30
  photo?: ChatPhoto.User;
30
- /** True, if the user is a scam user */
31
+ /** Whether the user has been identified as scam. */
31
32
  isScam: boolean;
32
- /** True, if this user was reported by many users as a fake or scam user: be careful when interacting with them. */
33
+ /** Whether the user has been identified as an impersonator. */
33
34
  isFake: boolean;
34
- /** True, if the user is an official support user */
35
+ /** Whether the user is official support. */
35
36
  isSupport: boolean;
36
- /** True, if the user is verified */
37
+ /** Whether the user has been verified. */
37
38
  isVerified: boolean;
38
- /** True, if the access to the user must be restricted for the reason specified in `restriction_reason` */
39
+ /** Whether the user has been restricted. */
39
40
  isRestricted?: boolean;
40
- /** Contains the reason why access to the user must be restricted. */
41
+ /** The reason why the user has been restricted. */
41
42
  restrictionReason?: RestrictionReason[];
42
43
  }
43
44
  interface Group extends Base {
44
45
  type: "group";
45
- /** Title, for supergroups, channels and group chats */
46
+ /** The title of the chat. */
46
47
  title: string;
47
- /** Chat photo. */
48
+ /** The chat's photo. */
48
49
  photo?: ChatPhoto.Chat;
49
- /** True, if the user is creator of the chat */
50
+ /** Whether the current user is the owner of the chat. */
50
51
  isCreator: boolean;
51
52
  }
52
53
  interface ChannelBase extends Base {
53
- /** Title, for supergroups, channels and group chats */
54
+ /** The title of the chat or channel. */
54
55
  title: string;
55
- /** Username, for private chats, supergroups and channels if available */
56
+ /** The main username of the chat or channel. */
56
57
  username?: string;
57
- /** Additional usernames */
58
+ /** The other usernames of the chat or channel. */
58
59
  also?: string[];
59
- /** Chat photo. */
60
+ /** The chat or channel's photo. */
60
61
  photo?: ChatPhoto.Chat;
61
- /** True, if the user is a scam user */
62
+ /** Whether the chat or channel has been identified as scam. */
62
63
  isScam: boolean;
63
- /** True, if this user was reported by many users as a fake or scam user: be careful when interacting with them. */
64
+ /** Whether the chat or channel has been identified as an impersonator. */
64
65
  isFake: boolean;
65
- /** True, if the user is verified */
66
+ /** Whether the chat or channel has been verified. */
66
67
  isVerified: boolean;
67
- /** True, if the access to the user must be restricted for the reason specified in `restriction_reason` */
68
+ /** Whether the chat or channel has been restricted. */
68
69
  isRestricted: boolean;
69
- /** Contains the reason why access to the user must be restricted. */
70
+ /** The reason why the chat or channel has been restricted. */
70
71
  restrictionReason?: RestrictionReason[];
71
72
  }
72
73
  interface Channel extends ChannelBase {
73
74
  type: "channel";
74
- /** Title, for supergroups, channels and group chats */
75
- title: string;
76
- /** Username, for private chats, supergroups and channels if available */
77
- username?: string;
78
- /** Additional usernames */
79
- also?: string[];
80
75
  }
81
76
  interface Supergroup extends ChannelBase {
82
77
  type: "supergroup";
83
- /** True, if the supergroup chat is a forum (has [topics](https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups) enabled) */
78
+ /** Whether the chat is a forum. */
84
79
  isForum: boolean;
85
80
  }
86
81
  }