nyx-bot-client 0.0.2

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 (288) hide show
  1. package/.env.sample +4 -0
  2. package/.vscode/extensions.json +11 -0
  3. package/.vscode/settings.json +17 -0
  4. package/.zed/settings.json +20 -0
  5. package/@types/AcceptedGiftTypes.ts +26 -0
  6. package/@types/AffiliateInfo.ts +35 -0
  7. package/@types/Animation.ts +56 -0
  8. package/@types/Audio.ts +56 -0
  9. package/@types/BackgroundFill.ts +18 -0
  10. package/@types/BackgroundFillFreeformGradient.ts +16 -0
  11. package/@types/BackgroundFillGradient.ts +26 -0
  12. package/@types/BackgroundFillSolid.ts +16 -0
  13. package/@types/BackgroundType.ts +21 -0
  14. package/@types/BackgroundTypeChatTheme.ts +16 -0
  15. package/@types/BackgroundTypeFill.ts +23 -0
  16. package/@types/BackgroundTypePattern.ts +40 -0
  17. package/@types/BackgroundTypeWallpaper.ts +33 -0
  18. package/@types/Birthdate.ts +21 -0
  19. package/@types/BotCommand.ts +16 -0
  20. package/@types/BotCommandScope.ts +30 -0
  21. package/@types/BotCommandScopeAllChatAdministrators.ts +11 -0
  22. package/@types/BotCommandScopeAllGroupChats.ts +11 -0
  23. package/@types/BotCommandScopeAllPrivateChats.ts +11 -0
  24. package/@types/BotCommandScopeChat.ts +16 -0
  25. package/@types/BotCommandScopeChatAdministrators.ts +16 -0
  26. package/@types/BotCommandScopeChatMember.ts +21 -0
  27. package/@types/BotCommandScopeDefault.ts +12 -0
  28. package/@types/BotDescription.ts +11 -0
  29. package/@types/BotName.ts +11 -0
  30. package/@types/BotShortDescription.ts +11 -0
  31. package/@types/BusinessBotRights.ts +65 -0
  32. package/@types/BusinessConnection.ts +41 -0
  33. package/@types/BusinessIntro.ts +23 -0
  34. package/@types/BusinessLocation.ts +18 -0
  35. package/@types/BusinessMessagesDeleted.ts +24 -0
  36. package/@types/BusinessOpeningHours.ts +18 -0
  37. package/@types/BusinessOpeningHoursInterval.ts +18 -0
  38. package/@types/CallbackGame.ts +6 -0
  39. package/@types/CallbackQuery.ts +49 -0
  40. package/@types/Chat.ts +43 -0
  41. package/@types/ChatAdministratorRights.ts +84 -0
  42. package/@types/ChatBackground.ts +13 -0
  43. package/@types/ChatBoost.ts +29 -0
  44. package/@types/ChatBoostAdded.ts +11 -0
  45. package/@types/ChatBoostRemoved.ts +28 -0
  46. package/@types/ChatBoostSource.ts +18 -0
  47. package/@types/ChatBoostSourceGiftCode.ts +19 -0
  48. package/@types/ChatBoostSourceGiveaway.ts +35 -0
  49. package/@types/ChatBoostSourcePremium.ts +19 -0
  50. package/@types/ChatBoostUpdated.ts +18 -0
  51. package/@types/ChatFullInfo.ts +260 -0
  52. package/@types/ChatInviteLink.ts +66 -0
  53. package/@types/ChatJoinRequest.ts +42 -0
  54. package/@types/ChatLocation.ts +16 -0
  55. package/@types/ChatMember.ts +28 -0
  56. package/@types/ChatMemberAdministrator.ts +107 -0
  57. package/@types/ChatMemberBanned.ts +23 -0
  58. package/@types/ChatMemberLeft.ts +18 -0
  59. package/@types/ChatMemberMember.ts +23 -0
  60. package/@types/ChatMemberOwner.ts +28 -0
  61. package/@types/ChatMemberRestricted.ts +99 -0
  62. package/@types/ChatMemberUpdated.ts +49 -0
  63. package/@types/ChatPermissions.ts +78 -0
  64. package/@types/ChatPhoto.ts +30 -0
  65. package/@types/ChatShared.ts +36 -0
  66. package/@types/Checklist.ts +33 -0
  67. package/@types/ChecklistTask.ts +33 -0
  68. package/@types/ChecklistTasksAdded.ts +19 -0
  69. package/@types/ChecklistTasksDone.ts +24 -0
  70. package/@types/ChosenInlineResult.ts +34 -0
  71. package/@types/Contact.ts +33 -0
  72. package/@types/CopyTextButton.ts +11 -0
  73. package/@types/Dice.ts +17 -0
  74. package/@types/DirectMessagePriceChanged.ts +17 -0
  75. package/@types/Document.ts +41 -0
  76. package/@types/EncryptedCredentials.ts +23 -0
  77. package/@types/EncryptedPassportElement.ts +357 -0
  78. package/@types/ExternalReplyInfo.ts +159 -0
  79. package/@types/File.ts +33 -0
  80. package/@types/ForceReply.ts +26 -0
  81. package/@types/ForumTopic.ts +26 -0
  82. package/@types/ForumTopicClosed.ts +6 -0
  83. package/@types/ForumTopicCreated.ts +21 -0
  84. package/@types/ForumTopicEdited.ts +17 -0
  85. package/@types/ForumTopicReopened.ts +6 -0
  86. package/@types/Game.ts +41 -0
  87. package/@types/GameHighScore.ts +23 -0
  88. package/@types/GeneralForumTopicHidden.ts +7 -0
  89. package/@types/GeneralForumTopicUnhidden.ts +7 -0
  90. package/@types/Gift.ts +38 -0
  91. package/@types/GiftInfo.ts +52 -0
  92. package/@types/Gifts.ts +13 -0
  93. package/@types/Giveaway.ts +55 -0
  94. package/@types/GiveawayCompleted.ts +29 -0
  95. package/@types/GiveawayCreated.ts +11 -0
  96. package/@types/GiveawayWinners.ts +68 -0
  97. package/@types/InaccessibleMessage.ts +23 -0
  98. package/@types/InlineKeyboardButton.ts +88 -0
  99. package/@types/InlineKeyboardMarkup.ts +13 -0
  100. package/@types/InlineQuery.ts +41 -0
  101. package/@types/InlineQueryResult.ts +70 -0
  102. package/@types/InlineQueryResultArticle.ts +58 -0
  103. package/@types/InlineQueryResultAudio.ts +69 -0
  104. package/@types/InlineQueryResultCachedAudio.ts +55 -0
  105. package/@types/InlineQueryResultCachedDocument.ts +65 -0
  106. package/@types/InlineQueryResultCachedGif.ts +65 -0
  107. package/@types/InlineQueryResultCachedMpeg4Gif.ts +65 -0
  108. package/@types/InlineQueryResultCachedPhoto.ts +70 -0
  109. package/@types/InlineQueryResultCachedSticker.ts +34 -0
  110. package/@types/InlineQueryResultCachedVideo.ts +70 -0
  111. package/@types/InlineQueryResultCachedVoice.ts +60 -0
  112. package/@types/InlineQueryResultContact.ts +64 -0
  113. package/@types/InlineQueryResultDocument.ts +85 -0
  114. package/@types/InlineQueryResultGame.ts +29 -0
  115. package/@types/InlineQueryResultGif.ts +91 -0
  116. package/@types/InlineQueryResultLocation.ts +82 -0
  117. package/@types/InlineQueryResultMpeg4Gif.ts +91 -0
  118. package/@types/InlineQueryResultPhoto.ts +84 -0
  119. package/@types/InlineQueryResultVenue.ts +80 -0
  120. package/@types/InlineQueryResultVideo.ts +98 -0
  121. package/@types/InlineQueryResultVoice.ts +65 -0
  122. package/@types/InlineQueryResultsButton.ts +34 -0
  123. package/@types/InputChecklist.ts +39 -0
  124. package/@types/InputChecklistTask.ts +30 -0
  125. package/@types/InputContactMessageContent.ts +27 -0
  126. package/@types/InputFile.ts +10 -0
  127. package/@types/InputInvoiceMessageContent.ts +120 -0
  128. package/@types/InputLocationMessageContent.ts +39 -0
  129. package/@types/InputMedia.ts +24 -0
  130. package/@types/InputMediaAnimation.ts +68 -0
  131. package/@types/InputMediaAudio.ts +58 -0
  132. package/@types/InputMediaDocument.ts +49 -0
  133. package/@types/InputMediaPhoto.ts +45 -0
  134. package/@types/InputMediaVideo.ts +85 -0
  135. package/@types/InputMessageContent.ts +25 -0
  136. package/@types/InputPaidMedia.ts +11 -0
  137. package/@types/InputPaidMediaPhoto.ts +21 -0
  138. package/@types/InputPaidMediaVideo.ts +64 -0
  139. package/@types/InputPollOption.ts +25 -0
  140. package/@types/InputProfilePhoto.ts +10 -0
  141. package/@types/InputProfilePhotoAnimated.ts +23 -0
  142. package/@types/InputProfilePhotoStatic.ts +18 -0
  143. package/@types/InputSticker.ts +38 -0
  144. package/@types/InputStoryContent.ts +11 -0
  145. package/@types/InputStoryContentPhoto.ts +29 -0
  146. package/@types/InputStoryContentVideo.ts +49 -0
  147. package/@types/InputTextMessageContent.ts +28 -0
  148. package/@types/InputVenueMessageContent.ts +47 -0
  149. package/@types/Invoice.ts +35 -0
  150. package/@types/KeyboardButton.ts +61 -0
  151. package/@types/KeyboardButtonPollType.ts +13 -0
  152. package/@types/KeyboardButtonRequestChat.ts +68 -0
  153. package/@types/KeyboardButtonRequestUsers.ts +45 -0
  154. package/@types/LabeledPrice.ts +18 -0
  155. package/@types/LinkPreviewOptions.ts +32 -0
  156. package/@types/Location.ts +38 -0
  157. package/@types/LocationAddress.ts +26 -0
  158. package/@types/LoginUrl.ts +37 -0
  159. package/@types/MaskPosition.ts +28 -0
  160. package/@types/MaybeInaccessibleMessage.ts +8 -0
  161. package/@types/MenuButton.ts +20 -0
  162. package/@types/MenuButtonCommands.ts +11 -0
  163. package/@types/MenuButtonDefault.ts +11 -0
  164. package/@types/MenuButtonWebApp.ts +26 -0
  165. package/@types/Message.ts +608 -0
  166. package/@types/MessageAutoDeleteTimerChanged.ts +11 -0
  167. package/@types/MessageEntity.ts +109 -0
  168. package/@types/MessageId.ts +11 -0
  169. package/@types/MessageOrigin.ts +21 -0
  170. package/@types/MessageOriginChannel.ts +33 -0
  171. package/@types/MessageOriginChat.ts +28 -0
  172. package/@types/MessageOriginHiddenUser.ts +21 -0
  173. package/@types/MessageOriginUser.ts +23 -0
  174. package/@types/MessageReactionCountUpdated.ts +28 -0
  175. package/@types/MessageReactionUpdated.ts +43 -0
  176. package/@types/OrderInfo.ts +28 -0
  177. package/@types/OwnedGift.ts +11 -0
  178. package/@types/OwnedGiftRegular.ts +77 -0
  179. package/@types/OwnedGiftUnique.ts +57 -0
  180. package/@types/OwnedGifts.ts +23 -0
  181. package/@types/PaidMedia.ts +13 -0
  182. package/@types/PaidMediaInfo.ts +18 -0
  183. package/@types/PaidMediaPhoto.ts +18 -0
  184. package/@types/PaidMediaPreview.ts +26 -0
  185. package/@types/PaidMediaPurchased.ts +18 -0
  186. package/@types/PaidMediaVideo.ts +18 -0
  187. package/@types/PaidMessagePriceChanged.ts +16 -0
  188. package/@types/PassportData.ts +18 -0
  189. package/@types/PassportElementError.ts +37 -0
  190. package/@types/PassportElementErrorDataField.ts +39 -0
  191. package/@types/PassportElementErrorFile.ts +33 -0
  192. package/@types/PassportElementErrorFiles.ts +33 -0
  193. package/@types/PassportElementErrorFrontSide.ts +28 -0
  194. package/@types/PassportElementErrorReverseSide.ts +27 -0
  195. package/@types/PassportElementErrorSelfie.ts +28 -0
  196. package/@types/PassportElementErrorTranslationFile.ts +38 -0
  197. package/@types/PassportElementErrorTranslationFiles.ts +38 -0
  198. package/@types/PassportElementErrorUnspecified.ts +49 -0
  199. package/@types/PassportFile.ts +28 -0
  200. package/@types/PhotoSize.ts +32 -0
  201. package/@types/Poll.ts +81 -0
  202. package/@types/PollAnswer.ts +28 -0
  203. package/@types/PollOption.ts +24 -0
  204. package/@types/PreCheckoutQuery.ts +45 -0
  205. package/@types/ProximityAlertTriggered.ts +24 -0
  206. package/@types/ReactionCount.ts +18 -0
  207. package/@types/ReactionType.ts +18 -0
  208. package/@types/ReactionTypeCustomEmoji.ts +16 -0
  209. package/@types/ReactionTypeEmoji.ts +92 -0
  210. package/@types/ReactionTypePaid.ts +11 -0
  211. package/@types/RefundedPayment.ts +35 -0
  212. package/@types/ReplyKeyboardMarkup.ts +49 -0
  213. package/@types/ReplyKeyboardRemove.ts +25 -0
  214. package/@types/ReplyParameters.ts +48 -0
  215. package/@types/ResponseParameters.ts +19 -0
  216. package/@types/RevenueWithdrawalState.ts +13 -0
  217. package/@types/RevenueWithdrawalStateFailed.ts +11 -0
  218. package/@types/RevenueWithdrawalStatePending.ts +10 -0
  219. package/@types/RevenueWithdrawalStateSucceeded.ts +21 -0
  220. package/@types/SentWebAppMessage.ts +12 -0
  221. package/@types/SharedUser.ts +36 -0
  222. package/@types/ShippingAddress.ts +36 -0
  223. package/@types/ShippingOption.ts +23 -0
  224. package/@types/ShippingQuery.ts +28 -0
  225. package/@types/StarAmount.ts +17 -0
  226. package/@types/StarTransaction.ts +42 -0
  227. package/@types/StarTransactions.ts +13 -0
  228. package/@types/Sticker.ts +86 -0
  229. package/@types/StickerSet.ts +33 -0
  230. package/@types/Story.ts +18 -0
  231. package/@types/StoryArea.ts +18 -0
  232. package/@types/StoryAreaPosition.ts +36 -0
  233. package/@types/StoryAreaType.ts +24 -0
  234. package/@types/StoryAreaTypeLink.ts +16 -0
  235. package/@types/StoryAreaTypeLocation.ts +28 -0
  236. package/@types/StoryAreaTypeSuggestedReaction.ts +29 -0
  237. package/@types/StoryAreaTypeUniqueGift.ts +16 -0
  238. package/@types/StoryAreaTypeWeather.ts +26 -0
  239. package/@types/SuccessfulPayment.ts +60 -0
  240. package/@types/SwitchInlineQueryChosenChat.ts +33 -0
  241. package/@types/TextQuote.ts +30 -0
  242. package/@types/TransactionPartner.ts +31 -0
  243. package/@types/TransactionPartnerAffiliateProgram.ts +24 -0
  244. package/@types/TransactionPartnerChat.ts +21 -0
  245. package/@types/TransactionPartnerFragment.ts +18 -0
  246. package/@types/TransactionPartnerOther.ts +11 -0
  247. package/@types/TransactionPartnerTelegramAds.ts +11 -0
  248. package/@types/TransactionPartnerTelegramApi.ts +16 -0
  249. package/@types/TransactionPartnerUser.ts +70 -0
  250. package/@types/UniqueGift.ts +38 -0
  251. package/@types/UniqueGiftBackdrop.ts +23 -0
  252. package/@types/UniqueGiftBackdropColors.ts +26 -0
  253. package/@types/UniqueGiftInfo.ts +42 -0
  254. package/@types/UniqueGiftModel.ts +23 -0
  255. package/@types/UniqueGiftSymbol.ts +23 -0
  256. package/@types/Update.ts +177 -0
  257. package/@types/User.ts +74 -0
  258. package/@types/UserProfilePhotos.ts +18 -0
  259. package/@types/UsersShared.ts +19 -0
  260. package/@types/Venue.ts +48 -0
  261. package/@types/Video.ts +66 -0
  262. package/@types/VideoChatEnded.ts +11 -0
  263. package/@types/VideoChatParticipantsInvited.ts +13 -0
  264. package/@types/VideoChatScheduled.ts +11 -0
  265. package/@types/VideoChatStarted.ts +6 -0
  266. package/@types/VideoNote.ts +39 -0
  267. package/@types/Voice.ts +34 -0
  268. package/@types/WebAppData.ts +17 -0
  269. package/@types/WebAppInfo.ts +11 -0
  270. package/@types/WebhookInfo.ts +54 -0
  271. package/@types/WriteAccessAllowed.ts +23 -0
  272. package/@types/index.ts +395 -0
  273. package/@types/utils.ts +17 -0
  274. package/biome.json +58 -0
  275. package/bun.lock +105 -0
  276. package/cron/actions-server.ts +87 -0
  277. package/index.ts +9 -0
  278. package/nyx-client.ts +133 -0
  279. package/package.json +22 -0
  280. package/tsconfig.json +28 -0
  281. package/types.d.ts +35 -0
  282. package/utils/actions.ts +30 -0
  283. package/utils/api.ts +27 -0
  284. package/utils/enum.ts +5 -0
  285. package/utils/helpers.ts +71 -0
  286. package/utils/methods.ts +1943 -0
  287. package/utils/objects.ts +37 -0
  288. package/utils/table.ts +72 -0
@@ -0,0 +1,99 @@
1
+ import type { User } from "./";
2
+
3
+ /**
4
+ * ## ChatMemberRestricted
5
+ * Represents a chat member that is under certain restrictions in the chat. Supergroups only.
6
+ * @see https://core.telegram.org/bots/api#chatmemberrestricted
7
+ */
8
+ export type ChatMemberRestricted = {
9
+ /**
10
+ * The member's status in the chat, always “restricted”
11
+ */
12
+ status: "restricted";
13
+
14
+ /**
15
+ * Information about the user
16
+ */
17
+ user: User;
18
+
19
+ /**
20
+ * True, if the user is a member of the chat at the moment of the request
21
+ */
22
+ is_member: boolean;
23
+
24
+ /**
25
+ * True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and
26
+ * venues
27
+ */
28
+ can_send_messages: boolean;
29
+
30
+ /**
31
+ * True, if the user is allowed to send audios
32
+ */
33
+ can_send_audios: boolean;
34
+
35
+ /**
36
+ * True, if the user is allowed to send documents
37
+ */
38
+ can_send_documents: boolean;
39
+
40
+ /**
41
+ * True, if the user is allowed to send photos
42
+ */
43
+ can_send_photos: boolean;
44
+
45
+ /**
46
+ * True, if the user is allowed to send videos
47
+ */
48
+ can_send_videos: boolean;
49
+
50
+ /**
51
+ * True, if the user is allowed to send video notes
52
+ */
53
+ can_send_video_notes: boolean;
54
+
55
+ /**
56
+ * True, if the user is allowed to send voice notes
57
+ */
58
+ can_send_voice_notes: boolean;
59
+
60
+ /**
61
+ * True, if the user is allowed to send polls
62
+ */
63
+ can_send_polls: boolean;
64
+
65
+ /**
66
+ * True, if the user is allowed to send animations, games, stickers and use inline bots
67
+ */
68
+ can_send_other_messages: boolean;
69
+
70
+ /**
71
+ * True, if the user is allowed to add web page previews to their messages
72
+ */
73
+ can_add_web_page_previews: boolean;
74
+
75
+ /**
76
+ * True, if the user is allowed to change the chat title, photo and other settings
77
+ */
78
+ can_change_info: boolean;
79
+
80
+ /**
81
+ * True, if the user is allowed to invite new users to the chat
82
+ */
83
+ can_invite_users: boolean;
84
+
85
+ /**
86
+ * True, if the user is allowed to pin messages
87
+ */
88
+ can_pin_messages: boolean;
89
+
90
+ /**
91
+ * True, if the user is allowed to create forum topics
92
+ */
93
+ can_manage_topics: boolean;
94
+
95
+ /**
96
+ * Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever
97
+ */
98
+ until_date: number;
99
+ };
@@ -0,0 +1,49 @@
1
+ import type { Chat, ChatInviteLink, ChatMember, User } from "./";
2
+
3
+ /**
4
+ * ## ChatMemberUpdated
5
+ * This object represents changes in the status of a chat member.
6
+ * @see https://core.telegram.org/bots/api#chatmemberupdated
7
+ */
8
+ export type ChatMemberUpdated = {
9
+ /**
10
+ * Chat the user belongs to
11
+ */
12
+ chat: Chat;
13
+
14
+ /**
15
+ * Performer of the action, which resulted in the change
16
+ */
17
+ from: User;
18
+
19
+ /**
20
+ * Date the change was done in Unix time
21
+ */
22
+ date: number;
23
+
24
+ /**
25
+ * Previous information about the chat member
26
+ */
27
+ old_chat_member: ChatMember;
28
+
29
+ /**
30
+ * New information about the chat member
31
+ */
32
+ new_chat_member: ChatMember;
33
+
34
+ /**
35
+ * Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.
36
+ */
37
+ invite_link?: ChatInviteLink;
38
+
39
+ /**
40
+ * Optional. True, if the user joined the chat after sending a direct join request without using an invite link and
41
+ * being approved by an administrator
42
+ */
43
+ via_join_request?: boolean;
44
+
45
+ /**
46
+ * Optional. True, if the user joined the chat via a chat folder invite link
47
+ */
48
+ via_chat_folder_invite_link?: boolean;
49
+ };
@@ -0,0 +1,78 @@
1
+ /**
2
+ * ## ChatPermissions
3
+ * Describes actions that a non-administrator user is allowed to take in a chat.
4
+ * @see https://core.telegram.org/bots/api#chatpermissions
5
+ */
6
+ export type ChatPermissions = {
7
+ /**
8
+ * Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices,
9
+ * locations and venues
10
+ */
11
+ can_send_messages?: boolean;
12
+
13
+ /**
14
+ * Optional. True, if the user is allowed to send audios
15
+ */
16
+ can_send_audios?: boolean;
17
+
18
+ /**
19
+ * Optional. True, if the user is allowed to send documents
20
+ */
21
+ can_send_documents?: boolean;
22
+
23
+ /**
24
+ * Optional. True, if the user is allowed to send photos
25
+ */
26
+ can_send_photos?: boolean;
27
+
28
+ /**
29
+ * Optional. True, if the user is allowed to send videos
30
+ */
31
+ can_send_videos?: boolean;
32
+
33
+ /**
34
+ * Optional. True, if the user is allowed to send video notes
35
+ */
36
+ can_send_video_notes?: boolean;
37
+
38
+ /**
39
+ * Optional. True, if the user is allowed to send voice notes
40
+ */
41
+ can_send_voice_notes?: boolean;
42
+
43
+ /**
44
+ * Optional. True, if the user is allowed to send polls
45
+ */
46
+ can_send_polls?: boolean;
47
+
48
+ /**
49
+ * Optional. True, if the user is allowed to send animations, games, stickers and use inline bots
50
+ */
51
+ can_send_other_messages?: boolean;
52
+
53
+ /**
54
+ * Optional. True, if the user is allowed to add web page previews to their messages
55
+ */
56
+ can_add_web_page_previews?: boolean;
57
+
58
+ /**
59
+ * Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public
60
+ * supergroups
61
+ */
62
+ can_change_info?: boolean;
63
+
64
+ /**
65
+ * Optional. True, if the user is allowed to invite new users to the chat
66
+ */
67
+ can_invite_users?: boolean;
68
+
69
+ /**
70
+ * Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
71
+ */
72
+ can_pin_messages?: boolean;
73
+
74
+ /**
75
+ * Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages
76
+ */
77
+ can_manage_topics?: boolean;
78
+ };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * ## ChatPhoto
3
+ * This object represents a chat photo.
4
+ * @see https://core.telegram.org/bots/api#chatphoto
5
+ */
6
+ export type ChatPhoto = {
7
+ /**
8
+ * File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as
9
+ * long as the photo is not changed.
10
+ */
11
+ small_file_id: string;
12
+
13
+ /**
14
+ * Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different
15
+ * bots. Can't be used to download or reuse the file.
16
+ */
17
+ small_file_unique_id: string;
18
+
19
+ /**
20
+ * File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long
21
+ * as the photo is not changed.
22
+ */
23
+ big_file_id: string;
24
+
25
+ /**
26
+ * Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different
27
+ * bots. Can't be used to download or reuse the file.
28
+ */
29
+ big_file_unique_id: string;
30
+ };
@@ -0,0 +1,36 @@
1
+ import type { PhotoSize } from "./";
2
+
3
+ /**
4
+ * ## ChatShared
5
+ * This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.
6
+ * @see https://core.telegram.org/bots/api#chatshared
7
+ */
8
+ export type ChatShared = {
9
+ /**
10
+ * Identifier of the request
11
+ */
12
+ request_id: number;
13
+
14
+ /**
15
+ * Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages
16
+ * may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer
17
+ * or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and
18
+ * could be unable to use this identifier, unless the chat is already known to the bot by some other means.
19
+ */
20
+ chat_id: number;
21
+
22
+ /**
23
+ * Optional. Title of the chat, if the title was requested by the bot.
24
+ */
25
+ title?: string;
26
+
27
+ /**
28
+ * Optional. Username of the chat, if the username was requested by the bot and available.
29
+ */
30
+ username?: string;
31
+
32
+ /**
33
+ * Optional. Available sizes of the chat photo, if the photo was requested by the bot
34
+ */
35
+ photo?: PhotoSize[];
36
+ };
@@ -0,0 +1,33 @@
1
+ import type { ChecklistTask, MessageEntity } from "./";
2
+
3
+ /**
4
+ * ## Checklist
5
+ * Describes a checklist.
6
+ * @see https://core.telegram.org/bots/api#checklist
7
+ */
8
+ export type Checklist = {
9
+ /**
10
+ * Title of the checklist
11
+ */
12
+ title: string;
13
+
14
+ /**
15
+ * Optional. Special entities that appear in the checklist title
16
+ */
17
+ title_entities?: MessageEntity[];
18
+
19
+ /**
20
+ * List of tasks in the checklist
21
+ */
22
+ tasks: ChecklistTask[];
23
+
24
+ /**
25
+ * Optional. True, if users other than the creator of the list can add tasks to the list
26
+ */
27
+ others_can_add_tasks?: true;
28
+
29
+ /**
30
+ * Optional. True, if users other than the creator of the list can mark tasks as done or not done
31
+ */
32
+ others_can_mark_tasks_as_done?: true;
33
+ };
@@ -0,0 +1,33 @@
1
+ import type { MessageEntity, User } from "./";
2
+
3
+ /**
4
+ * ## ChecklistTask
5
+ * Describes a task in a checklist.
6
+ * @see https://core.telegram.org/bots/api#checklisttask
7
+ */
8
+ export type ChecklistTask = {
9
+ /**
10
+ * Unique identifier of the task
11
+ */
12
+ id: number;
13
+
14
+ /**
15
+ * Text of the task
16
+ */
17
+ text: string;
18
+
19
+ /**
20
+ * Optional. Special entities that appear in the task text
21
+ */
22
+ text_entities?: MessageEntity[];
23
+
24
+ /**
25
+ * Optional. User that completed the task; omitted if the task wasn't completed
26
+ */
27
+ completed_by_user?: User;
28
+
29
+ /**
30
+ * Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed
31
+ */
32
+ completion_date?: number;
33
+ };
@@ -0,0 +1,19 @@
1
+ import type { ChecklistTask, Message } from "./";
2
+
3
+ /**
4
+ * ## ChecklistTasksAdded
5
+ * Describes a service message about tasks added to a checklist.
6
+ * @see https://core.telegram.org/bots/api#checklisttasksadded
7
+ */
8
+ export type ChecklistTasksAdded = {
9
+ /**
10
+ * Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this
11
+ * field will not contain the reply_to_message field even if it itself is a reply.
12
+ */
13
+ checklist_message?: Message;
14
+
15
+ /**
16
+ * List of tasks added to the checklist
17
+ */
18
+ tasks: ChecklistTask[];
19
+ };
@@ -0,0 +1,24 @@
1
+ import type { Message } from "./";
2
+
3
+ /**
4
+ * ## ChecklistTasksDone
5
+ * Describes a service message about checklist tasks marked as done or not done.
6
+ * @see https://core.telegram.org/bots/api#checklisttasksdone
7
+ */
8
+ export type ChecklistTasksDone = {
9
+ /**
10
+ * Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message
11
+ * object in this field will not contain the reply_to_message field even if it itself is a reply.
12
+ */
13
+ checklist_message?: Message;
14
+
15
+ /**
16
+ * Optional. Identifiers of the tasks that were marked as done
17
+ */
18
+ marked_as_done_task_ids?: number[];
19
+
20
+ /**
21
+ * Optional. Identifiers of the tasks that were marked as not done
22
+ */
23
+ marked_as_not_done_task_ids?: number[];
24
+ };
@@ -0,0 +1,34 @@
1
+ import type { User } from "./";
2
+
3
+ /**
4
+ * ## ChosenInlineResult
5
+ * Represents a result of an inline query that was chosen by the user and sent to their chat partner.
6
+ * @see https://core.telegram.org/bots/api#choseninlineresult
7
+ */
8
+ export type ChosenInlineResult = {
9
+ /**
10
+ * The unique identifier for the result that was chosen
11
+ */
12
+ result_id: string;
13
+
14
+ /**
15
+ * The user that chose the result
16
+ */
17
+ from: User;
18
+
19
+ /**
20
+ * Optional. Sender location, only for bots that require user location
21
+ */
22
+ location?: Location;
23
+
24
+ /**
25
+ * Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the
26
+ * message. Will be also received in callback queries and can be used to edit the message.
27
+ */
28
+ inline_message_id?: string;
29
+
30
+ /**
31
+ * The query that was used to obtain the result
32
+ */
33
+ query: string;
34
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * ## Contact
3
+ * This object represents a phone contact.
4
+ * @see https://core.telegram.org/bots/api#contact
5
+ */
6
+ export type Contact = {
7
+ /**
8
+ * Contact's phone number
9
+ */
10
+ phone_number: string;
11
+
12
+ /**
13
+ * Contact's first name
14
+ */
15
+ first_name: string;
16
+
17
+ /**
18
+ * Optional. Contact's last name
19
+ */
20
+ last_name?: string;
21
+
22
+ /**
23
+ * Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some
24
+ * programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant
25
+ * bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
26
+ */
27
+ user_id?: number;
28
+
29
+ /**
30
+ * Optional. Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard)
31
+ */
32
+ vcard?: string;
33
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * ## CopyTextButton
3
+ * This object represents an inline keyboard button that copies specified text to the clipboard.
4
+ * @see https://core.telegram.org/bots/api#copytextbutton
5
+ */
6
+ export type CopyTextButton = {
7
+ /**
8
+ * The text to be copied to the clipboard; 1-256 characters
9
+ */
10
+ text: string;
11
+ };
package/@types/Dice.ts ADDED
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ## Dice
3
+ * This object represents an animated emoji that displays a random value.
4
+ * @see https://core.telegram.org/bots/api#dice
5
+ */
6
+ export type Dice = {
7
+ /**
8
+ * Emoji on which the dice throw animation is based
9
+ */
10
+ emoji: string;
11
+
12
+ /**
13
+ * Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and “⚽” base emoji,
14
+ * 1-64 for “🎰” base emoji
15
+ */
16
+ value: number;
17
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ## DirectMessagePriceChanged
3
+ * Describes a service message about a change in the price of direct messages sent to a channel chat.
4
+ * @see https://core.telegram.org/bots/api#directmessagepricechanged
5
+ */
6
+ export type DirectMessagePriceChanged = {
7
+ /**
8
+ * True, if direct messages are enabled for the channel chat; false otherwise
9
+ */
10
+ are_direct_messages_enabled: boolean;
11
+
12
+ /**
13
+ * Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the
14
+ * channel. Does not apply to users who have been exempted by administrators. Defaults to 0.
15
+ */
16
+ direct_message_star_count?: number;
17
+ };
@@ -0,0 +1,41 @@
1
+ import type { PhotoSize } from "./";
2
+
3
+ /**
4
+ * ## Document
5
+ * This object represents a general file (as opposed to photos, voice messages and audio files).
6
+ * @see https://core.telegram.org/bots/api#document
7
+ */
8
+ export type Document = {
9
+ /**
10
+ * Identifier for this file, which can be used to download or reuse the file
11
+ */
12
+ file_id: string;
13
+
14
+ /**
15
+ * Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used
16
+ * to download or reuse the file.
17
+ */
18
+ file_unique_id: string;
19
+
20
+ /**
21
+ * Optional. Document thumbnail as defined by the sender
22
+ */
23
+ thumbnail?: PhotoSize;
24
+
25
+ /**
26
+ * Optional. Original filename as defined by the sender
27
+ */
28
+ file_name?: string;
29
+
30
+ /**
31
+ * ptional. MIME type of the file as defined by the sender
32
+ */
33
+ mime_type?: string;
34
+
35
+ /**
36
+ * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent
37
+ * defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision
38
+ * float type are safe for storing this value.
39
+ */
40
+ file_size?: number;
41
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * ## EncryptedCredentials
3
+ * Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport
4
+ * Documentation for a complete description of the data decryption and authentication processes.
5
+ * @see https://core.telegram.org/bots/api#encryptedcredentials
6
+ */
7
+ export type EncryptedCredentials = {
8
+ /**
9
+ * Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for
10
+ * EncryptedPassportElement decryption and authentication
11
+ */
12
+ data: string;
13
+
14
+ /**
15
+ * Base64-encoded data hash for data authentication
16
+ */
17
+ hash: string;
18
+
19
+ /**
20
+ * Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption
21
+ */
22
+ secret: string;
23
+ };