@grammyjs/types 3.6.2 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/inline.d.ts +30 -14
- package/manage.d.ts +400 -102
- package/markup.d.ts +14 -14
- package/message.d.ts +148 -29
- package/methods.d.ts +104 -40
- package/package.json +1 -1
- package/payment.d.ts +3 -3
- package/update.d.ts +1 -1
package/manage.d.ts
CHANGED
|
@@ -54,148 +54,439 @@ export interface UserFromGetMe extends User {
|
|
|
54
54
|
can_connect_to_business?: boolean;
|
|
55
55
|
}
|
|
56
56
|
export declare namespace Chat {
|
|
57
|
-
/** Internal type
|
|
58
|
-
interface
|
|
57
|
+
/** Internal type for private chats */
|
|
58
|
+
interface PrivateChat {
|
|
59
59
|
/** Unique identifier for this chat. */
|
|
60
60
|
id: number;
|
|
61
|
-
/** Type of chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
62
|
-
type:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
interface UserNameChat {
|
|
61
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
62
|
+
type: "private";
|
|
63
|
+
/** Title, for supergroups, channels and group chats */
|
|
64
|
+
title?: undefined;
|
|
66
65
|
/** Username, for private chats, supergroups and channels if available */
|
|
67
66
|
username?: string;
|
|
68
|
-
}
|
|
69
|
-
/** Internal type holding properties that those chats with titles share. */
|
|
70
|
-
interface TitleChat {
|
|
71
|
-
/** Title, for supergroups, channels and group chats */
|
|
72
|
-
title: string;
|
|
73
|
-
}
|
|
74
|
-
/** Internal type representing private chats. */
|
|
75
|
-
interface PrivateChat extends AbstractChat, UserNameChat {
|
|
76
|
-
type: "private";
|
|
77
67
|
/** First name of the other party in a private chat */
|
|
78
68
|
first_name: string;
|
|
79
69
|
/** Last name of the other party in a private chat */
|
|
80
70
|
last_name?: string;
|
|
71
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
72
|
+
is_forum?: undefined;
|
|
81
73
|
}
|
|
82
|
-
/** Internal type
|
|
83
|
-
interface GroupChat
|
|
74
|
+
/** Internal type for group chats */
|
|
75
|
+
interface GroupChat {
|
|
76
|
+
/** Unique identifier for this chat. */
|
|
77
|
+
id: number;
|
|
78
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
84
79
|
type: "group";
|
|
80
|
+
/** Title, for supergroups, channels and group chats */
|
|
81
|
+
title: string;
|
|
82
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
83
|
+
username?: undefined;
|
|
84
|
+
/** First name of the other party in a private chat */
|
|
85
|
+
first_name?: undefined;
|
|
86
|
+
/** Last name of the other party in a private chat */
|
|
87
|
+
last_name?: undefined;
|
|
88
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
89
|
+
is_forum?: undefined;
|
|
85
90
|
}
|
|
86
|
-
/** Internal type
|
|
87
|
-
interface SupergroupChat
|
|
91
|
+
/** Internal type for supergroup chats */
|
|
92
|
+
interface SupergroupChat {
|
|
93
|
+
/** Unique identifier for this chat. */
|
|
94
|
+
id: number;
|
|
95
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
88
96
|
type: "supergroup";
|
|
97
|
+
/** Title, for supergroups, channels and group chats */
|
|
98
|
+
title: string;
|
|
99
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
100
|
+
username?: string;
|
|
101
|
+
/** First name of the other party in a private chat */
|
|
102
|
+
first_name?: undefined;
|
|
103
|
+
/** Last name of the other party in a private chat */
|
|
104
|
+
last_name?: undefined;
|
|
89
105
|
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
90
106
|
is_forum?: true;
|
|
91
107
|
}
|
|
92
|
-
/** Internal type
|
|
93
|
-
interface ChannelChat
|
|
108
|
+
/** Internal type for channel chats */
|
|
109
|
+
interface ChannelChat {
|
|
110
|
+
/** Unique identifier for this chat. */
|
|
111
|
+
id: number;
|
|
112
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
94
113
|
type: "channel";
|
|
114
|
+
/** Title, for supergroups, channels and group chats */
|
|
115
|
+
title: string;
|
|
116
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
117
|
+
username?: string;
|
|
118
|
+
/** First name of the other party in a private chat */
|
|
119
|
+
first_name?: undefined;
|
|
120
|
+
/** Last name of the other party in a private chat */
|
|
121
|
+
last_name?: undefined;
|
|
122
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
123
|
+
is_forum?: undefined;
|
|
95
124
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
125
|
+
}
|
|
126
|
+
/** This object represents a chat. */
|
|
127
|
+
export type Chat = Chat.PrivateChat | Chat.GroupChat | Chat.SupergroupChat | Chat.ChannelChat;
|
|
128
|
+
export declare namespace ChatFullInfo {
|
|
129
|
+
/** Internal type for private chats */
|
|
130
|
+
interface PrivateChat {
|
|
131
|
+
/** Unique identifier for this chat. */
|
|
132
|
+
id: number;
|
|
133
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
134
|
+
type: "private";
|
|
135
|
+
/** Title, for supergroups, channels and group chats */
|
|
136
|
+
title?: undefined;
|
|
137
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
138
|
+
username?: string;
|
|
139
|
+
/** First name of the other party in a private chat */
|
|
140
|
+
first_name: string;
|
|
141
|
+
/** Last name of the other party in a private chat */
|
|
142
|
+
last_name?: string;
|
|
143
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
144
|
+
is_forum?: undefined;
|
|
145
|
+
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
|
|
146
|
+
accent_color_id: number;
|
|
147
|
+
/** The maximum number of reactions that can be set on a message in the chat */
|
|
148
|
+
max_reaction_count: number;
|
|
149
|
+
/** Chat photo */
|
|
99
150
|
photo?: ChatPhoto;
|
|
100
|
-
/**
|
|
151
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
|
|
152
|
+
active_usernames?: string[];
|
|
153
|
+
/** For private chats, the date of birth of the user */
|
|
154
|
+
birthdate?: Birthdate;
|
|
155
|
+
/** For private chats with business accounts, the intro of the business */
|
|
156
|
+
business_intro?: BusinessIntro;
|
|
157
|
+
/** For private chats with business accounts, the location of the business */
|
|
158
|
+
business_location?: BusinessLocation;
|
|
159
|
+
/** For private chats with business accounts, the opening hours of the business */
|
|
160
|
+
business_opening_hours?: BusinessOpeningHours;
|
|
161
|
+
/** For private chats, the personal channel of the user */
|
|
162
|
+
personal_chat?: Chat;
|
|
163
|
+
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
|
|
164
|
+
available_reactions?: ReactionType[];
|
|
165
|
+
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
|
|
166
|
+
background_custom_emoji_id?: string;
|
|
167
|
+
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
|
|
168
|
+
profile_accent_color_id?: number;
|
|
169
|
+
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
170
|
+
profile_background_custom_emoji_id?: string;
|
|
171
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
172
|
+
emoji_status_custom_emoji_id?: string;
|
|
173
|
+
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
174
|
+
emoji_status_expiration_date?: number;
|
|
175
|
+
/** Bio of the other party in a private chat */
|
|
176
|
+
bio?: string;
|
|
177
|
+
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
|
|
178
|
+
has_private_forwards?: true;
|
|
179
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
|
|
180
|
+
has_restricted_voice_and_video_messages?: true;
|
|
181
|
+
/** True, if users need to join the supergroup before they can send messages */
|
|
182
|
+
join_to_send_messages?: undefined;
|
|
183
|
+
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
|
|
184
|
+
join_by_request?: undefined;
|
|
185
|
+
/** Description, for groups, supergroups and channel chats */
|
|
186
|
+
description?: undefined;
|
|
187
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
188
|
+
invite_link?: undefined;
|
|
189
|
+
/** The most recent pinned message (by sending date) */
|
|
101
190
|
pinned_message?: Message;
|
|
102
|
-
/**
|
|
191
|
+
/** Default chat member permissions, for groups and supergroups */
|
|
192
|
+
permissions?: undefined;
|
|
193
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
194
|
+
slow_mode_delay?: undefined;
|
|
195
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
196
|
+
unrestrict_boost_count?: undefined;
|
|
197
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
103
198
|
message_auto_delete_time?: number;
|
|
104
|
-
/** True, if
|
|
199
|
+
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
200
|
+
has_aggressive_anti_spam_enabled?: undefined;
|
|
201
|
+
/** True, if non-administrators can only get the list of bots and administrators in the chat */
|
|
202
|
+
has_hidden_members?: undefined;
|
|
203
|
+
/** True, if messages from the chat can't be forwarded to other chats */
|
|
105
204
|
has_protected_content?: true;
|
|
205
|
+
/** True, if new chat members will have access to old messages; available only to chat administrators */
|
|
206
|
+
has_visible_history?: undefined;
|
|
207
|
+
/** For supergroups, name of the group sticker set */
|
|
208
|
+
sticker_set_name?: undefined;
|
|
209
|
+
/** True, if the bot can change the group sticker set */
|
|
210
|
+
can_set_sticker_set?: undefined;
|
|
211
|
+
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
|
|
212
|
+
custom_emoji_sticker_set_name?: undefined;
|
|
213
|
+
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
|
|
214
|
+
linked_chat_id?: undefined;
|
|
215
|
+
/** For supergroups, the location to which the supergroup is connected */
|
|
216
|
+
location?: undefined;
|
|
106
217
|
}
|
|
107
|
-
/** Internal type
|
|
108
|
-
interface
|
|
109
|
-
/**
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
218
|
+
/** Internal type for group chats */
|
|
219
|
+
interface GroupChat {
|
|
220
|
+
/** Unique identifier for this chat. */
|
|
221
|
+
id: number;
|
|
222
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
223
|
+
type: "group";
|
|
224
|
+
/** Title, for supergroups, channels and group chats */
|
|
225
|
+
title?: string;
|
|
226
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
227
|
+
username?: undefined;
|
|
228
|
+
/** First name of the other party in a private chat */
|
|
229
|
+
first_name?: undefined;
|
|
230
|
+
/** Last name of the other party in a private chat */
|
|
231
|
+
last_name?: undefined;
|
|
232
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
233
|
+
is_forum?: undefined;
|
|
234
|
+
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
|
|
235
|
+
accent_color_id: number;
|
|
236
|
+
/** The maximum number of reactions that can be set on a message in the chat */
|
|
237
|
+
max_reaction_count: number;
|
|
238
|
+
/** Chat photo */
|
|
239
|
+
photo?: ChatPhoto;
|
|
240
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
|
|
241
|
+
active_usernames?: undefined;
|
|
242
|
+
/** For private chats, the date of birth of the user */
|
|
243
|
+
birthdate?: undefined;
|
|
244
|
+
/** For private chats with business accounts, the intro of the business */
|
|
245
|
+
business_intro?: undefined;
|
|
246
|
+
/** For private chats with business accounts, the location of the business */
|
|
247
|
+
business_location?: undefined;
|
|
248
|
+
/** For private chats with business accounts, the opening hours of the business */
|
|
249
|
+
business_opening_hours?: undefined;
|
|
250
|
+
/** For private chats, the personal channel of the user */
|
|
251
|
+
personal_chat?: undefined;
|
|
252
|
+
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
|
|
253
|
+
available_reactions?: ReactionType[];
|
|
254
|
+
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
|
|
255
|
+
background_custom_emoji_id?: string;
|
|
256
|
+
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
|
|
257
|
+
profile_accent_color_id?: number;
|
|
258
|
+
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
259
|
+
profile_background_custom_emoji_id?: string;
|
|
260
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
261
|
+
emoji_status_custom_emoji_id?: string;
|
|
262
|
+
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
263
|
+
emoji_status_expiration_date?: number;
|
|
264
|
+
/** Bio of the other party in a private chat */
|
|
265
|
+
bio?: undefined;
|
|
266
|
+
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
|
|
267
|
+
has_private_forwards?: undefined;
|
|
268
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
|
|
269
|
+
has_restricted_voice_and_video_messages?: undefined;
|
|
270
|
+
/** True, if users need to join the supergroup before they can send messages */
|
|
271
|
+
join_to_send_messages?: undefined;
|
|
272
|
+
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
|
|
273
|
+
join_by_request?: undefined;
|
|
274
|
+
/** Description, for groups, supergroups and channel chats */
|
|
115
275
|
description?: string;
|
|
116
|
-
/**
|
|
276
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
117
277
|
invite_link?: string;
|
|
118
|
-
/**
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
/** Internal type holding properties that those group and supergroup chats returned from `getChat` share. */
|
|
122
|
-
interface MultiUserGetChat {
|
|
123
|
-
/** Default chat member permissions, for groups and supergroups. Returned only in getChat. */
|
|
278
|
+
/** The most recent pinned message (by sending date) */
|
|
279
|
+
pinned_message?: Message;
|
|
280
|
+
/** Default chat member permissions, for groups and supergroups */
|
|
124
281
|
permissions?: ChatPermissions;
|
|
282
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
283
|
+
slow_mode_delay?: undefined;
|
|
284
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
285
|
+
unrestrict_boost_count?: undefined;
|
|
286
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
287
|
+
message_auto_delete_time?: number;
|
|
288
|
+
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
289
|
+
has_aggressive_anti_spam_enabled?: undefined;
|
|
290
|
+
/** True, if non-administrators can only get the list of bots and administrators in the chat */
|
|
291
|
+
has_hidden_members?: true;
|
|
292
|
+
/** True, if messages from the chat can't be forwarded to other chats */
|
|
293
|
+
has_protected_content?: true;
|
|
294
|
+
/** True, if new chat members will have access to old messages; available only to chat administrators */
|
|
295
|
+
has_visible_history?: true;
|
|
296
|
+
/** For supergroups, name of the group sticker set */
|
|
297
|
+
sticker_set_name?: undefined;
|
|
298
|
+
/** True, if the bot can change the group sticker set */
|
|
299
|
+
can_set_sticker_set?: true;
|
|
300
|
+
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
|
|
301
|
+
custom_emoji_sticker_set_name?: undefined;
|
|
302
|
+
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
|
|
303
|
+
linked_chat_id?: undefined;
|
|
304
|
+
/** For supergroups, the location to which the supergroup is connected */
|
|
305
|
+
location?: undefined;
|
|
125
306
|
}
|
|
126
|
-
/** Internal type
|
|
127
|
-
interface
|
|
128
|
-
/**
|
|
307
|
+
/** Internal type for supergroup chats */
|
|
308
|
+
interface SupergroupChat {
|
|
309
|
+
/** Unique identifier for this chat. */
|
|
310
|
+
id: number;
|
|
311
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
312
|
+
type: "supergroup";
|
|
313
|
+
/** Title, for supergroups, channels and group chats */
|
|
314
|
+
title?: string;
|
|
315
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
316
|
+
username?: string;
|
|
317
|
+
/** First name of the other party in a private chat */
|
|
318
|
+
first_name?: undefined;
|
|
319
|
+
/** Last name of the other party in a private chat */
|
|
320
|
+
last_name?: undefined;
|
|
321
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
322
|
+
is_forum?: true;
|
|
323
|
+
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
|
|
129
324
|
accent_color_id: number;
|
|
130
|
-
/**
|
|
325
|
+
/** The maximum number of reactions that can be set on a message in the chat */
|
|
326
|
+
max_reaction_count: number;
|
|
327
|
+
/** Chat photo */
|
|
328
|
+
photo?: ChatPhoto;
|
|
329
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
|
|
330
|
+
active_usernames?: string[];
|
|
331
|
+
/** For private chats, the date of birth of the user */
|
|
332
|
+
birthdate?: undefined;
|
|
333
|
+
/** For private chats with business accounts, the intro of the business */
|
|
334
|
+
business_intro?: undefined;
|
|
335
|
+
/** For private chats with business accounts, the location of the business */
|
|
336
|
+
business_location?: undefined;
|
|
337
|
+
/** For private chats with business accounts, the opening hours of the business */
|
|
338
|
+
business_opening_hours?: undefined;
|
|
339
|
+
/** For private chats, the personal channel of the user */
|
|
340
|
+
personal_chat?: undefined;
|
|
341
|
+
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
|
|
342
|
+
available_reactions?: ReactionType[];
|
|
343
|
+
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
|
|
131
344
|
background_custom_emoji_id?: string;
|
|
132
|
-
/**
|
|
345
|
+
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
|
|
346
|
+
profile_accent_color_id?: number;
|
|
347
|
+
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
348
|
+
profile_background_custom_emoji_id?: string;
|
|
349
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
133
350
|
emoji_status_custom_emoji_id?: string;
|
|
134
|
-
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any
|
|
351
|
+
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
135
352
|
emoji_status_expiration_date?: number;
|
|
136
|
-
|
|
137
|
-
/** Internal type holding properties that those supergroup and channel chats returned from `getChat` share. */
|
|
138
|
-
interface LargeGetChat {
|
|
139
|
-
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. Returned only in getChat. */
|
|
140
|
-
linked_chat_id?: number;
|
|
141
|
-
}
|
|
142
|
-
/** Internal type representing private chats returned from `getChat`. */
|
|
143
|
-
interface PrivateGetChat extends PrivateChat, GetChat, NonGroupGetChat, NonMultiUserGetChat {
|
|
144
|
-
/** For private chats, the date of birth of the user. Returned only in getChat. */
|
|
145
|
-
birthdate?: Birthdate;
|
|
146
|
-
/** For private chats with business accounts, the intro of the business. Returned only in getChat. */
|
|
147
|
-
business_intro?: BusinessIntro;
|
|
148
|
-
/** For private chats with business accounts, the location of the business. Returned only in getChat. */
|
|
149
|
-
business_location?: BusinessLocation;
|
|
150
|
-
/** For private chats with business accounts, the opening hours of the business. Returned only in getChat. */
|
|
151
|
-
business_opening_hours?: BusinessOpeningHours;
|
|
152
|
-
/** For private chats, the personal channel of the user. Returned only in getChat. */
|
|
153
|
-
personal_chat?: Chat.ChannelChat;
|
|
154
|
-
/** Bio of the other party in a private chat. Returned only in getChat. */
|
|
353
|
+
/** Bio of the other party in a private chat */
|
|
155
354
|
bio?: string;
|
|
156
|
-
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user
|
|
157
|
-
has_private_forwards?:
|
|
158
|
-
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat
|
|
159
|
-
has_restricted_voice_and_video_messages?:
|
|
160
|
-
|
|
161
|
-
/** Internal type representing group chats returned from `getChat`. */
|
|
162
|
-
interface GroupGetChat extends GroupChat, GetChat, NonPrivateGetChat, MultiUserGetChat {
|
|
163
|
-
}
|
|
164
|
-
/** Internal type representing supergroup chats returned from `getChat`. */
|
|
165
|
-
interface SupergroupGetChat extends SupergroupChat, GetChat, NonGroupGetChat, NonPrivateGetChat, MultiUserGetChat, LargeGetChat {
|
|
166
|
-
/** True, if users need to join the supergroup before they can send messages. Returned only in getChat. */
|
|
355
|
+
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
|
|
356
|
+
has_private_forwards?: undefined;
|
|
357
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
|
|
358
|
+
has_restricted_voice_and_video_messages?: undefined;
|
|
359
|
+
/** True, if users need to join the supergroup before they can send messages */
|
|
167
360
|
join_to_send_messages?: true;
|
|
168
|
-
/** True, if all users directly joining the supergroup need to be approved by supergroup administrators
|
|
361
|
+
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
|
|
169
362
|
join_by_request?: true;
|
|
170
|
-
/**
|
|
363
|
+
/** Description, for groups, supergroups and channel chats */
|
|
364
|
+
description?: string;
|
|
365
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
366
|
+
invite_link?: string;
|
|
367
|
+
/** The most recent pinned message (by sending date) */
|
|
368
|
+
pinned_message?: Message;
|
|
369
|
+
/** Default chat member permissions, for groups and supergroups */
|
|
370
|
+
permissions?: ChatPermissions;
|
|
371
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
171
372
|
slow_mode_delay?: number;
|
|
172
|
-
/**
|
|
373
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
173
374
|
unrestrict_boost_count?: number;
|
|
174
|
-
/**
|
|
175
|
-
|
|
176
|
-
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.
|
|
375
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
376
|
+
message_auto_delete_time?: number;
|
|
377
|
+
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
177
378
|
has_aggressive_anti_spam_enabled?: true;
|
|
178
|
-
/**
|
|
379
|
+
/** True, if non-administrators can only get the list of bots and administrators in the chat */
|
|
380
|
+
has_hidden_members?: true;
|
|
381
|
+
/** True, if messages from the chat can't be forwarded to other chats */
|
|
382
|
+
has_protected_content?: true;
|
|
383
|
+
/** True, if new chat members will have access to old messages; available only to chat administrators */
|
|
384
|
+
has_visible_history?: true;
|
|
385
|
+
/** For supergroups, name of the group sticker set */
|
|
179
386
|
sticker_set_name?: string;
|
|
180
|
-
/** True, if the bot can change the group sticker set
|
|
387
|
+
/** True, if the bot can change the group sticker set */
|
|
181
388
|
can_set_sticker_set?: true;
|
|
182
|
-
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.
|
|
389
|
+
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
|
|
183
390
|
custom_emoji_sticker_set_name?: string;
|
|
184
|
-
/**
|
|
391
|
+
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
|
|
392
|
+
linked_chat_id?: number;
|
|
393
|
+
/** For supergroups, the location to which the supergroup is connected */
|
|
185
394
|
location?: ChatLocation;
|
|
186
395
|
}
|
|
187
|
-
/** Internal type
|
|
188
|
-
interface
|
|
189
|
-
/**
|
|
396
|
+
/** Internal type for channel chats */
|
|
397
|
+
interface ChannelChat {
|
|
398
|
+
/** Unique identifier for this chat. */
|
|
399
|
+
id: number;
|
|
400
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
401
|
+
type: "channel";
|
|
402
|
+
/** Title, for supergroups, channels and group chats */
|
|
403
|
+
title?: string;
|
|
404
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
405
|
+
username?: string;
|
|
406
|
+
/** First name of the other party in a private chat */
|
|
407
|
+
first_name?: undefined;
|
|
408
|
+
/** Last name of the other party in a private chat */
|
|
409
|
+
last_name?: undefined;
|
|
410
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
411
|
+
is_forum?: undefined;
|
|
412
|
+
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
|
|
413
|
+
accent_color_id: number;
|
|
414
|
+
/** The maximum number of reactions that can be set on a message in the chat */
|
|
415
|
+
max_reaction_count: number;
|
|
416
|
+
/** Chat photo */
|
|
417
|
+
photo?: ChatPhoto;
|
|
418
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
|
|
419
|
+
active_usernames?: string[];
|
|
420
|
+
/** For private chats, the date of birth of the user */
|
|
421
|
+
birthdate?: undefined;
|
|
422
|
+
/** For private chats with business accounts, the intro of the business */
|
|
423
|
+
business_intro?: undefined;
|
|
424
|
+
/** For private chats with business accounts, the location of the business */
|
|
425
|
+
business_location?: undefined;
|
|
426
|
+
/** For private chats with business accounts, the opening hours of the business */
|
|
427
|
+
business_opening_hours?: undefined;
|
|
428
|
+
/** For private chats, the personal channel of the user */
|
|
429
|
+
personal_chat?: undefined;
|
|
430
|
+
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
|
|
431
|
+
available_reactions?: ReactionType[];
|
|
432
|
+
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
|
|
433
|
+
background_custom_emoji_id?: string;
|
|
434
|
+
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
|
|
190
435
|
profile_accent_color_id?: number;
|
|
191
|
-
/** Custom emoji identifier of the emoji chosen by the chat for its profile background
|
|
436
|
+
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
192
437
|
profile_background_custom_emoji_id?: string;
|
|
438
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
439
|
+
emoji_status_custom_emoji_id?: string;
|
|
440
|
+
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
441
|
+
emoji_status_expiration_date?: number;
|
|
442
|
+
/** Bio of the other party in a private chat */
|
|
443
|
+
bio?: undefined;
|
|
444
|
+
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
|
|
445
|
+
has_private_forwards?: undefined;
|
|
446
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
|
|
447
|
+
has_restricted_voice_and_video_messages?: undefined;
|
|
448
|
+
/** True, if users need to join the supergroup before they can send messages */
|
|
449
|
+
join_to_send_messages?: true;
|
|
450
|
+
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
|
|
451
|
+
join_by_request?: undefined;
|
|
452
|
+
/** Description, for groups, supergroups and channel chats */
|
|
453
|
+
description?: string;
|
|
454
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
455
|
+
invite_link?: string;
|
|
456
|
+
/** The most recent pinned message (by sending date) */
|
|
457
|
+
pinned_message?: Message;
|
|
458
|
+
/** Default chat member permissions, for groups and supergroups */
|
|
459
|
+
permissions?: undefined;
|
|
460
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
461
|
+
slow_mode_delay?: undefined;
|
|
462
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
463
|
+
unrestrict_boost_count?: undefined;
|
|
464
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
465
|
+
message_auto_delete_time?: number;
|
|
466
|
+
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
467
|
+
has_aggressive_anti_spam_enabled?: undefined;
|
|
468
|
+
/** True, if non-administrators can only get the list of bots and administrators in the chat */
|
|
469
|
+
has_hidden_members?: undefined;
|
|
470
|
+
/** True, if messages from the chat can't be forwarded to other chats */
|
|
471
|
+
has_protected_content?: true;
|
|
472
|
+
/** True, if new chat members will have access to old messages; available only to chat administrators */
|
|
473
|
+
has_visible_history?: undefined;
|
|
474
|
+
/** For supergroups, name of the group sticker set */
|
|
475
|
+
sticker_set_name?: undefined;
|
|
476
|
+
/** True, if the bot can change the group sticker set */
|
|
477
|
+
can_set_sticker_set?: undefined;
|
|
478
|
+
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
|
|
479
|
+
custom_emoji_sticker_set_name?: undefined;
|
|
480
|
+
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
|
|
481
|
+
linked_chat_id?: number;
|
|
482
|
+
/** For supergroups, the location to which the supergroup is connected */
|
|
483
|
+
location?: undefined;
|
|
193
484
|
}
|
|
194
485
|
}
|
|
195
|
-
/** This object
|
|
196
|
-
export type
|
|
197
|
-
/**
|
|
198
|
-
export type ChatFromGetChat =
|
|
486
|
+
/** This object contains full information about a chat. */
|
|
487
|
+
export type ChatFullInfo = ChatFullInfo.PrivateChat | ChatFullInfo.GroupChat | ChatFullInfo.SupergroupChat | ChatFullInfo.ChannelChat;
|
|
488
|
+
/** @deprecated use ChatFullInfo instead */
|
|
489
|
+
export type ChatFromGetChat = ChatFullInfo;
|
|
199
490
|
/** This object represent a user's profile pictures. */
|
|
200
491
|
export interface UserProfilePhotos {
|
|
201
492
|
/** Total number of profile pictures the target user has */
|
|
@@ -255,7 +546,7 @@ export interface ChatAdministratorRights {
|
|
|
255
546
|
can_invite_users: boolean;
|
|
256
547
|
/** True, if the administrator can post stories to the chat */
|
|
257
548
|
can_post_stories: boolean;
|
|
258
|
-
/** True, if the administrator can edit stories posted by other users */
|
|
549
|
+
/** True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
|
|
259
550
|
can_edit_stories: boolean;
|
|
260
551
|
/** True, if the administrator can delete stories posted by other users */
|
|
261
552
|
can_delete_stories: boolean;
|
|
@@ -282,6 +573,8 @@ export interface ChatMemberUpdated {
|
|
|
282
573
|
new_chat_member: ChatMember;
|
|
283
574
|
/** Chat invite link, which was used by the user to join the chat; for joining by invite link events only. */
|
|
284
575
|
invite_link?: ChatInviteLink;
|
|
576
|
+
/** True, if the user joined the chat after sending a direct join request without using an invite link without using an invite link and being approved by an administrator */
|
|
577
|
+
via_join_request?: boolean;
|
|
285
578
|
/** True, if the user joined the chat via a chat folder invite link */
|
|
286
579
|
via_chat_folder_invite_link?: boolean;
|
|
287
580
|
}
|
|
@@ -330,7 +623,7 @@ export interface ChatMemberAdministrator {
|
|
|
330
623
|
can_invite_users: boolean;
|
|
331
624
|
/** True, if the administrator can post stories to the chat */
|
|
332
625
|
can_post_stories: boolean;
|
|
333
|
-
/** True, if the administrator can edit stories posted by other users */
|
|
626
|
+
/** True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
|
|
334
627
|
can_edit_stories: boolean;
|
|
335
628
|
/** True, if the administrator can delete stories posted by other users */
|
|
336
629
|
can_delete_stories: boolean;
|
|
@@ -453,6 +746,7 @@ export interface ChatPermissions {
|
|
|
453
746
|
/** True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages */
|
|
454
747
|
can_manage_topics?: boolean;
|
|
455
748
|
}
|
|
749
|
+
/** Describes the birthdate of a user. */
|
|
456
750
|
export interface Birthdate {
|
|
457
751
|
/** Day of the user's birth; 1-31 */
|
|
458
752
|
day: number;
|
|
@@ -461,6 +755,7 @@ export interface Birthdate {
|
|
|
461
755
|
/** Year of the user's birth */
|
|
462
756
|
year?: number;
|
|
463
757
|
}
|
|
758
|
+
/** Contains information about the start page settings of a Telegram Business account. */
|
|
464
759
|
export interface BusinessIntro {
|
|
465
760
|
/** Title text of the business intro */
|
|
466
761
|
title?: string;
|
|
@@ -469,18 +764,21 @@ export interface BusinessIntro {
|
|
|
469
764
|
/** Sticker of the business intro */
|
|
470
765
|
sticker?: Sticker;
|
|
471
766
|
}
|
|
767
|
+
/** Contains information about the location of a Telegram Business account. */
|
|
472
768
|
export interface BusinessLocation {
|
|
473
769
|
/** Address of the business */
|
|
474
770
|
address: string;
|
|
475
771
|
/** Location of the business */
|
|
476
772
|
location?: Location;
|
|
477
773
|
}
|
|
774
|
+
/** Describes an interval of time during which a business is open. */
|
|
478
775
|
export interface BusinessOpeningHoursInterval {
|
|
479
|
-
/** The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 24 60 */
|
|
776
|
+
/** The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60 */
|
|
480
777
|
opening_minute: number;
|
|
481
|
-
/** The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 24 60 */
|
|
778
|
+
/** The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60 */
|
|
482
779
|
closing_minute: number;
|
|
483
780
|
}
|
|
781
|
+
/** Describes the opening hours of a business. */
|
|
484
782
|
export interface BusinessOpeningHours {
|
|
485
783
|
/** Unique name of the time zone for which the opening hours are defined */
|
|
486
784
|
time_zone_name: string;
|
|
@@ -598,6 +896,6 @@ export interface BusinessMessagesDeleted {
|
|
|
598
896
|
business_connection_id: string;
|
|
599
897
|
/** Information about a chat in the business account. The bot may not have access to the chat or the corresponding user. */
|
|
600
898
|
chat: Chat.PrivateChat;
|
|
601
|
-
/**
|
|
899
|
+
/** The list of identifiers of deleted messages in the chat of the business account */
|
|
602
900
|
message_ids: number[];
|
|
603
901
|
}
|