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,260 @@
1
+ import type {
2
+ AcceptedGiftTypes,
3
+ Birthdate,
4
+ BusinessIntro,
5
+ BusinessLocation,
6
+ BusinessOpeningHours,
7
+ Chat,
8
+ ChatLocation,
9
+ ChatPermissions,
10
+ ChatPhoto,
11
+ Message,
12
+ ReactionType,
13
+ } from "./";
14
+
15
+ /**
16
+ * ## ChatFullInfo
17
+ * This object contains full information about a chat.
18
+ * @see https://core.telegram.org/bots/api#chatfullinfo
19
+ */
20
+ export type ChatFullInfo = {
21
+ /**
22
+ * Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages
23
+ * may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
24
+ * integer or double-precision float type are safe for storing this identifier.
25
+ */
26
+ id: number;
27
+
28
+ /**
29
+ * Type of the chat, can be either “private”, “group”, “supergroup” or “channel”
30
+ */
31
+ type: "private" | "group" | "supergroup" | "channel";
32
+
33
+ /**
34
+ * Optional. Title, for supergroups, channels and group chats
35
+ */
36
+ title?: string;
37
+
38
+ /**
39
+ * Optional. Username, for private chats, supergroups and channels if available
40
+ */
41
+ username?: string;
42
+
43
+ /**
44
+ * Optional. First name of the other party in a private chat
45
+ */
46
+ first_name?: string;
47
+
48
+ /**
49
+ * Optional. Last name of the other party in a private chat
50
+ */
51
+ last_name?: string;
52
+
53
+ /**
54
+ * Optional. True, if the supergroup chat is a forum (has topics enabled)
55
+ */
56
+ is_forum?: boolean;
57
+
58
+ /**
59
+ * Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link
60
+ * preview. See accent colors for more details.
61
+ */
62
+ accent_color_id: number;
63
+
64
+ /**
65
+ * The maximum number of reactions that can be set on a message in the chat
66
+ */
67
+ max_reaction_count: number;
68
+
69
+ /**
70
+ * Optional. Chat photo
71
+ */
72
+ photo?: ChatPhoto;
73
+
74
+ /**
75
+ * Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels
76
+ */
77
+ active_usernames?: string[];
78
+
79
+ /**
80
+ * Optional. For private chats, the date of birth of the user
81
+ */
82
+ birthdate?: Birthdate;
83
+
84
+ /**
85
+ * Optional. For private chats with business accounts, the intro of the business
86
+ */
87
+ business_intro?: BusinessIntro;
88
+
89
+ /**
90
+ * Optional. For private chats with business accounts, the location of the business
91
+ */
92
+ business_location?: BusinessLocation;
93
+
94
+ /**
95
+ * Optional. For private chats with business accounts, the opening hours of the business
96
+ */
97
+ business_opening_hours?: BusinessOpeningHours;
98
+
99
+ /**
100
+ * Optional. For private chats, the personal channel of the user
101
+ */
102
+ personal_chat?: Chat;
103
+
104
+ /**
105
+ * Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed.
106
+ */
107
+ available_reactions?: ReactionType[];
108
+
109
+ /**
110
+ * Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background
111
+ */
112
+ background_custom_emoji_id?: string;
113
+
114
+ /**
115
+ * Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more
116
+ * details.
117
+ */
118
+ profile_accent_color_id?: number;
119
+
120
+ /**
121
+ * Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background
122
+ */
123
+ profile_background_custom_emoji_id?: string;
124
+
125
+ /**
126
+ * Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat
127
+ */
128
+ emoji_status_custom_emoji_id?: string;
129
+
130
+ /**
131
+ * Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if
132
+ * any
133
+ */
134
+ emoji_status_expiration_date?: number;
135
+
136
+ /**
137
+ * Optional. Bio of the other party in a private chat
138
+ */
139
+ bio?: string;
140
+
141
+ /**
142
+ * Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id>
143
+ * links only in chats with the user
144
+ */
145
+ has_private_forwards?: boolean;
146
+
147
+ /**
148
+ * Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the
149
+ * private chat
150
+ */
151
+ has_restricted_voice_and_video_messages?: boolean;
152
+
153
+ /**
154
+ * Optional. True, if users need to join the supergroup before they can send messages
155
+ */
156
+ join_to_send_messages?: boolean;
157
+
158
+ /**
159
+ * Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by
160
+ * supergroup administrators
161
+ */
162
+ join_by_request?: boolean;
163
+
164
+ /**
165
+ * Optional. Description, for groups, supergroups and channel chats
166
+ */
167
+ description?: string;
168
+
169
+ /**
170
+ * Optional. Primary invite link, for groups, supergroups and channel chats
171
+ */
172
+ invite_link?: string;
173
+
174
+ /**
175
+ * Optional. The most recent pinned message (by sending date)
176
+ */
177
+ pinned_message?: Message;
178
+
179
+ /**
180
+ * Optional. Default chat member permissions, for groups and supergroups
181
+ */
182
+ permissions?: ChatPermissions;
183
+
184
+ /**
185
+ * Information about types of gifts that are accepted by the chat or by the corresponding user for private chats
186
+ */
187
+ accepted_gift_types: AcceptedGiftTypes;
188
+
189
+ /**
190
+ * Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only
191
+ * for channel chats.
192
+ */
193
+ can_send_paid_media?: boolean;
194
+
195
+ /**
196
+ * Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user;
197
+ * in seconds
198
+ */
199
+ slow_mode_delay?: number;
200
+ /**
201
+ * Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to
202
+ * ignore slow mode and chat permissions
203
+ */
204
+ unrestrict_boost_count?: number;
205
+
206
+ /**
207
+ * Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds
208
+ */
209
+ message_auto_delete_time?: number;
210
+
211
+ /**
212
+ * Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat
213
+ * administrators.
214
+ */
215
+ has_aggressive_anti_spam_enabled?: boolean;
216
+
217
+ /**
218
+ * Optional. True, if non-administrators can only get the list of bots and administrators in the chat
219
+ */
220
+ has_hidden_members?: boolean;
221
+
222
+ /**
223
+ * Optional. True, if messages from the chat can't be forwarded to other chats
224
+ */
225
+ has_protected_content?: boolean;
226
+
227
+ /**
228
+ * Optional. True, if new chat members will have access to old messages; available only to chat administrators
229
+ */
230
+ has_visible_history?: boolean;
231
+
232
+ /**
233
+ * Optional. For supergroups, name of the group sticker set
234
+ */
235
+ sticker_set_name?: string;
236
+
237
+ /**
238
+ * Optional. True, if the bot can change the group sticker set
239
+ */
240
+ can_set_sticker_set?: boolean;
241
+
242
+ /**
243
+ * Optional. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used
244
+ * by all users and bots in the group.
245
+ */
246
+ custom_emoji_sticker_set_name?: string;
247
+
248
+ /**
249
+ * Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice
250
+ * versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming
251
+ * languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed
252
+ * 64 bit integer or double-precision float type are safe for storing this identifier.
253
+ */
254
+ linked_chat_id?: number;
255
+
256
+ /**
257
+ * Optional. For supergroups, the location to which the supergroup is connected
258
+ */
259
+ location?: ChatLocation;
260
+ };
@@ -0,0 +1,66 @@
1
+ import type { User } from "./";
2
+
3
+ /**
4
+ * ## ChatInviteLink
5
+ * Represents an invite link for a chat.
6
+ * @see https://core.telegram.org/bots/api#chatinvitelink
7
+ */
8
+ export type ChatInviteLink = {
9
+ /**
10
+ * The invite link. If the link was created by another chat administrator, then the second part of the link will be
11
+ * replaced with “…”.
12
+ */
13
+ invite_link: string;
14
+
15
+ /**
16
+ * Creator of the link
17
+ */
18
+ creator: User;
19
+
20
+ /**
21
+ * True, if users joining the chat via the link need to be approved by chat administrators
22
+ */
23
+ creates_join_request: boolean;
24
+
25
+ /**
26
+ * True, if the link is primary
27
+ */
28
+ is_primary: boolean;
29
+
30
+ /**
31
+ * True, if the link is revoked
32
+ */
33
+ is_revoked: boolean;
34
+
35
+ /**
36
+ * Optional. Invite link name
37
+ */
38
+ name?: string;
39
+
40
+ /**
41
+ * Optional. Point in time (Unix timestamp) when the link will expire or has been expired
42
+ */
43
+ expire_date?: number;
44
+
45
+ /**
46
+ * Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via
47
+ * this invite link; 1-99999
48
+ */
49
+ member_limit?: number;
50
+
51
+ /**
52
+ * Optional. Number of pending join requests created using this link
53
+ */
54
+ pending_join_request_count?: number;
55
+
56
+ /**
57
+ * Optional. The number of seconds the subscription will be active for before the next payment
58
+ */
59
+ subscription_period?: number;
60
+
61
+ /**
62
+ * Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to
63
+ * be a member of the chat using the link
64
+ */
65
+ subscription_price?: number;
66
+ };
@@ -0,0 +1,42 @@
1
+ import type { Chat, ChatInviteLink, User } from "./";
2
+
3
+ /**
4
+ * ## ChatJoinRequest
5
+ * Represents a join request sent to a chat.
6
+ * @see https://core.telegram.org/bots/api#chatjoinrequest
7
+ */
8
+ export type ChatJoinRequest = {
9
+ /**
10
+ * Chat to which the request was sent
11
+ */
12
+ chat: Chat;
13
+
14
+ /**
15
+ * User that sent the join request
16
+ */
17
+ from: User;
18
+
19
+ /**
20
+ * Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant
21
+ * bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52
22
+ * significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot
23
+ * can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other
24
+ * administrator contacted the user.
25
+ */
26
+ user_chat_id: number;
27
+
28
+ /**
29
+ * Date the request was sent in Unix time
30
+ */
31
+ date: number;
32
+
33
+ /**
34
+ * Optional. Bio of the user.
35
+ */
36
+ bio?: string;
37
+
38
+ /**
39
+ * Optional. Chat invite link that was used by the user to send the join request
40
+ */
41
+ invite_link?: ChatInviteLink;
42
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ## ChatLocation
3
+ * Represents a location to which a chat is connected.
4
+ * @see https://core.telegram.org/bots/api#chatlocation
5
+ */
6
+ export type ChatLocation = {
7
+ /**
8
+ * The location to which the supergroup is connected. Can't be a live location.
9
+ */
10
+ location: Location;
11
+
12
+ /**
13
+ * Location address; 1-64 characters, as defined by the chat owner
14
+ */
15
+ address: string;
16
+ };
@@ -0,0 +1,28 @@
1
+ import type {
2
+ ChatMemberAdministrator,
3
+ ChatMemberBanned,
4
+ ChatMemberLeft,
5
+ ChatMemberMember,
6
+ ChatMemberOwner,
7
+ ChatMemberRestricted,
8
+ } from "./";
9
+
10
+ /**
11
+ * ## ChatMember
12
+ * This object contains information about one member of a chat. Currently, the following 6 types of chat members are
13
+ * supported:
14
+ * - ChatMemberOwner
15
+ * - ChatMemberAdministrator
16
+ * - ChatMemberMember
17
+ * - ChatMemberRestricted
18
+ * - ChatMemberLeft
19
+ * - ChatMemberBanned
20
+ * @see https://core.telegram.org/bots/api#chatmember
21
+ */
22
+ export type ChatMember =
23
+ | ChatMemberOwner
24
+ | ChatMemberAdministrator
25
+ | ChatMemberMember
26
+ | ChatMemberRestricted
27
+ | ChatMemberLeft
28
+ | ChatMemberBanned;
@@ -0,0 +1,107 @@
1
+ import type { User } from "./";
2
+
3
+ /**
4
+ * ## ChatMemberAdministrator
5
+ * Represents a chat member that has some additional privileges.
6
+ * @see https://core.telegram.org/bots/api#chatmemberadministrator
7
+ */
8
+ export type ChatMemberAdministrator = {
9
+ /**
10
+ * The member's status in the chat, always “administrator”
11
+ */
12
+ status: "administrator";
13
+
14
+ /**
15
+ * Information about the user
16
+ */
17
+ user: User;
18
+
19
+ /**
20
+ * True, if the bot is allowed to edit administrator privileges of that user
21
+ */
22
+ can_be_edited: boolean;
23
+
24
+ /**
25
+ * True, if the user's presence in the chat is hidden
26
+ */
27
+ is_anonymous: boolean;
28
+ /**
29
+ * True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel
30
+ * members, report spam messages and ignore slow mode. Implied by any other administrator privilege.
31
+ */
32
+ can_manage_chat: boolean;
33
+
34
+ /**
35
+ * True, if the administrator can delete messages of other users
36
+ */
37
+ can_delete_messages: boolean;
38
+
39
+ /**
40
+ * True, if the administrator can manage video chats
41
+ */
42
+ can_manage_video_chats: boolean;
43
+
44
+ /**
45
+ * True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics
46
+ */
47
+ can_restrict_members: boolean;
48
+
49
+ /**
50
+ * True, if the administrator can add new administrators with a subset of their own privileges or demote
51
+ * administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by
52
+ * the user)
53
+ */
54
+ can_promote_members: boolean;
55
+
56
+ /**
57
+ * True, if the user is allowed to change the chat title, photo and other settings
58
+ */
59
+ can_change_info: boolean;
60
+
61
+ /**
62
+ * True, if the user is allowed to invite new users to the chat
63
+ */
64
+ can_invite_users: boolean;
65
+
66
+ /**
67
+ * True, if the administrator can post stories to the chat
68
+ */
69
+ can_post_stories: boolean;
70
+
71
+ /**
72
+ * True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories,
73
+ * and access the chat's story archive
74
+ */
75
+ can_edit_stories: boolean;
76
+
77
+ /**
78
+ * True, if the administrator can delete stories posted by other users
79
+ */
80
+ can_delete_stories: boolean;
81
+
82
+ /**
83
+ * Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels
84
+ * only
85
+ */
86
+ can_post_messages: boolean;
87
+
88
+ /**
89
+ * Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only
90
+ */
91
+ can_edit_messages: boolean;
92
+
93
+ /**
94
+ * Optional. True, if the user is allowed to pin messages; for groups and supergroups only
95
+ */
96
+ can_pin_messages: boolean;
97
+
98
+ /**
99
+ * Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only
100
+ */
101
+ can_manage_topics: boolean;
102
+
103
+ /**
104
+ * Optional. Custom title for this user
105
+ */
106
+ custom_title?: string;
107
+ };
@@ -0,0 +1,23 @@
1
+ import type { User } from "./";
2
+
3
+ /**
4
+ * ## ChatMemberBanned
5
+ * Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.
6
+ * @see https://core.telegram.org/bots/api#chatmemberbanned
7
+ */
8
+ export type ChatMemberBanned = {
9
+ /**
10
+ * The member's status in the chat, always “kicked”
11
+ */
12
+ status: "kicked";
13
+
14
+ /**
15
+ * Information about the user
16
+ */
17
+ user: User;
18
+
19
+ /**
20
+ * Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever
21
+ */
22
+ until_date: number;
23
+ };
@@ -0,0 +1,18 @@
1
+ import type { User } from "./";
2
+
3
+ /**
4
+ * ## ChatMemberLeft
5
+ * Represents a chat member that isn't currently a member of the chat, but may join it themselves.
6
+ * @see https://core.telegram.org/bots/api#chatmemberleft
7
+ */
8
+ export type ChatMemberLeft = {
9
+ /**
10
+ * The member's status in the chat, always “left”
11
+ */
12
+ status: "left";
13
+
14
+ /**
15
+ * Information about the user
16
+ */
17
+ user: User;
18
+ };
@@ -0,0 +1,23 @@
1
+ import type { User } from "./";
2
+
3
+ /**
4
+ * ## ChatMemberMember
5
+ * Represents a chat member that has no additional privileges or restrictions.
6
+ * @see https://core.telegram.org/bots/api#chatmembermember
7
+ */
8
+ export type ChatMemberMember = {
9
+ /**
10
+ * The member's status in the chat, always “member”
11
+ */
12
+ status: "member";
13
+
14
+ /**
15
+ * Information about the user
16
+ */
17
+ user: User;
18
+
19
+ /**
20
+ * Optional. Date when the user's subscription will expire; Unix time
21
+ */
22
+ until_date?: number;
23
+ };
@@ -0,0 +1,28 @@
1
+ import type { User } from "./";
2
+
3
+ /**
4
+ * ## ChatMemberOwner
5
+ * Represents a chat member that owns the chat and has all administrator privileges.
6
+ * @see https://core.telegram.org/bots/api#chatmemberowner
7
+ */
8
+ export type ChatMemberOwner = {
9
+ /**
10
+ * The member's status in the chat, always “creator”
11
+ */
12
+ status: "creator";
13
+
14
+ /**
15
+ * Information about the user
16
+ */
17
+ user: User;
18
+
19
+ /**
20
+ * True, if the user's presence in the chat is hidden
21
+ */
22
+ is_anonymous: boolean;
23
+
24
+ /**
25
+ * Optional. Custom title for this user
26
+ */
27
+ custom_title?: string;
28
+ };