@grammyjs/types 2.9.1 → 2.10.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 +36 -5
- package/message.d.ts +35 -1
- package/package.json +1 -1
- package/proxied.d.ts +100 -1
package/manage.d.ts
CHANGED
|
@@ -59,10 +59,10 @@ export namespace Chat {
|
|
|
59
59
|
// ABSTRACT
|
|
60
60
|
/** Internal type holding properties that all kinds of chats share. */
|
|
61
61
|
interface AbstractChat {
|
|
62
|
-
/** Type of chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
63
|
-
type: string;
|
|
64
62
|
/** Unique identifier for this 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 signed 64-bit integer or double-precision float type are safe for storing this identifier. */
|
|
65
63
|
id: number;
|
|
64
|
+
/** Type of chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
65
|
+
type: string;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
// HELPERS
|
|
@@ -94,6 +94,8 @@ export namespace Chat {
|
|
|
94
94
|
export interface SupergroupChat
|
|
95
95
|
extends AbstractChat, UserNameChat, TitleChat {
|
|
96
96
|
type: "supergroup";
|
|
97
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
98
|
+
is_forum?: true;
|
|
97
99
|
}
|
|
98
100
|
/** Internal type representing channel chats. */
|
|
99
101
|
export interface ChannelChat extends AbstractChat, UserNameChat, TitleChat {
|
|
@@ -116,6 +118,11 @@ export namespace Chat {
|
|
|
116
118
|
/** True, if messages from the chat can't be forwarded to other chats. Returned only in getChat. */
|
|
117
119
|
has_protected_content?: true;
|
|
118
120
|
}
|
|
121
|
+
/** Internal type holding properties that those private, supergroup, and channel chats returned from `getChat` share. */
|
|
122
|
+
interface NonGroupGetChat extends GetChat {
|
|
123
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat. */
|
|
124
|
+
active_usernames?: string[];
|
|
125
|
+
}
|
|
119
126
|
/** Internal type holding properties that those group, supergroup, and channel chats returned from `getChat` share. */
|
|
120
127
|
interface NonPrivateGetChat extends GetChat {
|
|
121
128
|
/** Description, for groups, supergroups and channel chats. Returned only in getChat. */
|
|
@@ -138,7 +145,10 @@ export namespace Chat {
|
|
|
138
145
|
|
|
139
146
|
// ==> GET CHATS
|
|
140
147
|
/** Internal type representing private chats returned from `getChat`. */
|
|
141
|
-
export interface PrivateGetChat
|
|
148
|
+
export interface PrivateGetChat
|
|
149
|
+
extends PrivateChat, NonGroupGetChat, GetChat {
|
|
150
|
+
/** Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat. */
|
|
151
|
+
emoji_status_custom_emoji_id?: string;
|
|
142
152
|
/** Bio of the other party in a private chat. Returned only in getChat. */
|
|
143
153
|
bio?: string;
|
|
144
154
|
/** 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. Returned only in getChat. */
|
|
@@ -150,7 +160,7 @@ export namespace Chat {
|
|
|
150
160
|
export interface GroupGetChat extends GroupChat, MultiUserGetChat {}
|
|
151
161
|
/** Internal type representing supergroup chats returned from `getChat`. */
|
|
152
162
|
export interface SupergroupGetChat
|
|
153
|
-
extends SupergroupChat, MultiUserGetChat, LargeGetChat {
|
|
163
|
+
extends SupergroupChat, NonGroupGetChat, MultiUserGetChat, LargeGetChat {
|
|
154
164
|
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat. */
|
|
155
165
|
slow_mode_delay?: number;
|
|
156
166
|
/** For supergroups, name of group sticker set. Returned only in getChat. */
|
|
@@ -159,7 +169,8 @@ export namespace Chat {
|
|
|
159
169
|
location?: ChatLocation;
|
|
160
170
|
}
|
|
161
171
|
/** Internal type representing channel chats returned from `getChat`. */
|
|
162
|
-
export interface ChannelGetChat
|
|
172
|
+
export interface ChannelGetChat
|
|
173
|
+
extends ChannelChat, NonGroupGetChat, LargeGetChat {}
|
|
163
174
|
}
|
|
164
175
|
|
|
165
176
|
/** This object represents a chat. */
|
|
@@ -242,6 +253,8 @@ export interface ChatAdministratorRights {
|
|
|
242
253
|
can_edit_messages?: boolean;
|
|
243
254
|
/** True, if the user is allowed to pin messages; groups and supergroups only */
|
|
244
255
|
can_pin_messages?: boolean;
|
|
256
|
+
/** True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */
|
|
257
|
+
can_manage_topics?: boolean;
|
|
245
258
|
}
|
|
246
259
|
|
|
247
260
|
/** This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
|
|
@@ -301,6 +314,8 @@ export interface ChatMemberAdministrator {
|
|
|
301
314
|
can_edit_messages?: boolean;
|
|
302
315
|
/** True, if the user is allowed to pin messages; groups and supergroups only */
|
|
303
316
|
can_pin_messages?: boolean;
|
|
317
|
+
/** True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */
|
|
318
|
+
can_manage_topics?: boolean;
|
|
304
319
|
/** Custom title for this user */
|
|
305
320
|
custom_title?: string;
|
|
306
321
|
}
|
|
@@ -327,6 +342,8 @@ export interface ChatMemberRestricted {
|
|
|
327
342
|
can_invite_users: boolean;
|
|
328
343
|
/** True, if the user is allowed to pin messages */
|
|
329
344
|
can_pin_messages: boolean;
|
|
345
|
+
/** True, if the user is allowed to create forum topics */
|
|
346
|
+
can_manage_topics: boolean;
|
|
330
347
|
/** True, if the user is allowed to send text messages, contacts, locations and venues */
|
|
331
348
|
can_send_messages: boolean;
|
|
332
349
|
/** True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes */
|
|
@@ -407,6 +424,8 @@ export interface ChatPermissions {
|
|
|
407
424
|
can_invite_users?: boolean;
|
|
408
425
|
/** True, if the user is allowed to pin messages. Ignored in public supergroups */
|
|
409
426
|
can_pin_messages?: boolean;
|
|
427
|
+
/** True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages */
|
|
428
|
+
can_manage_topics?: boolean;
|
|
410
429
|
}
|
|
411
430
|
|
|
412
431
|
/** Represents a location to which a chat is connected. */
|
|
@@ -417,6 +436,18 @@ export interface ChatLocation {
|
|
|
417
436
|
address: string;
|
|
418
437
|
}
|
|
419
438
|
|
|
439
|
+
/** This object represents a forum topic. */
|
|
440
|
+
export interface ForumTopic {
|
|
441
|
+
/** Unique identifier of the forum topic */
|
|
442
|
+
message_thread_id: number;
|
|
443
|
+
/** Name of the topic */
|
|
444
|
+
name: string;
|
|
445
|
+
/** Color of the topic icon in RGB format */
|
|
446
|
+
icon_color: number;
|
|
447
|
+
/** Unique identifier of the custom emoji shown as the topic icon */
|
|
448
|
+
icon_custom_emoji_id?: string;
|
|
449
|
+
}
|
|
450
|
+
|
|
420
451
|
/** This object represents a bot command. */
|
|
421
452
|
export interface BotCommand {
|
|
422
453
|
/** Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores. */
|
package/message.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export namespace Message {
|
|
|
9
9
|
interface ServiceMessage {
|
|
10
10
|
/** Unique message identifier inside this chat */
|
|
11
11
|
message_id: number;
|
|
12
|
+
/** Unique identifier of a message thread or a forum topic to which the message belongs; for supergroups only */
|
|
13
|
+
message_thread_id?: number;
|
|
12
14
|
/** Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. */
|
|
13
15
|
from?: User;
|
|
14
16
|
/** Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. */
|
|
@@ -17,6 +19,8 @@ export namespace Message {
|
|
|
17
19
|
date: number;
|
|
18
20
|
/** Conversation the message belongs to */
|
|
19
21
|
chat: Chat;
|
|
22
|
+
/** True, if the message is sent to a forum topic */
|
|
23
|
+
is_topic_message?: boolean;
|
|
20
24
|
}
|
|
21
25
|
interface CommonMessage extends ServiceMessage {
|
|
22
26
|
/** For forwarded messages, sender of the original message */
|
|
@@ -113,6 +117,15 @@ export namespace Message {
|
|
|
113
117
|
export type ProximityAlertTriggeredMessage =
|
|
114
118
|
& ServiceMessage
|
|
115
119
|
& MsgWith<"proximity_alert_triggered">;
|
|
120
|
+
export type ForumTopicCreatedMessage =
|
|
121
|
+
& ServiceMessage
|
|
122
|
+
& MsgWith<"forum_topic_created">;
|
|
123
|
+
export type ForumTopicClosedMessage =
|
|
124
|
+
& ServiceMessage
|
|
125
|
+
& MsgWith<"forum_topic_closed">;
|
|
126
|
+
export type ForumTopicReopenedMessage =
|
|
127
|
+
& ServiceMessage
|
|
128
|
+
& MsgWith<"forum_topic_reopened">;
|
|
116
129
|
export type VideoChatScheduledMessage =
|
|
117
130
|
& ServiceMessage
|
|
118
131
|
& MsgWith<"video_chat_scheduled">;
|
|
@@ -197,7 +210,12 @@ export interface Message extends Message.MediaMessage {
|
|
|
197
210
|
passport_data?: PassportData;
|
|
198
211
|
/** Service message. A user in the chat triggered another user's proximity alert while sharing Live Location. */
|
|
199
212
|
proximity_alert_triggered?: ProximityAlertTriggered;
|
|
200
|
-
/** Service message:
|
|
213
|
+
/** Service message: forum topic created */
|
|
214
|
+
forum_topic_created?: ForumTopicCreated;
|
|
215
|
+
/** Service message: forum topic closed */
|
|
216
|
+
forum_topic_closed?: ForumTopicClosed;
|
|
217
|
+
/** Service message: forum topic reopened */
|
|
218
|
+
forum_topic_reopened?: ForumTopicReopened;
|
|
201
219
|
/** Service message: video chat scheduled */
|
|
202
220
|
video_chat_scheduled?: VideoChatScheduled;
|
|
203
221
|
/** Service message: video chat started */
|
|
@@ -614,6 +632,22 @@ export interface MessageAutoDeleteTimerChanged {
|
|
|
614
632
|
message_auto_delete_time: number;
|
|
615
633
|
}
|
|
616
634
|
|
|
635
|
+
/** This object represents a service message about a new forum topic created in the chat. */
|
|
636
|
+
export interface ForumTopicCreated {
|
|
637
|
+
/** Name of the topic */
|
|
638
|
+
name: string;
|
|
639
|
+
/** Color of the topic icon in RGB format */
|
|
640
|
+
icon_color: number;
|
|
641
|
+
/** Unique identifier of the custom emoji shown as the topic icon */
|
|
642
|
+
icon_custom_emoji_id?: string;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/** This object represents a service message about a forum topic closed in the chat. Currently holds no information. */
|
|
646
|
+
export interface ForumTopicClosed {}
|
|
647
|
+
|
|
648
|
+
/** This object represents a service message about a forum topic reopened in the chat. Currently holds no information. */
|
|
649
|
+
export interface ForumTopicReopened {}
|
|
650
|
+
|
|
617
651
|
/** This object represents a service message about a video chat scheduled in the chat. */
|
|
618
652
|
export interface VideoChatScheduled {
|
|
619
653
|
/** Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator */
|
package/package.json
CHANGED
package/proxied.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
ChatMemberOwner,
|
|
17
17
|
ChatPermissions,
|
|
18
18
|
File,
|
|
19
|
+
ForumTopic,
|
|
19
20
|
UserFromGetMe,
|
|
20
21
|
UserProfilePhotos,
|
|
21
22
|
WebhookInfo,
|
|
@@ -120,6 +121,8 @@ export interface InputFileProxy<F> {
|
|
|
120
121
|
sendMessage(args: {
|
|
121
122
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
122
123
|
chat_id: number | string;
|
|
124
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
125
|
+
message_thread_id?: number;
|
|
123
126
|
/** Text of the message to be sent, 1-4096 characters after entities parsing */
|
|
124
127
|
text: string;
|
|
125
128
|
/** Mode for parsing entities in the message text. See formatting options for more details. */
|
|
@@ -148,6 +151,8 @@ export interface InputFileProxy<F> {
|
|
|
148
151
|
forwardMessage(args: {
|
|
149
152
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
150
153
|
chat_id: number | string;
|
|
154
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
155
|
+
message_thread_id?: number;
|
|
151
156
|
/** Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) */
|
|
152
157
|
from_chat_id: number | string;
|
|
153
158
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
@@ -162,6 +167,8 @@ export interface InputFileProxy<F> {
|
|
|
162
167
|
copyMessage(args: {
|
|
163
168
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
164
169
|
chat_id: number | string;
|
|
170
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
171
|
+
message_thread_id?: number;
|
|
165
172
|
/** Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) */
|
|
166
173
|
from_chat_id: number | string;
|
|
167
174
|
/** Message identifier in the chat specified in from_chat_id */
|
|
@@ -192,6 +199,8 @@ export interface InputFileProxy<F> {
|
|
|
192
199
|
sendPhoto(args: {
|
|
193
200
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
194
201
|
chat_id: number | string;
|
|
202
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
203
|
+
message_thread_id?: number;
|
|
195
204
|
/** Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. */
|
|
196
205
|
photo: F | string;
|
|
197
206
|
/** Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing */
|
|
@@ -222,6 +231,8 @@ export interface InputFileProxy<F> {
|
|
|
222
231
|
sendAudio(args: {
|
|
223
232
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
224
233
|
chat_id: number | string;
|
|
234
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
235
|
+
message_thread_id?: number;
|
|
225
236
|
/** Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. */
|
|
226
237
|
audio: F | string;
|
|
227
238
|
/** Audio caption, 0-1024 characters after entities parsing */
|
|
@@ -258,6 +269,8 @@ export interface InputFileProxy<F> {
|
|
|
258
269
|
sendDocument(args: {
|
|
259
270
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
260
271
|
chat_id: number | string;
|
|
272
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
273
|
+
message_thread_id?: number;
|
|
261
274
|
/** File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. */
|
|
262
275
|
document: F | string;
|
|
263
276
|
/** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass "attach://<file_attach_name>" if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. */
|
|
@@ -290,6 +303,8 @@ export interface InputFileProxy<F> {
|
|
|
290
303
|
sendVideo(args: {
|
|
291
304
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
292
305
|
chat_id: number | string;
|
|
306
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
307
|
+
message_thread_id?: number;
|
|
293
308
|
/** Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. */
|
|
294
309
|
video: F | string;
|
|
295
310
|
/** Duration of sent video in seconds */
|
|
@@ -328,6 +343,8 @@ export interface InputFileProxy<F> {
|
|
|
328
343
|
sendAnimation(args: {
|
|
329
344
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
330
345
|
chat_id: number | string;
|
|
346
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
347
|
+
message_thread_id?: number;
|
|
331
348
|
/** Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. */
|
|
332
349
|
animation: F | string;
|
|
333
350
|
/** Duration of sent animation in seconds */
|
|
@@ -364,6 +381,8 @@ export interface InputFileProxy<F> {
|
|
|
364
381
|
sendVoice(args: {
|
|
365
382
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
366
383
|
chat_id: number | string;
|
|
384
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
385
|
+
message_thread_id?: number;
|
|
367
386
|
/** Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. */
|
|
368
387
|
voice: F | string;
|
|
369
388
|
/** Voice message caption, 0-1024 characters after entities parsing */
|
|
@@ -395,6 +414,8 @@ export interface InputFileProxy<F> {
|
|
|
395
414
|
sendVideoNote(args: {
|
|
396
415
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
397
416
|
chat_id: number | string;
|
|
417
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
418
|
+
message_thread_id?: number;
|
|
398
419
|
/** Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data.. Sending video notes by a URL is currently unsupported */
|
|
399
420
|
video_note: F | string;
|
|
400
421
|
/** Duration of sent video in seconds */
|
|
@@ -424,6 +445,8 @@ export interface InputFileProxy<F> {
|
|
|
424
445
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
425
446
|
chat_id: number | string;
|
|
426
447
|
/** An array describing messages to be sent, must include 2-10 items */
|
|
448
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
449
|
+
message_thread_id?: number;
|
|
427
450
|
media: ReadonlyArray<
|
|
428
451
|
| InputFileProxy<F>["InputMediaAudio"]
|
|
429
452
|
| InputFileProxy<F>["InputMediaDocument"]
|
|
@@ -449,6 +472,8 @@ export interface InputFileProxy<F> {
|
|
|
449
472
|
sendLocation(args: {
|
|
450
473
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
451
474
|
chat_id: number | string;
|
|
475
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
476
|
+
message_thread_id?: number;
|
|
452
477
|
/** Latitude of the location */
|
|
453
478
|
latitude: number;
|
|
454
479
|
/** Longitude of the location */
|
|
@@ -515,6 +540,8 @@ export interface InputFileProxy<F> {
|
|
|
515
540
|
sendVenue(args: {
|
|
516
541
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
517
542
|
chat_id: number | string;
|
|
543
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
544
|
+
message_thread_id?: number;
|
|
518
545
|
/** Latitude of the venue */
|
|
519
546
|
latitude: number;
|
|
520
547
|
/** Longitude of the venue */
|
|
@@ -551,6 +578,8 @@ export interface InputFileProxy<F> {
|
|
|
551
578
|
sendContact(args: {
|
|
552
579
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
553
580
|
chat_id: number | string;
|
|
581
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
582
|
+
message_thread_id?: number;
|
|
554
583
|
/** Contact's phone number */
|
|
555
584
|
phone_number: string;
|
|
556
585
|
/** Contact's first name */
|
|
@@ -579,6 +608,8 @@ export interface InputFileProxy<F> {
|
|
|
579
608
|
sendPoll(args: {
|
|
580
609
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
581
610
|
chat_id: number | string;
|
|
611
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
612
|
+
message_thread_id?: number;
|
|
582
613
|
/** Poll question, 1-300 characters */
|
|
583
614
|
question: string;
|
|
584
615
|
/** A list of answer options, 2-10 strings 1-100 characters each */
|
|
@@ -623,6 +654,8 @@ export interface InputFileProxy<F> {
|
|
|
623
654
|
sendDice(args: {
|
|
624
655
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
625
656
|
chat_id: number | string;
|
|
657
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
658
|
+
message_thread_id?: number;
|
|
626
659
|
/** Emoji on which the dice throw animation is based. Currently, must be one of "🎲", "🎯", "🏀", "⚽", "🎳", or "🎰". Dice can have values 1-6 for "🎲", "🎯" and "🎳", values 1-5 for "🏀" and "⚽", and values 1-64 for "🎰". Defaults to "🎲" */
|
|
627
660
|
emoji?: string;
|
|
628
661
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
@@ -748,6 +781,8 @@ export interface InputFileProxy<F> {
|
|
|
748
781
|
can_invite_users?: boolean;
|
|
749
782
|
/** Pass True if the administrator can pin messages, supergroups only */
|
|
750
783
|
can_pin_messages?: boolean;
|
|
784
|
+
/** Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only */
|
|
785
|
+
can_manage_topics?: boolean;
|
|
751
786
|
}): true;
|
|
752
787
|
|
|
753
788
|
/** Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success. */
|
|
@@ -864,7 +899,7 @@ export interface InputFileProxy<F> {
|
|
|
864
899
|
setChatTitle(args: {
|
|
865
900
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
866
901
|
chat_id: number | string;
|
|
867
|
-
/** New chat title, 1-
|
|
902
|
+
/** New chat title, 1-128 characters */
|
|
868
903
|
title: string;
|
|
869
904
|
}): true;
|
|
870
905
|
|
|
@@ -950,6 +985,65 @@ export interface InputFileProxy<F> {
|
|
|
950
985
|
chat_id: number | string;
|
|
951
986
|
}): true;
|
|
952
987
|
|
|
988
|
+
/** Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects. */
|
|
989
|
+
getForumTopicIconStickers(): Sticker[];
|
|
990
|
+
|
|
991
|
+
/** Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object. */
|
|
992
|
+
createForumTopic(args: {
|
|
993
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
994
|
+
chat_id: number | string;
|
|
995
|
+
/** Topic name, 1-128 characters */
|
|
996
|
+
name: string;
|
|
997
|
+
/** Color of the topic icon in RGB format. Currently, must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F */
|
|
998
|
+
icon_color?: number;
|
|
999
|
+
/** Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. */
|
|
1000
|
+
icon_custom_emoji_id?: string;
|
|
1001
|
+
}): ForumTopic;
|
|
1002
|
+
|
|
1003
|
+
/** Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. */
|
|
1004
|
+
editForumTopic(args: {
|
|
1005
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1006
|
+
chat_id: number | string;
|
|
1007
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
1008
|
+
message_thread_id: number;
|
|
1009
|
+
/** New topic name, 1-128 characters */
|
|
1010
|
+
name: string;
|
|
1011
|
+
/** New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. */
|
|
1012
|
+
icon_custom_emoji_id: string;
|
|
1013
|
+
}): true;
|
|
1014
|
+
|
|
1015
|
+
/** Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. */
|
|
1016
|
+
closeForumTopic(args: {
|
|
1017
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1018
|
+
chat_id: number | string;
|
|
1019
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
1020
|
+
message_thread_id: number;
|
|
1021
|
+
}): true;
|
|
1022
|
+
|
|
1023
|
+
/** Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. */
|
|
1024
|
+
reopenForumTopic(args: {
|
|
1025
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1026
|
+
chat_id: number | string;
|
|
1027
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
1028
|
+
message_thread_id: number;
|
|
1029
|
+
}): true;
|
|
1030
|
+
|
|
1031
|
+
/** Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success. */
|
|
1032
|
+
deleteForumTopic(args: {
|
|
1033
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1034
|
+
chat_id: number | string;
|
|
1035
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
1036
|
+
message_thread_id: number;
|
|
1037
|
+
}): true;
|
|
1038
|
+
|
|
1039
|
+
/** Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success. */
|
|
1040
|
+
unpinAllForumTopicMessages(args: {
|
|
1041
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1042
|
+
chat_id: number | string;
|
|
1043
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
1044
|
+
message_thread_id: number;
|
|
1045
|
+
}): true;
|
|
1046
|
+
|
|
953
1047
|
/** Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
|
|
954
1048
|
|
|
955
1049
|
Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter. */
|
|
@@ -1104,6 +1198,7 @@ export interface InputFileProxy<F> {
|
|
|
1104
1198
|
|
|
1105
1199
|
/** Use this method to delete a message, including service messages, with the following limitations:
|
|
1106
1200
|
- A message can only be deleted if it was sent less than 48 hours ago.
|
|
1201
|
+
- Service messages about a supergroup, channel, or forum topic creation can't be deleted.
|
|
1107
1202
|
- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
|
|
1108
1203
|
- Bots can delete outgoing messages in private chats, groups, and supergroups.
|
|
1109
1204
|
- Bots can delete incoming messages in private chats.
|
|
@@ -1257,6 +1352,8 @@ export interface InputFileProxy<F> {
|
|
|
1257
1352
|
sendInvoice(args: {
|
|
1258
1353
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1259
1354
|
chat_id: number | string;
|
|
1355
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1356
|
+
message_thread_id?: number;
|
|
1260
1357
|
/** Product name, 1-32 characters */
|
|
1261
1358
|
title: string;
|
|
1262
1359
|
/** Product description, 1-255 characters */
|
|
@@ -1391,6 +1488,8 @@ export interface InputFileProxy<F> {
|
|
|
1391
1488
|
sendGame(args: {
|
|
1392
1489
|
/** Unique identifier for the target chat */
|
|
1393
1490
|
chat_id: number;
|
|
1491
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1492
|
+
message_thread_id?: number;
|
|
1394
1493
|
/** Short name of the game, serves as the unique identifier for the game. Set up your games via BotFather. */
|
|
1395
1494
|
game_short_name: string;
|
|
1396
1495
|
/** Sends the message silently. Users will receive a notification with no sound. */
|