@grammyjs/types 3.2.2 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/manage.d.ts +19 -7
- package/message.d.ts +7 -3
- package/methods.d.ts +12 -6
- package/package.json +1 -1
package/manage.d.ts
CHANGED
|
@@ -208,13 +208,13 @@ export interface ChatInviteLink {
|
|
|
208
208
|
export interface ChatAdministratorRights {
|
|
209
209
|
/** True, if the user's presence in the chat is hidden */
|
|
210
210
|
is_anonymous: boolean;
|
|
211
|
-
/** True, if the administrator can access the chat event log,
|
|
211
|
+
/** True, if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
|
|
212
212
|
can_manage_chat: boolean;
|
|
213
213
|
/** True, if the administrator can delete messages of other users */
|
|
214
214
|
can_delete_messages: boolean;
|
|
215
215
|
/** True, if the administrator can manage video chats */
|
|
216
216
|
can_manage_video_chats: boolean;
|
|
217
|
-
/** True, if the administrator can restrict, ban or unban chat members */
|
|
217
|
+
/** True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics */
|
|
218
218
|
can_restrict_members: boolean;
|
|
219
219
|
/** 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) */
|
|
220
220
|
can_promote_members: boolean;
|
|
@@ -222,12 +222,18 @@ export interface ChatAdministratorRights {
|
|
|
222
222
|
can_change_info: boolean;
|
|
223
223
|
/** True, if the user is allowed to invite new users to the chat */
|
|
224
224
|
can_invite_users: boolean;
|
|
225
|
-
/** True, if the administrator can post in the channel; channels only */
|
|
225
|
+
/** True, if the administrator can post messages in the channel, or access channel statistics; channels only */
|
|
226
226
|
can_post_messages?: boolean;
|
|
227
227
|
/** True, if the administrator can edit messages of other users and can pin messages; channels only */
|
|
228
228
|
can_edit_messages?: boolean;
|
|
229
229
|
/** True, if the user is allowed to pin messages; groups and supergroups only */
|
|
230
230
|
can_pin_messages?: boolean;
|
|
231
|
+
/** True, if the administrator can post stories in the channel; channels only */
|
|
232
|
+
can_post_stories?: boolean;
|
|
233
|
+
/** True, if the administrator can edit stories posted by other users; channels only */
|
|
234
|
+
can_edit_stories?: boolean;
|
|
235
|
+
/** True, if the administrator can delete stories posted by other users; channels only */
|
|
236
|
+
can_delete_stories?: boolean;
|
|
231
237
|
/** True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */
|
|
232
238
|
can_manage_topics?: boolean;
|
|
233
239
|
}
|
|
@@ -260,13 +266,13 @@ export interface ChatMemberAdministrator {
|
|
|
260
266
|
can_be_edited: boolean;
|
|
261
267
|
/** True, if the user's presence in the chat is hidden */
|
|
262
268
|
is_anonymous: boolean;
|
|
263
|
-
/** True, if the administrator can access the chat event log,
|
|
269
|
+
/** True, if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
|
|
264
270
|
can_manage_chat: boolean;
|
|
265
271
|
/** True, if the administrator can delete messages of other users */
|
|
266
272
|
can_delete_messages: boolean;
|
|
267
273
|
/** True, if the administrator can manage video chats */
|
|
268
274
|
can_manage_video_chats: boolean;
|
|
269
|
-
/** True, if the administrator can restrict, ban or unban chat members */
|
|
275
|
+
/** True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics */
|
|
270
276
|
can_restrict_members: boolean;
|
|
271
277
|
/** 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) */
|
|
272
278
|
can_promote_members: boolean;
|
|
@@ -274,12 +280,18 @@ export interface ChatMemberAdministrator {
|
|
|
274
280
|
can_change_info: boolean;
|
|
275
281
|
/** True, if the user is allowed to invite new users to the chat */
|
|
276
282
|
can_invite_users: boolean;
|
|
277
|
-
/** True, if the administrator can post in the channel; channels only */
|
|
283
|
+
/** True, if the administrator can post messages in the channel, or access channel statistics; channels only */
|
|
278
284
|
can_post_messages?: boolean;
|
|
279
285
|
/** True, if the administrator can edit messages of other users and can pin messages; channels only */
|
|
280
286
|
can_edit_messages?: boolean;
|
|
281
287
|
/** True, if the user is allowed to pin messages; groups and supergroups only */
|
|
282
288
|
can_pin_messages?: boolean;
|
|
289
|
+
/** True, if the administrator can post stories in the channel; channels only */
|
|
290
|
+
can_post_stories?: boolean;
|
|
291
|
+
/** True, if the administrator can edit stories posted by other users; channels only */
|
|
292
|
+
can_edit_stories?: boolean;
|
|
293
|
+
/** True, if the administrator can delete stories posted by other users; channels only */
|
|
294
|
+
can_delete_stories?: boolean;
|
|
283
295
|
/** True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */
|
|
284
296
|
can_manage_topics?: boolean;
|
|
285
297
|
/** Custom title for this user */
|
|
@@ -370,7 +382,7 @@ export interface ChatJoinRequest {
|
|
|
370
382
|
chat: Chat.SupergroupChat | Chat.ChannelChat;
|
|
371
383
|
/** User that sent the join request */
|
|
372
384
|
from: User;
|
|
373
|
-
/** Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for
|
|
385
|
+
/** Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user. */
|
|
374
386
|
user_chat_id: number;
|
|
375
387
|
/** Date the request was sent in Unix time */
|
|
376
388
|
date: number;
|
package/message.d.ts
CHANGED
|
@@ -180,7 +180,7 @@ export interface Message extends Message.MediaMessage {
|
|
|
180
180
|
chat_shared?: ChatShared;
|
|
181
181
|
/** The domain name of the website on which the user has logged in. More about Telegram Login » */
|
|
182
182
|
connected_website?: string;
|
|
183
|
-
/** Service message: the user allowed the bot
|
|
183
|
+
/** Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess */
|
|
184
184
|
write_access_allowed?: WriteAccessAllowed;
|
|
185
185
|
/** Telegram Passport data */
|
|
186
186
|
passport_data?: PassportData;
|
|
@@ -627,10 +627,14 @@ export interface ChatShared {
|
|
|
627
627
|
/** Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means. */
|
|
628
628
|
chat_id: number;
|
|
629
629
|
}
|
|
630
|
-
/** This object represents a service message about a user allowing a bot to write messages after adding
|
|
630
|
+
/** This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess. */
|
|
631
631
|
export interface WriteAccessAllowed {
|
|
632
|
-
/**
|
|
632
|
+
/** True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess */
|
|
633
|
+
from_request?: boolean;
|
|
634
|
+
/** Name of the Web App, if the access was granted when the Web App was launched from a link */
|
|
633
635
|
web_app_name?: string;
|
|
636
|
+
/** True, if the access was granted when the bot was added to the attachment or side menu */
|
|
637
|
+
from_attachment_menu?: boolean;
|
|
634
638
|
}
|
|
635
639
|
/** This object represents a service message about a video chat scheduled in the chat. */
|
|
636
640
|
export interface VideoChatScheduled {
|
package/methods.d.ts
CHANGED
|
@@ -624,17 +624,13 @@ export type ApiMethods<F> = {
|
|
|
624
624
|
user_id: number;
|
|
625
625
|
/** Pass True if the administrator's presence in the chat is hidden */
|
|
626
626
|
is_anonymous?: boolean;
|
|
627
|
-
/** Pass True if the administrator can access the chat event log,
|
|
627
|
+
/** Pass True if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
|
|
628
628
|
can_manage_chat?: boolean;
|
|
629
|
-
/** Pass True if the administrator can create channel posts, channels only */
|
|
630
|
-
can_post_messages?: boolean;
|
|
631
|
-
/** Pass True if the administrator can edit messages of other users and can pin messages, channels only */
|
|
632
|
-
can_edit_messages?: boolean;
|
|
633
629
|
/** Pass True if the administrator can delete messages of other users */
|
|
634
630
|
can_delete_messages?: boolean;
|
|
635
631
|
/** Pass True if the administrator can manage video chats */
|
|
636
632
|
can_manage_video_chats?: boolean;
|
|
637
|
-
/** Pass True if the administrator can restrict, ban or unban chat members */
|
|
633
|
+
/** Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics */
|
|
638
634
|
can_restrict_members?: boolean;
|
|
639
635
|
/** Pass 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 him) */
|
|
640
636
|
can_promote_members?: boolean;
|
|
@@ -642,8 +638,18 @@ export type ApiMethods<F> = {
|
|
|
642
638
|
can_change_info?: boolean;
|
|
643
639
|
/** Pass True if the administrator can invite new users to the chat */
|
|
644
640
|
can_invite_users?: boolean;
|
|
641
|
+
/** Pass True if the administrator can post messages in the channel, or access channel statistics; channels only */
|
|
642
|
+
can_post_messages?: boolean;
|
|
643
|
+
/** Pass True if the administrator can edit messages of other users and can pin messages; channels only */
|
|
644
|
+
can_edit_messages?: boolean;
|
|
645
645
|
/** Pass True if the administrator can pin messages, supergroups only */
|
|
646
646
|
can_pin_messages?: boolean;
|
|
647
|
+
/** Pass True if the administrator can post stories in the channel; channels only */
|
|
648
|
+
can_post_stories?: boolean;
|
|
649
|
+
/** Pass True if the administrator can edit stories posted by other users; channels only */
|
|
650
|
+
can_edit_stories?: boolean;
|
|
651
|
+
/** Pass True if the administrator can delete stories posted by other users; channels only */
|
|
652
|
+
can_delete_stories?: boolean;
|
|
647
653
|
/** Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only */
|
|
648
654
|
can_manage_topics?: boolean;
|
|
649
655
|
}): true;
|