@im-more/dsh-telegram 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/cordis.patch.yml +10 -0
- package/lib/index.js +2067 -0
- package/lib/index.js.map +1 -0
- package/lib/types/bot.d.ts +70 -0
- package/lib/types/bot.d.ts.map +1 -0
- package/lib/types/bot.js +231 -0
- package/lib/types/bot.js.map +1 -0
- package/lib/types/config.d.ts +34 -0
- package/lib/types/config.d.ts.map +1 -0
- package/lib/types/config.js +41 -0
- package/lib/types/config.js.map +1 -0
- package/lib/types/decode.d.ts +39 -0
- package/lib/types/decode.d.ts.map +1 -0
- package/lib/types/decode.js +382 -0
- package/lib/types/decode.js.map +1 -0
- package/lib/types/errors.d.ts +33 -0
- package/lib/types/errors.d.ts.map +1 -0
- package/lib/types/errors.js +89 -0
- package/lib/types/errors.js.map +1 -0
- package/lib/types/identity.d.ts +19 -0
- package/lib/types/identity.d.ts.map +1 -0
- package/lib/types/identity.js +34 -0
- package/lib/types/identity.js.map +1 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +8 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/media.d.ts +38 -0
- package/lib/types/media.d.ts.map +1 -0
- package/lib/types/media.js +65 -0
- package/lib/types/media.js.map +1 -0
- package/lib/types/modes/html.d.ts +16 -0
- package/lib/types/modes/html.d.ts.map +1 -0
- package/lib/types/modes/html.js +155 -0
- package/lib/types/modes/html.js.map +1 -0
- package/lib/types/modes/plain.d.ts +14 -0
- package/lib/types/modes/plain.d.ts.map +1 -0
- package/lib/types/modes/plain.js +56 -0
- package/lib/types/modes/plain.js.map +1 -0
- package/lib/types/modes/shared.d.ts +140 -0
- package/lib/types/modes/shared.d.ts.map +1 -0
- package/lib/types/modes/shared.js +405 -0
- package/lib/types/modes/shared.js.map +1 -0
- package/lib/types/polling.d.ts +26 -0
- package/lib/types/polling.d.ts.map +1 -0
- package/lib/types/polling.js +149 -0
- package/lib/types/polling.js.map +1 -0
- package/lib/types/request.d.ts +67 -0
- package/lib/types/request.d.ts.map +1 -0
- package/lib/types/request.js +158 -0
- package/lib/types/request.js.map +1 -0
- package/lib/types/secret.d.ts +27 -0
- package/lib/types/secret.d.ts.map +1 -0
- package/lib/types/secret.js +39 -0
- package/lib/types/secret.js.map +1 -0
- package/lib/types/send.d.ts +48 -0
- package/lib/types/send.d.ts.map +1 -0
- package/lib/types/send.js +326 -0
- package/lib/types/send.js.map +1 -0
- package/lib/types/types/game.d.ts +102 -0
- package/lib/types/types/game.d.ts.map +1 -0
- package/lib/types/types/game.js +5 -0
- package/lib/types/types/game.js.map +1 -0
- package/lib/types/types/index.d.ts +2751 -0
- package/lib/types/types/index.d.ts.map +1 -0
- package/lib/types/types/index.js +88 -0
- package/lib/types/types/index.js.map +1 -0
- package/lib/types/types/inline.d.ts +796 -0
- package/lib/types/types/inline.d.ts.map +1 -0
- package/lib/types/types/inline.js +4 -0
- package/lib/types/types/inline.js.map +1 -0
- package/lib/types/types/internal.d.ts +32 -0
- package/lib/types/types/internal.d.ts.map +1 -0
- package/lib/types/types/internal.js +30 -0
- package/lib/types/types/internal.js.map +1 -0
- package/lib/types/types/passport.d.ts +229 -0
- package/lib/types/types/passport.d.ts.map +1 -0
- package/lib/types/types/passport.js +3 -0
- package/lib/types/types/passport.js.map +1 -0
- package/lib/types/types/payment.d.ts +285 -0
- package/lib/types/types/payment.d.ts.map +1 -0
- package/lib/types/types/payment.js +6 -0
- package/lib/types/types/payment.js.map +1 -0
- package/lib/types/types/sticker.d.ts +221 -0
- package/lib/types/types/sticker.d.ts.map +1 -0
- package/lib/types/types/sticker.js +11 -0
- package/lib/types/types/sticker.js.map +1 -0
- package/lib/types/types/update.d.ts +97 -0
- package/lib/types/types/update.d.ts.map +1 -0
- package/lib/types/types/update.js +6 -0
- package/lib/types/types/update.js.map +1 -0
- package/lib/types/webhook.d.ts +29 -0
- package/lib/types/webhook.d.ts.map +1 -0
- package/lib/types/webhook.js +129 -0
- package/lib/types/webhook.js.map +1 -0
- package/package.json +61 -3
- package/src/bot.ts +349 -0
- package/src/config.ts +73 -0
- package/src/decode.ts +472 -0
- package/src/errors.ts +103 -0
- package/src/identity.ts +41 -0
- package/src/index.ts +14 -0
- package/src/media.ts +79 -0
- package/src/modes/html.ts +193 -0
- package/src/modes/plain.ts +75 -0
- package/src/modes/shared.ts +505 -0
- package/src/polling.ts +176 -0
- package/src/request.ts +224 -0
- package/src/secret.ts +46 -0
- package/src/send.ts +454 -0
- package/src/types/.eslintrc.yml +2 -0
- package/src/types/game.ts +112 -0
- package/src/types/index.ts +3028 -0
- package/src/types/inline.ts +857 -0
- package/src/types/internal.ts +64 -0
- package/src/types/passport.ts +256 -0
- package/src/types/payment.ts +304 -0
- package/src/types/sticker.ts +244 -0
- package/src/types/update.ts +107 -0
- package/src/webhook.ts +168 -0
- package/README.md +0 -3
|
@@ -0,0 +1,2751 @@
|
|
|
1
|
+
import { CallbackGame, Game } from './game.ts';
|
|
2
|
+
import { Sticker } from './sticker.ts';
|
|
3
|
+
export * from './internal.ts';
|
|
4
|
+
export * from './inline.ts';
|
|
5
|
+
export * from './game.ts';
|
|
6
|
+
export * from './passport.ts';
|
|
7
|
+
export * from './payment.ts';
|
|
8
|
+
export * from './sticker.ts';
|
|
9
|
+
export * from './update.ts';
|
|
10
|
+
export type Integer = number;
|
|
11
|
+
export type Float = number;
|
|
12
|
+
declare module './update.ts' {
|
|
13
|
+
interface Update {
|
|
14
|
+
/** Optional. New incoming message of any kind — text, photo, sticker, etc. */
|
|
15
|
+
message?: Message;
|
|
16
|
+
/** Optional. New version of a message that is known to the bot and was edited */
|
|
17
|
+
edited_message?: Message;
|
|
18
|
+
/** Optional. New incoming channel post of any kind — text, photo, sticker, etc. */
|
|
19
|
+
channel_post?: Message;
|
|
20
|
+
/** Optional. New version of a channel post that is known to the bot and was edited */
|
|
21
|
+
edited_channel_post?: Message;
|
|
22
|
+
/** Optional. New incoming callback query */
|
|
23
|
+
callback_query?: CallbackQuery;
|
|
24
|
+
/** Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot */
|
|
25
|
+
poll?: Poll;
|
|
26
|
+
/** Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself. */
|
|
27
|
+
poll_answer?: PollAnswer;
|
|
28
|
+
/** Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user. */
|
|
29
|
+
my_chat_member?: ChatMemberUpdated;
|
|
30
|
+
/** Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify "chat_member" in the list of allowed_updates to receive these updates. */
|
|
31
|
+
chat_member?: ChatMemberUpdated;
|
|
32
|
+
/** Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates. */
|
|
33
|
+
chat_join_request?: ChatJoinRequest;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* This object represents a Telegram user or bot.
|
|
38
|
+
* @see https://core.telegram.org/bots/api#user
|
|
39
|
+
*/
|
|
40
|
+
export interface User {
|
|
41
|
+
/** Unique identifier for this user or bot. 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. */
|
|
42
|
+
id?: Integer;
|
|
43
|
+
/** True, if this user is a bot */
|
|
44
|
+
is_bot?: boolean;
|
|
45
|
+
/** User's or bot's first name */
|
|
46
|
+
first_name?: string;
|
|
47
|
+
/** Optional. User's or bot's last name */
|
|
48
|
+
last_name?: string;
|
|
49
|
+
/** Optional. User's or bot's username */
|
|
50
|
+
username?: string;
|
|
51
|
+
/** Optional. IETF language tag of the user's language */
|
|
52
|
+
language_code?: string;
|
|
53
|
+
/** Optional. True, if this user is a Telegram Premium user */
|
|
54
|
+
is_premium?: boolean;
|
|
55
|
+
/** Optional. True, if this user added the bot to the attachment menu */
|
|
56
|
+
added_to_attachment_menu?: boolean;
|
|
57
|
+
/** Optional. True, if the bot can be invited to groups. Returned only in getMe. */
|
|
58
|
+
can_join_groups?: boolean;
|
|
59
|
+
/** Optional. True, if privacy mode is disabled for the bot. Returned only in getMe. */
|
|
60
|
+
can_read_all_group_messages?: boolean;
|
|
61
|
+
/** Optional. True, if the bot supports inline queries. Returned only in getMe. */
|
|
62
|
+
supports_inline_queries?: boolean;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* This object represents a chat.
|
|
66
|
+
* @see https://core.telegram.org/bots/api#chat
|
|
67
|
+
*/
|
|
68
|
+
export interface Chat {
|
|
69
|
+
/** 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. */
|
|
70
|
+
id?: Integer;
|
|
71
|
+
/** Type of chat, can be either "private", "group", "supergroup" or "channel" */
|
|
72
|
+
type?: string;
|
|
73
|
+
/** Optional. Title, for supergroups, channels and group chats */
|
|
74
|
+
title?: string;
|
|
75
|
+
/** Optional. Username, for private chats, supergroups and channels if available */
|
|
76
|
+
username?: string;
|
|
77
|
+
/** Optional. First name of the other party in a private chat */
|
|
78
|
+
first_name?: string;
|
|
79
|
+
/** Optional. Last name of the other party in a private chat */
|
|
80
|
+
last_name?: string;
|
|
81
|
+
/** Optional. True, if the supergroup chat is a forum (has topics enabled) */
|
|
82
|
+
is_forum?: true;
|
|
83
|
+
/** Optional. Chat photo. Returned only in getChat. */
|
|
84
|
+
photo?: ChatPhoto;
|
|
85
|
+
/** Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat. */
|
|
86
|
+
active_usernames?: string[];
|
|
87
|
+
/** Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat. */
|
|
88
|
+
emoji_status_custom_emoji_id?: string;
|
|
89
|
+
/** Optional. Bio of the other party in a private chat. Returned only in getChat. */
|
|
90
|
+
bio?: string;
|
|
91
|
+
/** Optional. 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. */
|
|
92
|
+
has_private_forwards?: boolean;
|
|
93
|
+
/** Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat. */
|
|
94
|
+
has_restricted_voice_and_video_messages?: boolean;
|
|
95
|
+
/** Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat. */
|
|
96
|
+
join_to_send_messages?: boolean;
|
|
97
|
+
/** Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat. */
|
|
98
|
+
join_by_request?: boolean;
|
|
99
|
+
/** Optional. Description, for groups, supergroups and channel chats. Returned only in getChat. */
|
|
100
|
+
description?: string;
|
|
101
|
+
/** Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat. */
|
|
102
|
+
invite_link?: string;
|
|
103
|
+
/** Optional. The most recent pinned message (by sending date). Returned only in getChat. */
|
|
104
|
+
pinned_message?: Message;
|
|
105
|
+
/** Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat. */
|
|
106
|
+
permissions?: ChatPermissions;
|
|
107
|
+
/** Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat. */
|
|
108
|
+
slow_mode_delay?: Integer;
|
|
109
|
+
/** Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat. */
|
|
110
|
+
message_auto_delete_time?: Integer;
|
|
111
|
+
/** Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat. */
|
|
112
|
+
has_aggressive_anti_spam_enabled?: boolean;
|
|
113
|
+
/** Optional. True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat. */
|
|
114
|
+
has_hidden_members?: boolean;
|
|
115
|
+
/** Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat. */
|
|
116
|
+
has_protected_content?: boolean;
|
|
117
|
+
/** Optional. For supergroups, name of group sticker set. Returned only in getChat. */
|
|
118
|
+
sticker_set_name?: string;
|
|
119
|
+
/** Optional. True, if the bot can change the group sticker set. Returned only in getChat. */
|
|
120
|
+
can_set_sticker_set?: boolean;
|
|
121
|
+
/** Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat. */
|
|
122
|
+
linked_chat_id?: Integer;
|
|
123
|
+
/** Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat. */
|
|
124
|
+
location?: ChatLocation;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* This object represents a message.
|
|
128
|
+
* @see https://core.telegram.org/bots/api#message
|
|
129
|
+
*/
|
|
130
|
+
export interface Message {
|
|
131
|
+
/** Unique message identifier inside this chat */
|
|
132
|
+
message_id?: Integer;
|
|
133
|
+
/** Optional. Unique identifier of a message thread to which the message belongs; for supergroups only */
|
|
134
|
+
message_thread_id?: number;
|
|
135
|
+
/** Optional. 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. */
|
|
136
|
+
from?: User;
|
|
137
|
+
/** Optional. 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. */
|
|
138
|
+
sender_chat?: Chat;
|
|
139
|
+
/** Date the message was sent in Unix time */
|
|
140
|
+
date?: Integer;
|
|
141
|
+
/** Conversation the message belongs to */
|
|
142
|
+
chat?: Chat;
|
|
143
|
+
/** Optional. For forwarded messages, sender of the original message */
|
|
144
|
+
forward_from?: User;
|
|
145
|
+
/** Optional. For messages forwarded from channels or from anonymous administrators, information about the original sender chat */
|
|
146
|
+
forward_from_chat?: Chat;
|
|
147
|
+
/** Optional. For messages forwarded from channels, identifier of the original message in the channel */
|
|
148
|
+
forward_from_message_id?: Integer;
|
|
149
|
+
/** Optional. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present */
|
|
150
|
+
forward_signature?: string;
|
|
151
|
+
/** Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages */
|
|
152
|
+
forward_sender_name?: string;
|
|
153
|
+
/** Optional. For forwarded messages, date the original message was sent in Unix time */
|
|
154
|
+
forward_date?: Integer;
|
|
155
|
+
/** Optional. True, if the message is sent to a forum topic */
|
|
156
|
+
is_topic_message?: boolean;
|
|
157
|
+
/** Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group */
|
|
158
|
+
is_automatic_forward?: boolean;
|
|
159
|
+
/** Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. */
|
|
160
|
+
reply_to_message?: Message;
|
|
161
|
+
/** Optional. Bot through which the message was sent */
|
|
162
|
+
via_bot?: User;
|
|
163
|
+
/** Optional. Date the message was last edited in Unix time */
|
|
164
|
+
edit_date?: Integer;
|
|
165
|
+
/** Optional. True, if the message can't be forwarded */
|
|
166
|
+
has_protected_content?: boolean;
|
|
167
|
+
/** Optional. The unique identifier of a media message group this message belongs to */
|
|
168
|
+
media_group_id?: string;
|
|
169
|
+
/** Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator */
|
|
170
|
+
author_signature?: string;
|
|
171
|
+
/** Optional. For text messages, the actual UTF-8 text of the message, 0-4096 characters */
|
|
172
|
+
text?: string;
|
|
173
|
+
/** Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text */
|
|
174
|
+
entities?: MessageEntity[];
|
|
175
|
+
/** Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set */
|
|
176
|
+
animation?: Animation;
|
|
177
|
+
/** Optional. Message is an audio file, information about the file */
|
|
178
|
+
audio?: Audio;
|
|
179
|
+
/** Optional. Message is a general file, information about the file */
|
|
180
|
+
document?: Document;
|
|
181
|
+
/** Optional. Message is a photo, available sizes of the photo */
|
|
182
|
+
photo?: PhotoSize[];
|
|
183
|
+
/** Optional. Message is a video, information about the video */
|
|
184
|
+
video?: Video;
|
|
185
|
+
/** Optional. Message is a video note, information about the video message */
|
|
186
|
+
video_note?: VideoNote;
|
|
187
|
+
/** Optional. Message is a voice message, information about the file */
|
|
188
|
+
voice?: Voice;
|
|
189
|
+
/** Optional. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters */
|
|
190
|
+
caption?: string;
|
|
191
|
+
/** Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption */
|
|
192
|
+
caption_entities?: MessageEntity[];
|
|
193
|
+
/** Optional. True, if the message media is covered by a spoiler animation */
|
|
194
|
+
has_media_spoiler?: boolean;
|
|
195
|
+
/** Optional. Message is a shared contact, information about the contact */
|
|
196
|
+
contact?: Contact;
|
|
197
|
+
/** Optional. Message is a dice with random value */
|
|
198
|
+
dice?: Dice;
|
|
199
|
+
/** Optional. Message is a game, information about the game. More about games » */
|
|
200
|
+
game?: Game;
|
|
201
|
+
/** Optional. Message is a native poll, information about the poll */
|
|
202
|
+
poll?: Poll;
|
|
203
|
+
/** Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set */
|
|
204
|
+
venue?: Venue;
|
|
205
|
+
/** Optional. Message is a shared location, information about the location */
|
|
206
|
+
location?: Location;
|
|
207
|
+
/** Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) */
|
|
208
|
+
new_chat_members?: User[];
|
|
209
|
+
/** Optional. A member was removed from the group, information about them (this member may be the bot itself) */
|
|
210
|
+
left_chat_member?: User;
|
|
211
|
+
/** Optional. A chat title was changed to this value */
|
|
212
|
+
new_chat_title?: string;
|
|
213
|
+
/** Optional. A chat photo was change to this value */
|
|
214
|
+
new_chat_photo?: PhotoSize[];
|
|
215
|
+
/** Optional. Service message: the chat photo was deleted */
|
|
216
|
+
delete_chat_photo?: boolean;
|
|
217
|
+
/** Optional. Service message: the group has been created */
|
|
218
|
+
group_chat_created?: boolean;
|
|
219
|
+
/** Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup. */
|
|
220
|
+
supergroup_chat_created?: boolean;
|
|
221
|
+
/** Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel. */
|
|
222
|
+
channel_chat_created?: boolean;
|
|
223
|
+
/** Optional. Service message: auto-delete timer settings changed in the chat */
|
|
224
|
+
message_auto_delete_timer_changed?: MessageAutoDeleteTimerChanged;
|
|
225
|
+
/** Optional. The group has been migrated to a supergroup with the specified identifier. 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. */
|
|
226
|
+
migrate_to_chat_id?: Integer;
|
|
227
|
+
/** Optional. The supergroup has been migrated from a group with the specified identifier. 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. */
|
|
228
|
+
migrate_from_chat_id?: Integer;
|
|
229
|
+
/** Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply. */
|
|
230
|
+
pinned_message?: Message;
|
|
231
|
+
/** Optional. The domain name of the website on which the user has logged in. More about Telegram Login » */
|
|
232
|
+
connected_website?: string;
|
|
233
|
+
/** Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location. */
|
|
234
|
+
proximity_alert_triggered?: ProximityAlertTriggered;
|
|
235
|
+
/** Optional. Service message: forum topic created */
|
|
236
|
+
forum_topic_created?: ForumTopicCreated;
|
|
237
|
+
/** Optional. Service message: forum topic edited */
|
|
238
|
+
forum_topic_edited?: ForumTopicEdited;
|
|
239
|
+
/** Optional. Service message: the 'General' forum topic hidden */
|
|
240
|
+
general_forum_topic_hidden?: GeneralForumTopicHidden;
|
|
241
|
+
/** Optional. Service message: the 'General' forum topic unhidden */
|
|
242
|
+
general_forum_topic_unhidden?: GeneralForumTopicUnhidden;
|
|
243
|
+
/** Optional. Service message: the user allowed the bot added to the attachment menu to write messages */
|
|
244
|
+
write_access_allowed?: WriteAccessAllowed;
|
|
245
|
+
/** Optional. Service message: forum topic closed */
|
|
246
|
+
forum_topic_closed?: ForumTopicClosed;
|
|
247
|
+
/** Optional. Service message: forum topic reopened */
|
|
248
|
+
forum_topic_reopened?: ForumTopicReopened;
|
|
249
|
+
/**
|
|
250
|
+
* Optional. Service message: voice chat scheduled
|
|
251
|
+
* @deprecated
|
|
252
|
+
*/
|
|
253
|
+
voice_chat_scheduled?: VoiceChatScheduled;
|
|
254
|
+
/** Optional. Service message: voice chat scheduled */
|
|
255
|
+
video_chat_scheduled?: VoiceChatScheduled;
|
|
256
|
+
/**
|
|
257
|
+
* Optional. Service message: voice chat started
|
|
258
|
+
* @deprecated
|
|
259
|
+
*/
|
|
260
|
+
voice_chat_started?: VoiceChatStarted;
|
|
261
|
+
/** Optional. Service message: voice chat started */
|
|
262
|
+
video_chat_started?: VoiceChatStarted;
|
|
263
|
+
/**
|
|
264
|
+
* Optional. Service message: voice chat ended
|
|
265
|
+
* @deprecated
|
|
266
|
+
*/
|
|
267
|
+
voice_chat_ended?: VoiceChatEnded;
|
|
268
|
+
/** Optional. Service message: voice chat ended */
|
|
269
|
+
video_chat_ended?: VoiceChatEnded;
|
|
270
|
+
/**
|
|
271
|
+
* Optional. Service message: new participants ivited to a voice chat
|
|
272
|
+
* @deprecated
|
|
273
|
+
*/
|
|
274
|
+
voice_chat_participants_invited?: VoiceChatParticipantsInvited;
|
|
275
|
+
/** Optional. Service message: new participants invited to a voice chat */
|
|
276
|
+
video_chat_participants_invited?: VoiceChatParticipantsInvited;
|
|
277
|
+
/** Optional. Service message: data sent by a Web App */
|
|
278
|
+
web_app_data?: WebAppData;
|
|
279
|
+
/** Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */
|
|
280
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* This object represents a unique message identifier.
|
|
284
|
+
* @see https://core.telegram.org/bots/api#messageid
|
|
285
|
+
*/
|
|
286
|
+
export interface MessageId {
|
|
287
|
+
/** Unique message identifier */
|
|
288
|
+
message_id?: Integer;
|
|
289
|
+
}
|
|
290
|
+
export type MessageEntityType = 'mention' | 'hashtag' | 'cashtag' | 'bot_command' | 'url' | 'email' | 'phone_number' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'spoiler' | 'code' | 'pre' | 'text_link' | 'text_mention' | 'blockquote' | 'expandable_blockquote' | 'custom_emoji';
|
|
291
|
+
/**
|
|
292
|
+
* This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
|
|
293
|
+
* @see https://core.telegram.org/bots/api#messageentity
|
|
294
|
+
*/
|
|
295
|
+
export interface MessageEntity {
|
|
296
|
+
/** Type of the entity. Currently, can be:
|
|
297
|
+
* - "mention" (@username)
|
|
298
|
+
* - "hashtag" (#hashtag)
|
|
299
|
+
* - "cashtag" ($USD)
|
|
300
|
+
* - "bot_command" (/start@jobs_bot)
|
|
301
|
+
* - "url" (https://telegram.org)
|
|
302
|
+
* - "email" (do-not-reply@telegram.org)
|
|
303
|
+
* - "phone_number" (+1-212-555-0123)
|
|
304
|
+
* - "bold" (bold text)
|
|
305
|
+
* - "italic" (italic text)
|
|
306
|
+
* - "underline" (underlined text)
|
|
307
|
+
* - "strikethrough" (strikethrough text)
|
|
308
|
+
* - "spoiler" (spoiler message)
|
|
309
|
+
* - "code" (monowidth string)
|
|
310
|
+
* - "pre" (monowidth block)
|
|
311
|
+
* - "text_link" (for clickable text URLs)
|
|
312
|
+
* - "text_mention" (for users without usernames)
|
|
313
|
+
* - "custom_emoji" (for inline custom emoji stickers)
|
|
314
|
+
*/
|
|
315
|
+
type?: MessageEntityType;
|
|
316
|
+
/** Offset in UTF-16 code units to the start of the entity */
|
|
317
|
+
offset?: Integer;
|
|
318
|
+
/** Length of the entity in UTF-16 code units */
|
|
319
|
+
length?: Integer;
|
|
320
|
+
/** Optional. For "text_link" only, url that will be opened after user taps on the text */
|
|
321
|
+
url?: string;
|
|
322
|
+
/** Optional. For "text_mention" only, the mentioned user */
|
|
323
|
+
user?: User;
|
|
324
|
+
/** Optional. For "pre" only, the programming language of the entity text */
|
|
325
|
+
language?: string;
|
|
326
|
+
/** Optional. For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker */
|
|
327
|
+
custom_emoji_id?: string;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* This object represents one size of a photo or a file / sticker thumbnail.
|
|
331
|
+
* @see https://core.telegram.org/bots/api#photosize
|
|
332
|
+
*/
|
|
333
|
+
export interface PhotoSize {
|
|
334
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
335
|
+
file_id?: string;
|
|
336
|
+
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
337
|
+
file_unique_id?: string;
|
|
338
|
+
/** Photo width */
|
|
339
|
+
width?: Integer;
|
|
340
|
+
/** Photo height */
|
|
341
|
+
height?: Integer;
|
|
342
|
+
/** Optional. File size in bytes */
|
|
343
|
+
file_size?: Integer;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
|
|
347
|
+
* @see https://core.telegram.org/bots/api#animation
|
|
348
|
+
*/
|
|
349
|
+
export interface Animation {
|
|
350
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
351
|
+
file_id?: string;
|
|
352
|
+
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
353
|
+
file_unique_id?: string;
|
|
354
|
+
/** Video width as defined by sender */
|
|
355
|
+
width?: Integer;
|
|
356
|
+
/** Video height as defined by sender */
|
|
357
|
+
height?: Integer;
|
|
358
|
+
/** Duration of the video in seconds as defined by sender */
|
|
359
|
+
duration?: Integer;
|
|
360
|
+
/** Optional. Animation thumbnail as defined by sender */
|
|
361
|
+
thumb?: PhotoSize;
|
|
362
|
+
/** Optional. Original animation filename as defined by sender */
|
|
363
|
+
file_name?: string;
|
|
364
|
+
/** Optional. MIME type of the file as defined by sender */
|
|
365
|
+
mime_type?: string;
|
|
366
|
+
/** Optional. File size in bytes */
|
|
367
|
+
file_size?: Integer;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* This object represents an audio file to be treated as music by the Telegram clients.
|
|
371
|
+
* @see https://core.telegram.org/bots/api#audio
|
|
372
|
+
*/
|
|
373
|
+
export interface Audio {
|
|
374
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
375
|
+
file_id?: string;
|
|
376
|
+
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
377
|
+
file_unique_id?: string;
|
|
378
|
+
/** Duration of the audio in seconds as defined by sender */
|
|
379
|
+
duration?: Integer;
|
|
380
|
+
/** Optional. Performer of the audio as defined by sender or by audio tags */
|
|
381
|
+
performer?: string;
|
|
382
|
+
/** Optional. Title of the audio as defined by sender or by audio tags */
|
|
383
|
+
title?: string;
|
|
384
|
+
/** Optional. Original filename as defined by sender */
|
|
385
|
+
file_name?: string;
|
|
386
|
+
/** Optional. MIME type of the file as defined by sender */
|
|
387
|
+
mime_type?: string;
|
|
388
|
+
/** Optional. File size in bytes */
|
|
389
|
+
file_size?: Integer;
|
|
390
|
+
/** Optional. Thumbnail of the album cover to which the music file belongs */
|
|
391
|
+
thumb?: PhotoSize;
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* This object represents a general file (as opposed to photos, voice messages and audio files).
|
|
395
|
+
* @see https://core.telegram.org/bots/api#document
|
|
396
|
+
*/
|
|
397
|
+
export interface Document {
|
|
398
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
399
|
+
file_id?: string;
|
|
400
|
+
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
401
|
+
file_unique_id?: string;
|
|
402
|
+
/** Optional. Document thumbnail as defined by sender */
|
|
403
|
+
thumb?: PhotoSize;
|
|
404
|
+
/** Optional. Original filename as defined by sender */
|
|
405
|
+
file_name?: string;
|
|
406
|
+
/** Optional. MIME type of the file as defined by sender */
|
|
407
|
+
mime_type?: string;
|
|
408
|
+
/** Optional. File size in bytes */
|
|
409
|
+
file_size?: Integer;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* This object represents a video file.
|
|
413
|
+
* @see https://core.telegram.org/bots/api#video
|
|
414
|
+
*/
|
|
415
|
+
export interface Video {
|
|
416
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
417
|
+
file_id?: string;
|
|
418
|
+
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
419
|
+
file_unique_id?: string;
|
|
420
|
+
/** Video width as defined by sender */
|
|
421
|
+
width?: Integer;
|
|
422
|
+
/** Video height as defined by sender */
|
|
423
|
+
height?: Integer;
|
|
424
|
+
/** Duration of the video in seconds as defined by sender */
|
|
425
|
+
duration?: Integer;
|
|
426
|
+
/** Optional. Video thumbnail */
|
|
427
|
+
thumb?: PhotoSize;
|
|
428
|
+
/** Optional. Original filename as defined by sender */
|
|
429
|
+
file_name?: string;
|
|
430
|
+
/** Optional. Mime type of a file as defined by sender */
|
|
431
|
+
mime_type?: string;
|
|
432
|
+
/** Optional. File size in bytes */
|
|
433
|
+
file_size?: Integer;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* This object represents a video message (available in Telegram apps as of v.4.0).
|
|
437
|
+
* @see https://core.telegram.org/bots/api#videonote
|
|
438
|
+
*/
|
|
439
|
+
export interface VideoNote {
|
|
440
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
441
|
+
file_id?: string;
|
|
442
|
+
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
443
|
+
file_unique_id?: string;
|
|
444
|
+
/** Video width and height (diameter of the video message) as defined by sender */
|
|
445
|
+
length?: Integer;
|
|
446
|
+
/** Duration of the video in seconds as defined by sender */
|
|
447
|
+
duration?: Integer;
|
|
448
|
+
/** Optional. Video thumbnail */
|
|
449
|
+
thumb?: PhotoSize;
|
|
450
|
+
/** Optional. File size in bytes */
|
|
451
|
+
file_size?: Integer;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* This object represents a voice note.
|
|
455
|
+
* @see https://core.telegram.org/bots/api#voice
|
|
456
|
+
*/
|
|
457
|
+
export interface Voice {
|
|
458
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
459
|
+
file_id?: string;
|
|
460
|
+
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
461
|
+
file_unique_id?: string;
|
|
462
|
+
/** Duration of the audio in seconds as defined by sender */
|
|
463
|
+
duration?: Integer;
|
|
464
|
+
/** Optional. MIME type of the file as defined by sender */
|
|
465
|
+
mime_type?: string;
|
|
466
|
+
/** Optional. File size in bytes */
|
|
467
|
+
file_size?: Integer;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* This object represents a phone contact.
|
|
471
|
+
* @see https://core.telegram.org/bots/api#contact
|
|
472
|
+
*/
|
|
473
|
+
export interface Contact {
|
|
474
|
+
/** Contact's phone number */
|
|
475
|
+
phone_number?: string;
|
|
476
|
+
/** Contact's first name */
|
|
477
|
+
first_name?: string;
|
|
478
|
+
/** Optional. Contact's last name */
|
|
479
|
+
last_name?: string;
|
|
480
|
+
/** Optional. Contact's user identifier in Telegram. 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. */
|
|
481
|
+
user_id?: Integer;
|
|
482
|
+
/** Optional. Additional data about the contact in the form of a vCard */
|
|
483
|
+
vcard?: string;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* This object represents an animated emoji that displays a random value.
|
|
487
|
+
* @see https://core.telegram.org/bots/api#dice
|
|
488
|
+
*/
|
|
489
|
+
export interface Dice {
|
|
490
|
+
/** Emoji on which the dice throw animation is based */
|
|
491
|
+
emoji?: string;
|
|
492
|
+
/** Value of the dice, 1-6 for "", "" and "" base emoji, 1-5 for "" and "" base emoji, 1-64 for "" base emoji */
|
|
493
|
+
value?: Integer;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* This object contains information about one answer option in a poll.
|
|
497
|
+
* @see https://core.telegram.org/bots/api#polloption
|
|
498
|
+
*/
|
|
499
|
+
export interface PollOption {
|
|
500
|
+
/** Option text, 1-100 characters */
|
|
501
|
+
text?: string;
|
|
502
|
+
/** Number of users that voted for this option */
|
|
503
|
+
voter_count?: Integer;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* This object represents an answer of a user in a non-anonymous poll.
|
|
507
|
+
* @see https://core.telegram.org/bots/api#pollanswer
|
|
508
|
+
*/
|
|
509
|
+
export interface PollAnswer {
|
|
510
|
+
/** Unique poll identifier */
|
|
511
|
+
poll_id?: string;
|
|
512
|
+
/** The user, who changed the answer to the poll */
|
|
513
|
+
user?: User;
|
|
514
|
+
/** 0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote. */
|
|
515
|
+
option_ids?: Integer[];
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* This object contains information about a poll.
|
|
519
|
+
* @see https://core.telegram.org/bots/api#poll
|
|
520
|
+
*/
|
|
521
|
+
export interface Poll {
|
|
522
|
+
/** Unique poll identifier */
|
|
523
|
+
id?: string;
|
|
524
|
+
/** Poll question, 1-300 characters */
|
|
525
|
+
question?: string;
|
|
526
|
+
/** List of poll options */
|
|
527
|
+
options?: PollOption[];
|
|
528
|
+
/** Total number of users that voted in the poll */
|
|
529
|
+
total_voter_count?: Integer;
|
|
530
|
+
/** True, if the poll is closed */
|
|
531
|
+
is_closed?: boolean;
|
|
532
|
+
/** True, if the poll is anonymous */
|
|
533
|
+
is_anonymous?: boolean;
|
|
534
|
+
/** Poll type, currently can be "regular" or "quiz" */
|
|
535
|
+
type?: string;
|
|
536
|
+
/** True, if the poll allows multiple answers */
|
|
537
|
+
allows_multiple_answers?: boolean;
|
|
538
|
+
/** Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot. */
|
|
539
|
+
correct_option_id?: Integer;
|
|
540
|
+
/** Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters */
|
|
541
|
+
explanation?: string;
|
|
542
|
+
/** Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation */
|
|
543
|
+
explanation_entities?: MessageEntity[];
|
|
544
|
+
/** Optional. Amount of time in seconds the poll will be active after creation */
|
|
545
|
+
open_period?: Integer;
|
|
546
|
+
/** Optional. Point in time (Unix timestamp) when the poll will be automatically closed */
|
|
547
|
+
close_date?: Integer;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* This object represents a point on the map.
|
|
551
|
+
* @see https://core.telegram.org/bots/api#location
|
|
552
|
+
*/
|
|
553
|
+
export interface Location {
|
|
554
|
+
/** Longitude as defined by sender */
|
|
555
|
+
longitude?: Float;
|
|
556
|
+
/** Latitude as defined by sender */
|
|
557
|
+
latitude?: Float;
|
|
558
|
+
/** Optional. The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
559
|
+
horizontal_accuracy?: Float;
|
|
560
|
+
/** Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only. */
|
|
561
|
+
live_period?: Integer;
|
|
562
|
+
/** Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only. */
|
|
563
|
+
heading?: Integer;
|
|
564
|
+
/** Optional. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. */
|
|
565
|
+
proximity_alert_radius?: Integer;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* This object represents a venue.
|
|
569
|
+
* @see https://core.telegram.org/bots/api#venue
|
|
570
|
+
*/
|
|
571
|
+
export interface Venue {
|
|
572
|
+
/** Venue location. Can't be a live location */
|
|
573
|
+
location?: Location;
|
|
574
|
+
/** Name of the venue */
|
|
575
|
+
title?: string;
|
|
576
|
+
/** Address of the venue */
|
|
577
|
+
address?: string;
|
|
578
|
+
/** Optional. Foursquare identifier of the venue */
|
|
579
|
+
foursquare_id?: string;
|
|
580
|
+
/** Optional. Foursquare type of the venue. (For example, "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".) */
|
|
581
|
+
foursquare_type?: string;
|
|
582
|
+
/** Optional. Google Places identifier of the venue */
|
|
583
|
+
google_place_id?: string;
|
|
584
|
+
/** Optional. Google Places type of the venue. (See supported types.) */
|
|
585
|
+
google_place_type?: string;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Describes data sent from a Web App to the bot.
|
|
589
|
+
* @see https://core.telegram.org/bots/api#webappdata
|
|
590
|
+
*/
|
|
591
|
+
export interface WebAppData {
|
|
592
|
+
/** The data. Be aware that a bad client can send arbitrary data in this field. */
|
|
593
|
+
data: string;
|
|
594
|
+
/** Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field. */
|
|
595
|
+
button_text: string;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
|
|
599
|
+
* @see https://core.telegram.org/bots/api#proximityalerttriggered
|
|
600
|
+
*/
|
|
601
|
+
export interface ProximityAlertTriggered {
|
|
602
|
+
/** User that triggered the alert */
|
|
603
|
+
traveler?: User;
|
|
604
|
+
/** User that set the alert */
|
|
605
|
+
watcher?: User;
|
|
606
|
+
/** The distance between the users */
|
|
607
|
+
distance?: Integer;
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* This object represents a service message about a change in auto-delete timer settings.
|
|
611
|
+
* @see https://core.telegram.org/bots/api#messageautodeletetimerchanged
|
|
612
|
+
*/
|
|
613
|
+
export interface MessageAutoDeleteTimerChanged {
|
|
614
|
+
/** New auto-delete time for messages in the chat; in seconds */
|
|
615
|
+
message_auto_delete_time?: Integer;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* This object represents a service message about a new forum topic created in the chat.
|
|
619
|
+
* @see https://core.telegram.org/bots/api#forumtopiccreated
|
|
620
|
+
*/
|
|
621
|
+
export interface ForumTopicCreated {
|
|
622
|
+
/** Name of the topic */
|
|
623
|
+
name: string;
|
|
624
|
+
/** Color of the topic icon in RGB format */
|
|
625
|
+
icon_color: number;
|
|
626
|
+
/** Optional. Unique identifier of the custom emoji shown as the topic icon */
|
|
627
|
+
icon_custom_emoji_id?: string;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* This object represents a service message about a forum topic closed in the chat. Currently holds no information.
|
|
631
|
+
* @see https://core.telegram.org/bots/api#forumtopicclosed
|
|
632
|
+
*/
|
|
633
|
+
export interface ForumTopicClosed {
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* This object represents a service message about an edited forum topic.
|
|
637
|
+
* @see https://core.telegram.org/bots/api#forumtopicedited
|
|
638
|
+
*/
|
|
639
|
+
export interface ForumTopicEdited {
|
|
640
|
+
/** Optional. New name of the topic, if it was edited */
|
|
641
|
+
name?: string;
|
|
642
|
+
/** Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed */
|
|
643
|
+
icon_custom_emoji_id?: string;
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* This object represents a service message about a forum topic reopened in the chat. Currently holds no information.
|
|
647
|
+
* @see https://core.telegram.org/bots/api#forumtopicreopened
|
|
648
|
+
*/
|
|
649
|
+
export interface ForumTopicReopened {
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.
|
|
653
|
+
* @see https://core.telegram.org/bots/api#generalforumtopicunhidden
|
|
654
|
+
*/
|
|
655
|
+
export interface GeneralForumTopicUnhidden {
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.
|
|
659
|
+
* @see https://core.telegram.org/bots/api#writeaccessallowed
|
|
660
|
+
*/
|
|
661
|
+
export interface WriteAccessAllowed {
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* This object represents a service message about General forum topic hidden in the chat. Currently holds no information.
|
|
665
|
+
* @see https://core.telegram.org/bots/api#generalforumtopichidden
|
|
666
|
+
*/
|
|
667
|
+
export interface GeneralForumTopicHidden {
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* This object represents a service message about a voice chat scheduled in the chat.
|
|
671
|
+
* @see https://core.telegram.org/bots/api#voicechatscheduled
|
|
672
|
+
*/
|
|
673
|
+
export interface VoiceChatScheduled {
|
|
674
|
+
/** Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator */
|
|
675
|
+
start_date?: Integer;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* This object represents a service message about a voice chat started in the chat. Currently holds no information.
|
|
679
|
+
* @see https://core.telegram.org/bots/api#voicechatstarted
|
|
680
|
+
*/
|
|
681
|
+
export type VoiceChatStarted = any;
|
|
682
|
+
/**
|
|
683
|
+
* This object represents a service message about a voice chat ended in the chat.
|
|
684
|
+
* @see https://core.telegram.org/bots/api#voicechatended
|
|
685
|
+
*/
|
|
686
|
+
export interface VoiceChatEnded {
|
|
687
|
+
/** Voice chat duration in seconds */
|
|
688
|
+
duration?: Integer;
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* This object represents a service message about new members invited to a voice chat.
|
|
692
|
+
* @see https://core.telegram.org/bots/api#voicechatparticipantsinvited
|
|
693
|
+
*/
|
|
694
|
+
export interface VoiceChatParticipantsInvited {
|
|
695
|
+
/** Optional. New members that were invited to the voice chat */
|
|
696
|
+
users?: User[];
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* This object represent a user's profile pictures.
|
|
700
|
+
* @see https://core.telegram.org/bots/api#userprofilephotos
|
|
701
|
+
*/
|
|
702
|
+
export interface UserProfilePhotos {
|
|
703
|
+
/** Total number of profile pictures the target user has */
|
|
704
|
+
total_count?: Integer;
|
|
705
|
+
/** Requested profile pictures (in up to 4 sizes each) */
|
|
706
|
+
photos?: PhotoSize[][];
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.
|
|
710
|
+
* Maximum file size to download is 20 MB
|
|
711
|
+
* @see https://core.telegram.org/bots/api#file
|
|
712
|
+
*/
|
|
713
|
+
export interface File {
|
|
714
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
715
|
+
file_id?: string;
|
|
716
|
+
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
717
|
+
file_unique_id?: string;
|
|
718
|
+
/** Optional. File size in bytes, if known */
|
|
719
|
+
file_size?: Integer;
|
|
720
|
+
/** Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file. */
|
|
721
|
+
file_path?: string;
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Describes a Web App.
|
|
725
|
+
* @see https://core.telegram.org/bots/api#webappinfo
|
|
726
|
+
*/
|
|
727
|
+
export interface WebAppInfo {
|
|
728
|
+
/** An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps */
|
|
729
|
+
url: string;
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
|
|
733
|
+
* @see https://core.telegram.org/bots/api#replykeyboardmarkup
|
|
734
|
+
*/
|
|
735
|
+
export interface ReplyKeyboardMarkup {
|
|
736
|
+
/** button rows, each represented by an Array of KeyboardButton objects */
|
|
737
|
+
keyboard?: KeyboardButton[][];
|
|
738
|
+
/** Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon. */
|
|
739
|
+
is_persistent?: boolean;
|
|
740
|
+
/** Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard. */
|
|
741
|
+
resize_keyboard?: boolean;
|
|
742
|
+
/** Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to false. */
|
|
743
|
+
one_time_keyboard?: boolean;
|
|
744
|
+
/** Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters */
|
|
745
|
+
input_field_placeholder?: string;
|
|
746
|
+
/** Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
|
|
747
|
+
|
|
748
|
+
Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard. */
|
|
749
|
+
selective?: boolean;
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive.
|
|
753
|
+
* @see https://core.telegram.org/bots/api#keyboardbutton
|
|
754
|
+
*/
|
|
755
|
+
export interface KeyboardButton {
|
|
756
|
+
/** Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed */
|
|
757
|
+
text?: string;
|
|
758
|
+
/** Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only */
|
|
759
|
+
request_contact?: boolean;
|
|
760
|
+
/** Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only */
|
|
761
|
+
request_location?: boolean;
|
|
762
|
+
/** Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only */
|
|
763
|
+
request_poll?: KeyboardButtonPollType;
|
|
764
|
+
/** Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only. */
|
|
765
|
+
web_app?: WebAppInfo;
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
|
|
769
|
+
* @see https://core.telegram.org/bots/api#keyboardbuttonpolltype
|
|
770
|
+
*/
|
|
771
|
+
export interface KeyboardButtonPollType {
|
|
772
|
+
/** Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type. */
|
|
773
|
+
type?: string;
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
* Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).
|
|
777
|
+
* @see https://core.telegram.org/bots/api#replykeyboardremove
|
|
778
|
+
*/
|
|
779
|
+
export interface ReplyKeyboardRemove {
|
|
780
|
+
/** Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup) */
|
|
781
|
+
remove_keyboard?: boolean;
|
|
782
|
+
/** Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
|
|
783
|
+
|
|
784
|
+
Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet. */
|
|
785
|
+
selective?: boolean;
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* This object represents an inline keyboard that appears right next to the message it belongs to.
|
|
789
|
+
* @see https://core.telegram.org/bots/api#inlinekeyboardmarkup
|
|
790
|
+
*/
|
|
791
|
+
export interface InlineKeyboardMarkup {
|
|
792
|
+
/** button rows, each represented by an Array of InlineKeyboardButton objects */
|
|
793
|
+
inline_keyboard?: InlineKeyboardButton[][];
|
|
794
|
+
}
|
|
795
|
+
/** A reply to an existing message, addressed by id. */
|
|
796
|
+
export interface ReplyParameters {
|
|
797
|
+
/** Identifier of the message to reply to. */
|
|
798
|
+
message_id: Integer;
|
|
799
|
+
/** Send the reply even if the original message is missing. */
|
|
800
|
+
allow_sending_without_reply?: boolean;
|
|
801
|
+
}
|
|
802
|
+
/** Options for link previews in a text message. */
|
|
803
|
+
export interface LinkPreviewOptions {
|
|
804
|
+
/** Disable the link preview. */
|
|
805
|
+
is_disabled?: boolean;
|
|
806
|
+
}
|
|
807
|
+
/** Telegram's JSON envelope for every Bot API method. */
|
|
808
|
+
export interface TelegramResponse<T> {
|
|
809
|
+
ok: boolean;
|
|
810
|
+
result?: T;
|
|
811
|
+
error_code?: Integer;
|
|
812
|
+
description?: string;
|
|
813
|
+
parameters?: {
|
|
814
|
+
retry_after?: Integer;
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
|
|
819
|
+
* @see https://core.telegram.org/bots/api#inlinekeyboardbutton
|
|
820
|
+
*/
|
|
821
|
+
export interface InlineKeyboardButton {
|
|
822
|
+
/** Label text on the button */
|
|
823
|
+
text?: string;
|
|
824
|
+
/** Optional. HTTP or tg:// url to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings. */
|
|
825
|
+
url?: string;
|
|
826
|
+
/** Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget. */
|
|
827
|
+
login_url?: LoginUrl;
|
|
828
|
+
/** Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes */
|
|
829
|
+
callback_data?: string;
|
|
830
|
+
/** Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. */
|
|
831
|
+
web_app?: WebAppInfo;
|
|
832
|
+
/**
|
|
833
|
+
* Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted.
|
|
834
|
+
*
|
|
835
|
+
* Note: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm... actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.
|
|
836
|
+
*/
|
|
837
|
+
switch_inline_query?: string;
|
|
838
|
+
/**
|
|
839
|
+
* Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted.
|
|
840
|
+
*
|
|
841
|
+
* This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options.
|
|
842
|
+
*/
|
|
843
|
+
switch_inline_query_current_chat?: string;
|
|
844
|
+
/**
|
|
845
|
+
* Optional. Description of the game that will be launched when the user presses the button.
|
|
846
|
+
*
|
|
847
|
+
* NOTE: This type of button must always be the first button in the first row.
|
|
848
|
+
*/
|
|
849
|
+
callback_game?: CallbackGame;
|
|
850
|
+
/**
|
|
851
|
+
* Optional. Specify True, to send a Pay button.
|
|
852
|
+
*
|
|
853
|
+
* NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.
|
|
854
|
+
*/
|
|
855
|
+
pay?: boolean;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:
|
|
859
|
+
*
|
|
860
|
+
* Telegram apps support these buttons as of version 5.7.
|
|
861
|
+
* Sample bot: @discussbot
|
|
862
|
+
* @see https://core.telegram.org/bots/api#loginurl
|
|
863
|
+
*/
|
|
864
|
+
export interface LoginUrl {
|
|
865
|
+
/**
|
|
866
|
+
* An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
|
|
867
|
+
*
|
|
868
|
+
* NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.
|
|
869
|
+
*/
|
|
870
|
+
url?: string;
|
|
871
|
+
/** Optional. New text of the button in forwarded messages. */
|
|
872
|
+
forward_text?: string;
|
|
873
|
+
/** Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details. */
|
|
874
|
+
bot_username?: string;
|
|
875
|
+
/** Optional. Pass True to request the permission for your bot to send messages to the user. */
|
|
876
|
+
request_write_access?: boolean;
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
|
|
880
|
+
* @see https://core.telegram.org/bots/api#callbackquery
|
|
881
|
+
*/
|
|
882
|
+
export interface CallbackQuery {
|
|
883
|
+
/** Unique identifier for this query */
|
|
884
|
+
id?: string;
|
|
885
|
+
/** Sender */
|
|
886
|
+
from?: User;
|
|
887
|
+
/** Optional. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old */
|
|
888
|
+
message?: Message;
|
|
889
|
+
/** Optional. Identifier of the message sent via the bot in inline mode, that originated the query. */
|
|
890
|
+
inline_message_id?: string;
|
|
891
|
+
/** Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. */
|
|
892
|
+
chat_instance?: string;
|
|
893
|
+
/** Optional. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field. */
|
|
894
|
+
data?: string;
|
|
895
|
+
/** Optional. Short name of a Game to be returned, serves as the unique identifier for the game */
|
|
896
|
+
game_short_name?: string;
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.
|
|
900
|
+
* @see https://core.telegram.org/bots/api#forcereply
|
|
901
|
+
*/
|
|
902
|
+
export interface ForceReply {
|
|
903
|
+
/** Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply' */
|
|
904
|
+
force_reply?: boolean;
|
|
905
|
+
/** Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters */
|
|
906
|
+
input_field_placeholder?: string;
|
|
907
|
+
/** Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. */
|
|
908
|
+
selective?: boolean;
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* This object represents a chat photo.
|
|
912
|
+
* @see https://core.telegram.org/bots/api#chatphoto
|
|
913
|
+
*/
|
|
914
|
+
export interface ChatPhoto {
|
|
915
|
+
/** File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed. */
|
|
916
|
+
small_file_id?: string;
|
|
917
|
+
/** Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
918
|
+
small_file_unique_id?: string;
|
|
919
|
+
/** File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed. */
|
|
920
|
+
big_file_id?: string;
|
|
921
|
+
/** Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
922
|
+
big_file_unique_id?: string;
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* Represents an invite link for a chat.
|
|
926
|
+
* @see https://core.telegram.org/bots/api#chatinvitelink
|
|
927
|
+
*/
|
|
928
|
+
export interface ChatInviteLink {
|
|
929
|
+
/** The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with "...". */
|
|
930
|
+
invite_link?: string;
|
|
931
|
+
/** Creator of the link */
|
|
932
|
+
creator?: User;
|
|
933
|
+
/** True, if users joining the chat via the link need to be approved by chat administrators */
|
|
934
|
+
creates_join_request?: boolean;
|
|
935
|
+
/** True, if the link is primary */
|
|
936
|
+
is_primary?: boolean;
|
|
937
|
+
/** True, if the link is revoked */
|
|
938
|
+
is_revoked?: boolean;
|
|
939
|
+
/** Optional. Invite link name */
|
|
940
|
+
name?: string;
|
|
941
|
+
/** Optional. Point in time (Unix timestamp) when the link will expire or has been expired */
|
|
942
|
+
expire_date?: Integer;
|
|
943
|
+
/** Optional. Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 */
|
|
944
|
+
member_limit?: Integer;
|
|
945
|
+
/** Optional. Number of pending join requests created using this link */
|
|
946
|
+
pending_join_request_count?: Integer;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* Represents the rights of an administrator in a chat.
|
|
950
|
+
* @see https://core.telegram.org/bots/api#chatadministratorrights
|
|
951
|
+
*/
|
|
952
|
+
export interface ChatAdministratorRights {
|
|
953
|
+
/** True, if the user's presence in the chat is hidden */
|
|
954
|
+
is_anonymous: boolean;
|
|
955
|
+
/** True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
|
|
956
|
+
can_manage_chat: boolean;
|
|
957
|
+
/** True, if the administrator can delete messages of other users */
|
|
958
|
+
can_delete_messages: boolean;
|
|
959
|
+
/** True, if the administrator can manage video chats */
|
|
960
|
+
can_manage_video_chats: boolean;
|
|
961
|
+
/** True, if the administrator can restrict, ban or unban chat members */
|
|
962
|
+
can_restrict_members: boolean;
|
|
963
|
+
/** True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user) */
|
|
964
|
+
can_promote_members: boolean;
|
|
965
|
+
/** True, if the user is allowed to change the chat title, photo and other settings */
|
|
966
|
+
can_change_info: boolean;
|
|
967
|
+
/** True, if the user is allowed to invite new users to the chat */
|
|
968
|
+
can_invite_users: boolean;
|
|
969
|
+
/** Optional. True, if the administrator can post in the channel; channels only */
|
|
970
|
+
can_post_messages?: boolean;
|
|
971
|
+
/** Optional. True, if the administrator can edit messages of other users and can pin messages; channels only */
|
|
972
|
+
can_edit_messages?: boolean;
|
|
973
|
+
/** Optional. True, if the user is allowed to pin messages; groups and supergroups only */
|
|
974
|
+
can_pin_messages?: boolean;
|
|
975
|
+
/** Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */
|
|
976
|
+
can_manage_topics?: boolean;
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
|
|
980
|
+
* - ChatMemberOwner
|
|
981
|
+
* - ChatMemberAdministrator
|
|
982
|
+
* - ChatMemberMember
|
|
983
|
+
* - ChatMemberRestricted
|
|
984
|
+
* - ChatMemberLeft
|
|
985
|
+
* - ChatMemberBanned
|
|
986
|
+
* @see https://core.telegram.org/bots/api#chatmember
|
|
987
|
+
*/
|
|
988
|
+
export type ChatMember = ChatMemberOwner | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned;
|
|
989
|
+
/**
|
|
990
|
+
* Represents a chat member that owns the chat and has all administrator privileges.
|
|
991
|
+
* @see https://core.telegram.org/bots/api#chatmemberowner
|
|
992
|
+
*/
|
|
993
|
+
export interface ChatMemberOwner {
|
|
994
|
+
/** The member's status in the chat, always "creator" */
|
|
995
|
+
status?: 'creator';
|
|
996
|
+
/** Information about the user */
|
|
997
|
+
user?: User;
|
|
998
|
+
/** True, if the user's presence in the chat is hidden */
|
|
999
|
+
is_anonymous?: boolean;
|
|
1000
|
+
/** Optional. Custom title for this user */
|
|
1001
|
+
custom_title?: string;
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* Represents a chat member that has some additional privileges.
|
|
1005
|
+
* @see https://core.telegram.org/bots/api#chatmemberadministrator
|
|
1006
|
+
*/
|
|
1007
|
+
export interface ChatMemberAdministrator {
|
|
1008
|
+
/** The member's status in the chat, always "administrator" */
|
|
1009
|
+
status?: 'administrator';
|
|
1010
|
+
/** Information about the user */
|
|
1011
|
+
user?: User;
|
|
1012
|
+
/** True, if the bot is allowed to edit administrator privileges of that user */
|
|
1013
|
+
can_be_edited?: boolean;
|
|
1014
|
+
/** True, if the user's presence in the chat is hidden */
|
|
1015
|
+
is_anonymous?: boolean;
|
|
1016
|
+
/** True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
|
|
1017
|
+
can_manage_chat?: boolean;
|
|
1018
|
+
/** True, if the administrator can delete messages of other users */
|
|
1019
|
+
can_delete_messages?: boolean;
|
|
1020
|
+
/**
|
|
1021
|
+
* True, if the administrator can manage voice chats
|
|
1022
|
+
* @deprecated
|
|
1023
|
+
*/
|
|
1024
|
+
can_manage_voice_chats?: boolean;
|
|
1025
|
+
/** True, if the administrator can manage voice chats */
|
|
1026
|
+
can_manage_video_chats?: boolean;
|
|
1027
|
+
/** True, if the administrator can restrict, ban or unban chat members */
|
|
1028
|
+
can_restrict_members?: boolean;
|
|
1029
|
+
/** True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user) */
|
|
1030
|
+
can_promote_members?: boolean;
|
|
1031
|
+
/** True, if the user is allowed to change the chat title, photo and other settings */
|
|
1032
|
+
can_change_info?: boolean;
|
|
1033
|
+
/** True, if the user is allowed to invite new users to the chat */
|
|
1034
|
+
can_invite_users?: boolean;
|
|
1035
|
+
/** Optional. True, if the administrator can post in the channel; channels only */
|
|
1036
|
+
can_post_messages?: boolean;
|
|
1037
|
+
/** Optional. True, if the administrator can edit messages of other users and can pin messages; channels only */
|
|
1038
|
+
can_edit_messages?: boolean;
|
|
1039
|
+
/** Optional. True, if the user is allowed to pin messages; groups and supergroups only */
|
|
1040
|
+
can_pin_messages?: boolean;
|
|
1041
|
+
/** Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */
|
|
1042
|
+
can_manage_topics?: boolean;
|
|
1043
|
+
/** Optional. Custom title for this user */
|
|
1044
|
+
custom_title?: string;
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Represents a chat member that has no additional privileges or restrictions.
|
|
1048
|
+
* @see https://core.telegram.org/bots/api#chatmembermember
|
|
1049
|
+
*/
|
|
1050
|
+
export interface ChatMemberMember {
|
|
1051
|
+
/** The member's status in the chat, always "member" */
|
|
1052
|
+
status?: 'member';
|
|
1053
|
+
/** Information about the user */
|
|
1054
|
+
user?: User;
|
|
1055
|
+
}
|
|
1056
|
+
/**
|
|
1057
|
+
* Represents a chat member that is under certain restrictions in the chat. Supergroups only.
|
|
1058
|
+
* @see https://core.telegram.org/bots/api#chatmemberrestricted
|
|
1059
|
+
*/
|
|
1060
|
+
export interface ChatMemberRestricted {
|
|
1061
|
+
/** The member's status in the chat, always "restricted" */
|
|
1062
|
+
status?: 'restricted';
|
|
1063
|
+
/** Information about the user */
|
|
1064
|
+
user?: User;
|
|
1065
|
+
/** True, if the user is a member of the chat at the moment of the request */
|
|
1066
|
+
is_member?: boolean;
|
|
1067
|
+
/** True, if the user is allowed to change the chat title, photo and other settings */
|
|
1068
|
+
can_change_info?: boolean;
|
|
1069
|
+
/** True, if the user is allowed to invite new users to the chat */
|
|
1070
|
+
can_invite_users?: boolean;
|
|
1071
|
+
/** True, if the user is allowed to pin messages */
|
|
1072
|
+
can_pin_messages?: boolean;
|
|
1073
|
+
/** True, if the user is allowed to create forum topics */
|
|
1074
|
+
can_manage_topics: boolean;
|
|
1075
|
+
/** True, if the user is allowed to send text messages, contacts, locations and venues */
|
|
1076
|
+
can_send_messages?: boolean;
|
|
1077
|
+
/** True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes */
|
|
1078
|
+
can_send_media_messages?: boolean;
|
|
1079
|
+
/** True, if the user is allowed to send polls */
|
|
1080
|
+
can_send_polls?: boolean;
|
|
1081
|
+
/** True, if the user is allowed to send animations, games, stickers and use inline bots */
|
|
1082
|
+
can_send_other_messages?: boolean;
|
|
1083
|
+
/** True, if the user is allowed to add web page previews to their messages */
|
|
1084
|
+
can_add_web_page_previews?: boolean;
|
|
1085
|
+
/** Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever */
|
|
1086
|
+
until_date?: Integer;
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* Represents a chat member that isn't currently a member of the chat, but may join it themselves.
|
|
1090
|
+
* @see https://core.telegram.org/bots/api#chatmemberleft
|
|
1091
|
+
*/
|
|
1092
|
+
export interface ChatMemberLeft {
|
|
1093
|
+
/** The member's status in the chat, always "left" */
|
|
1094
|
+
status?: 'left';
|
|
1095
|
+
/** Information about the user */
|
|
1096
|
+
user?: User;
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.
|
|
1100
|
+
* @see https://core.telegram.org/bots/api#chatmemberbanned
|
|
1101
|
+
*/
|
|
1102
|
+
export interface ChatMemberBanned {
|
|
1103
|
+
/** The member's status in the chat, always "kicked" */
|
|
1104
|
+
status?: 'kicked';
|
|
1105
|
+
/** Information about the user */
|
|
1106
|
+
user?: User;
|
|
1107
|
+
/** Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever */
|
|
1108
|
+
until_date?: Integer;
|
|
1109
|
+
}
|
|
1110
|
+
/**
|
|
1111
|
+
* This object represents changes in the status of a chat member.
|
|
1112
|
+
* @see https://core.telegram.org/bots/api#chatmemberupdated
|
|
1113
|
+
*/
|
|
1114
|
+
export interface ChatMemberUpdated {
|
|
1115
|
+
/** Chat the user belongs to */
|
|
1116
|
+
chat?: Chat;
|
|
1117
|
+
/** Performer of the action, which resulted in the change */
|
|
1118
|
+
from?: User;
|
|
1119
|
+
/** Date the change was done in Unix time */
|
|
1120
|
+
date?: Integer;
|
|
1121
|
+
/** Previous information about the chat member */
|
|
1122
|
+
old_chat_member?: ChatMember;
|
|
1123
|
+
/** New information about the chat member */
|
|
1124
|
+
new_chat_member?: ChatMember;
|
|
1125
|
+
/** Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only. */
|
|
1126
|
+
invite_link?: ChatInviteLink;
|
|
1127
|
+
}
|
|
1128
|
+
/**
|
|
1129
|
+
* Represents a join request sent to a chat.
|
|
1130
|
+
* @see https://core.telegram.org/bots/api#chatjoinrequest
|
|
1131
|
+
*/
|
|
1132
|
+
export interface ChatJoinRequest {
|
|
1133
|
+
/** Chat to which the request was sent */
|
|
1134
|
+
chat?: Chat;
|
|
1135
|
+
/** User that sent the join request */
|
|
1136
|
+
from?: User;
|
|
1137
|
+
/** Date the request was sent in Unix time */
|
|
1138
|
+
date?: Integer;
|
|
1139
|
+
/** Optional. Bio of the user. */
|
|
1140
|
+
bio?: string;
|
|
1141
|
+
/** Optional. Chat invite link that was used by the user to send the join request */
|
|
1142
|
+
invite_link?: ChatInviteLink;
|
|
1143
|
+
}
|
|
1144
|
+
/**
|
|
1145
|
+
* Describes actions that a non-administrator user is allowed to take in a chat.
|
|
1146
|
+
* @see https://core.telegram.org/bots/api#chatpermissions
|
|
1147
|
+
*/
|
|
1148
|
+
export interface ChatPermissions {
|
|
1149
|
+
/** Optional. True, if the user is allowed to send text messages, contacts, locations and venues */
|
|
1150
|
+
can_send_messages?: boolean;
|
|
1151
|
+
/** Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages */
|
|
1152
|
+
can_send_media_messages?: boolean;
|
|
1153
|
+
/** Optional. True, if the user is allowed to send polls, implies can_send_messages */
|
|
1154
|
+
can_send_polls?: boolean;
|
|
1155
|
+
/** Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages */
|
|
1156
|
+
can_send_other_messages?: boolean;
|
|
1157
|
+
/** Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages */
|
|
1158
|
+
can_add_web_page_previews?: boolean;
|
|
1159
|
+
/** Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups */
|
|
1160
|
+
can_change_info?: boolean;
|
|
1161
|
+
/** Optional. True, if the user is allowed to invite new users to the chat */
|
|
1162
|
+
can_invite_users?: boolean;
|
|
1163
|
+
/** Optional. True, if the user is allowed to pin messages. Ignored in public supergroups */
|
|
1164
|
+
can_pin_messages?: boolean;
|
|
1165
|
+
/** Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages */
|
|
1166
|
+
can_manage_topics?: boolean;
|
|
1167
|
+
}
|
|
1168
|
+
/**
|
|
1169
|
+
* Represents a location to which a chat is connected.
|
|
1170
|
+
* @see https://core.telegram.org/bots/api#chatlocation
|
|
1171
|
+
*/
|
|
1172
|
+
export interface ChatLocation {
|
|
1173
|
+
/** The location to which the supergroup is connected. Can't be a live location. */
|
|
1174
|
+
location?: Location;
|
|
1175
|
+
/** Location address; 1-64 characters, as defined by the chat owner */
|
|
1176
|
+
address?: string;
|
|
1177
|
+
}
|
|
1178
|
+
export interface ForumTopic {
|
|
1179
|
+
/** Unique identifier of the forum topic */
|
|
1180
|
+
message_thread_id: number;
|
|
1181
|
+
/** Name of the topic */
|
|
1182
|
+
name: string;
|
|
1183
|
+
/** Color of the topic icon in RGB format */
|
|
1184
|
+
icon_color: number;
|
|
1185
|
+
/** Optional. Unique identifier of the custom emoji shown as the topic icon */
|
|
1186
|
+
icon_custom_emoji_id?: string;
|
|
1187
|
+
}
|
|
1188
|
+
/**
|
|
1189
|
+
* This object represents a bot command.
|
|
1190
|
+
* @see https://core.telegram.org/bots/api#botcommand
|
|
1191
|
+
*/
|
|
1192
|
+
export interface BotCommand {
|
|
1193
|
+
/** Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores. */
|
|
1194
|
+
command?: string;
|
|
1195
|
+
/** Description of the command; 1-256 characters. */
|
|
1196
|
+
description?: string;
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:
|
|
1200
|
+
* - BotCommandScopeDefault
|
|
1201
|
+
* - BotCommandScopeAllPrivateChats
|
|
1202
|
+
* - BotCommandScopeAllGroupChats
|
|
1203
|
+
* - BotCommandScopeAllChatAdministrators
|
|
1204
|
+
* - BotCommandScopeChat
|
|
1205
|
+
* - BotCommandScopeChatAdministrators
|
|
1206
|
+
* - BotCommandScopeChatMember
|
|
1207
|
+
* @see https://core.telegram.org/bots/api#botcommandscope
|
|
1208
|
+
*/
|
|
1209
|
+
export type BotCommandScope = BotCommandScopeDefault | BotCommandScopeAllPrivateChats | BotCommandScopeAllGroupChats | BotCommandScopeAllChatAdministrators | BotCommandScopeChat | BotCommandScopeChatAdministrators | BotCommandScopeChatMember;
|
|
1210
|
+
/**
|
|
1211
|
+
* Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.
|
|
1212
|
+
* @see https://core.telegram.org/bots/api#botcommandscopedefault
|
|
1213
|
+
*/
|
|
1214
|
+
export interface BotCommandScopeDefault {
|
|
1215
|
+
/** Scope type, must be default */
|
|
1216
|
+
type?: string;
|
|
1217
|
+
}
|
|
1218
|
+
/**
|
|
1219
|
+
* Represents the scope of bot commands, covering all private chats.
|
|
1220
|
+
* @see https://core.telegram.org/bots/api#botcommandscopeallprivatechats
|
|
1221
|
+
*/
|
|
1222
|
+
export interface BotCommandScopeAllPrivateChats {
|
|
1223
|
+
/** Scope type, must be all_private_chats */
|
|
1224
|
+
type?: string;
|
|
1225
|
+
}
|
|
1226
|
+
/**
|
|
1227
|
+
* Represents the scope of bot commands, covering all group and supergroup chats.
|
|
1228
|
+
* @see https://core.telegram.org/bots/api#botcommandscopeallgroupchats
|
|
1229
|
+
*/
|
|
1230
|
+
export interface BotCommandScopeAllGroupChats {
|
|
1231
|
+
/** Scope type, must be all_group_chats */
|
|
1232
|
+
type?: string;
|
|
1233
|
+
}
|
|
1234
|
+
/**
|
|
1235
|
+
* Represents the scope of bot commands, covering all group and supergroup chat administrators.
|
|
1236
|
+
* @see https://core.telegram.org/bots/api#botcommandscopeallchatadministrators
|
|
1237
|
+
*/
|
|
1238
|
+
export interface BotCommandScopeAllChatAdministrators {
|
|
1239
|
+
/** Scope type, must be all_chat_administrators */
|
|
1240
|
+
type?: string;
|
|
1241
|
+
}
|
|
1242
|
+
/**
|
|
1243
|
+
* Represents the scope of bot commands, covering a specific chat.
|
|
1244
|
+
* @see https://core.telegram.org/bots/api#botcommandscopechat
|
|
1245
|
+
*/
|
|
1246
|
+
export interface BotCommandScopeChat {
|
|
1247
|
+
/** Scope type, must be chat */
|
|
1248
|
+
type?: string;
|
|
1249
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1250
|
+
chat_id?: Integer | string;
|
|
1251
|
+
}
|
|
1252
|
+
/**
|
|
1253
|
+
* Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
|
|
1254
|
+
* @see https://core.telegram.org/bots/api#botcommandscopechatadministrators
|
|
1255
|
+
*/
|
|
1256
|
+
export interface BotCommandScopeChatAdministrators {
|
|
1257
|
+
/** Scope type, must be chat_administrators */
|
|
1258
|
+
type?: string;
|
|
1259
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1260
|
+
chat_id?: Integer | string;
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
|
|
1264
|
+
* @see https://core.telegram.org/bots/api#botcommandscopechatmember
|
|
1265
|
+
*/
|
|
1266
|
+
export interface BotCommandScopeChatMember {
|
|
1267
|
+
/** Scope type, must be chat_member */
|
|
1268
|
+
type?: string;
|
|
1269
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1270
|
+
chat_id?: Integer | string;
|
|
1271
|
+
/** Unique identifier of the target user */
|
|
1272
|
+
user_id?: Integer;
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* This object describes the bot's menu button in a private chat. It should be one of
|
|
1276
|
+
* - MenuButtonCommands
|
|
1277
|
+
* - MenuButtonWebApp
|
|
1278
|
+
* - MenuButtonDefault
|
|
1279
|
+
* If a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.
|
|
1280
|
+
* @see https://core.telegram.org/bots/api#menubutton
|
|
1281
|
+
*/
|
|
1282
|
+
export type MenuButton = MenuButtonCommands | MenuButtonWebApp | MenuButtonDefault;
|
|
1283
|
+
/**
|
|
1284
|
+
* Represents a menu button, which opens the bot's list of commands.
|
|
1285
|
+
* @see https://core.telegram.org/bots/api#menubuttoncommands
|
|
1286
|
+
*/
|
|
1287
|
+
export interface MenuButtonCommands {
|
|
1288
|
+
/** Type of the button, must be commands */
|
|
1289
|
+
type: string;
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* Represents a menu button, which launches a Web App.
|
|
1293
|
+
* @see https://core.telegram.org/bots/api#menubuttonwebapp
|
|
1294
|
+
*/
|
|
1295
|
+
export interface MenuButtonWebApp {
|
|
1296
|
+
/** Type of the button, must be web_app */
|
|
1297
|
+
type: string;
|
|
1298
|
+
/** Text on the button */
|
|
1299
|
+
text: string;
|
|
1300
|
+
/** Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. */
|
|
1301
|
+
web_app: WebAppInfo;
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* Describes that no specific value for the menu button was set.
|
|
1305
|
+
* @see https://core.telegram.org/bots/api#menubuttondefault
|
|
1306
|
+
*/
|
|
1307
|
+
export interface MenuButtonDefault {
|
|
1308
|
+
/** Type of the button, must be default */
|
|
1309
|
+
type: string;
|
|
1310
|
+
}
|
|
1311
|
+
/**
|
|
1312
|
+
* Contains information about why a request was unsuccessful.
|
|
1313
|
+
* @see https://core.telegram.org/bots/api#responseparameters
|
|
1314
|
+
*/
|
|
1315
|
+
export interface ResponseParameters {
|
|
1316
|
+
/** Optional. The group has been migrated to a supergroup with the specified identifier. 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. */
|
|
1317
|
+
migrate_to_chat_id?: Integer;
|
|
1318
|
+
/** Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated */
|
|
1319
|
+
retry_after?: Integer;
|
|
1320
|
+
}
|
|
1321
|
+
/**
|
|
1322
|
+
* This object represents the content of a media message to be sent. It should be one of
|
|
1323
|
+
* - InputMediaAnimation
|
|
1324
|
+
* - InputMediaDocument
|
|
1325
|
+
* - InputMediaAudio
|
|
1326
|
+
* - InputMediaPhoto
|
|
1327
|
+
* - InputMediaVideo
|
|
1328
|
+
* @see https://core.telegram.org/bots/api#inputmedia
|
|
1329
|
+
*/
|
|
1330
|
+
export type InputMedia = InputMediaAnimation | InputMediaDocument | InputMediaAudio | InputMediaPhoto | InputMediaVideo;
|
|
1331
|
+
/**
|
|
1332
|
+
* Represents a photo to be sent.
|
|
1333
|
+
* @see https://core.telegram.org/bots/api#inputmediaphoto
|
|
1334
|
+
*/
|
|
1335
|
+
export interface InputMediaPhoto {
|
|
1336
|
+
/** Type of the result, must be photo */
|
|
1337
|
+
type?: string;
|
|
1338
|
+
/** File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files » */
|
|
1339
|
+
media?: string;
|
|
1340
|
+
/** Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing */
|
|
1341
|
+
caption?: string;
|
|
1342
|
+
/** Optional. Mode for parsing entities in the photo caption. See formatting options for more details. */
|
|
1343
|
+
parse_mode?: string;
|
|
1344
|
+
/** Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1345
|
+
caption_entities?: MessageEntity[];
|
|
1346
|
+
/** Optional. Pass True if the photo needs to be covered with a spoiler animation */
|
|
1347
|
+
has_spoiler?: boolean;
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Represents a video to be sent.
|
|
1351
|
+
* @see https://core.telegram.org/bots/api#inputmediavideo
|
|
1352
|
+
*/
|
|
1353
|
+
export interface InputMediaVideo {
|
|
1354
|
+
/** Type of the result, must be video */
|
|
1355
|
+
type?: string;
|
|
1356
|
+
/** File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files » */
|
|
1357
|
+
media?: string;
|
|
1358
|
+
/** Optional. 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>. More info on Sending Files » */
|
|
1359
|
+
thumb?: InputFile | string;
|
|
1360
|
+
/** Optional. Caption of the video to be sent, 0-1024 characters after entities parsing */
|
|
1361
|
+
caption?: string;
|
|
1362
|
+
/** Optional. Mode for parsing entities in the video caption. See formatting options for more details. */
|
|
1363
|
+
parse_mode?: string;
|
|
1364
|
+
/** Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1365
|
+
caption_entities?: MessageEntity[];
|
|
1366
|
+
/** Optional. Video width */
|
|
1367
|
+
width?: Integer;
|
|
1368
|
+
/** Optional. Video height */
|
|
1369
|
+
height?: Integer;
|
|
1370
|
+
/** Optional. Video duration in seconds */
|
|
1371
|
+
duration?: Integer;
|
|
1372
|
+
/** Optional. Pass True, if the uploaded video is suitable for streaming */
|
|
1373
|
+
supports_streaming?: boolean;
|
|
1374
|
+
/** Optional. Pass True if the video needs to be covered with a spoiler animation */
|
|
1375
|
+
has_spoiler?: boolean;
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
|
|
1379
|
+
* @see https://core.telegram.org/bots/api#inputmediaanimation
|
|
1380
|
+
*/
|
|
1381
|
+
export interface InputMediaAnimation {
|
|
1382
|
+
/** Type of the result, must be animation */
|
|
1383
|
+
type?: string;
|
|
1384
|
+
/** File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files » */
|
|
1385
|
+
media?: string;
|
|
1386
|
+
/** Optional. 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>. More info on Sending Files » */
|
|
1387
|
+
thumb?: InputFile | string;
|
|
1388
|
+
/** Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing */
|
|
1389
|
+
caption?: string;
|
|
1390
|
+
/** Optional. Mode for parsing entities in the animation caption. See formatting options for more details. */
|
|
1391
|
+
parse_mode?: string;
|
|
1392
|
+
/** Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1393
|
+
caption_entities?: MessageEntity[];
|
|
1394
|
+
/** Optional. Animation width */
|
|
1395
|
+
width?: Integer;
|
|
1396
|
+
/** Optional. Animation height */
|
|
1397
|
+
height?: Integer;
|
|
1398
|
+
/** Optional. Animation duration in seconds */
|
|
1399
|
+
duration?: Integer;
|
|
1400
|
+
/** Optional. Pass True if the animation needs to be covered with a spoiler animation */
|
|
1401
|
+
has_spoiler?: boolean;
|
|
1402
|
+
}
|
|
1403
|
+
/**
|
|
1404
|
+
* Represents an audio file to be treated as music to be sent.
|
|
1405
|
+
* @see https://core.telegram.org/bots/api#inputmediaaudio
|
|
1406
|
+
*/
|
|
1407
|
+
export interface InputMediaAudio {
|
|
1408
|
+
/** Type of the result, must be audio */
|
|
1409
|
+
type?: string;
|
|
1410
|
+
/** File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files » */
|
|
1411
|
+
media?: string;
|
|
1412
|
+
/** Optional. 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>. More info on Sending Files » */
|
|
1413
|
+
thumb?: InputFile | string;
|
|
1414
|
+
/** Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing */
|
|
1415
|
+
caption?: string;
|
|
1416
|
+
/** Optional. Mode for parsing entities in the audio caption. See formatting options for more details. */
|
|
1417
|
+
parse_mode?: string;
|
|
1418
|
+
/** Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1419
|
+
caption_entities?: MessageEntity[];
|
|
1420
|
+
/** Optional. Duration of the audio in seconds */
|
|
1421
|
+
duration?: Integer;
|
|
1422
|
+
/** Optional. Performer of the audio */
|
|
1423
|
+
performer?: string;
|
|
1424
|
+
/** Optional. Title of the audio */
|
|
1425
|
+
title?: string;
|
|
1426
|
+
}
|
|
1427
|
+
/**
|
|
1428
|
+
* Represents a general file to be sent.
|
|
1429
|
+
* @see https://core.telegram.org/bots/api#inputmediadocument
|
|
1430
|
+
*/
|
|
1431
|
+
export interface InputMediaDocument {
|
|
1432
|
+
/** Type of the result, must be document */
|
|
1433
|
+
type?: string;
|
|
1434
|
+
/** File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files » */
|
|
1435
|
+
media?: string;
|
|
1436
|
+
/** Optional. 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>. More info on Sending Files » */
|
|
1437
|
+
thumb?: InputFile | string;
|
|
1438
|
+
/** Optional. Caption of the document to be sent, 0-1024 characters after entities parsing */
|
|
1439
|
+
caption?: string;
|
|
1440
|
+
/** Optional. Mode for parsing entities in the document caption. See formatting options for more details. */
|
|
1441
|
+
parse_mode?: string;
|
|
1442
|
+
/** Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1443
|
+
caption_entities?: MessageEntity[];
|
|
1444
|
+
/** Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album. */
|
|
1445
|
+
disable_content_type_detection?: boolean;
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1448
|
+
* This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.
|
|
1449
|
+
* @see https://core.telegram.org/bots/api#inputfile
|
|
1450
|
+
*/
|
|
1451
|
+
export type InputFile = any;
|
|
1452
|
+
export interface SendMessagePayload {
|
|
1453
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1454
|
+
chat_id?: Integer | string;
|
|
1455
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1456
|
+
message_thread_id?: number;
|
|
1457
|
+
/** Text of the message to be sent, 1-4096 characters after entities parsing */
|
|
1458
|
+
text?: string;
|
|
1459
|
+
/** Mode for parsing entities in the message text. See formatting options for more details. */
|
|
1460
|
+
parse_mode?: string;
|
|
1461
|
+
/** A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode */
|
|
1462
|
+
entities?: MessageEntity[];
|
|
1463
|
+
/** Disables link previews for links in this message */
|
|
1464
|
+
disable_web_page_preview?: boolean;
|
|
1465
|
+
/** Options for link previews. */
|
|
1466
|
+
link_preview_options?: LinkPreviewOptions;
|
|
1467
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1468
|
+
disable_notification?: boolean;
|
|
1469
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1470
|
+
protect_content?: boolean;
|
|
1471
|
+
/** If the message is a reply, ID of the original message */
|
|
1472
|
+
reply_to_message_id?: Integer;
|
|
1473
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1474
|
+
allow_sending_without_reply?: boolean;
|
|
1475
|
+
/** Parameters for replying to another message. */
|
|
1476
|
+
reply_parameters?: ReplyParameters;
|
|
1477
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1478
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1479
|
+
}
|
|
1480
|
+
export interface ForwardMessagePayload {
|
|
1481
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1482
|
+
chat_id?: Integer | string;
|
|
1483
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1484
|
+
message_thread_id?: number;
|
|
1485
|
+
/** Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) */
|
|
1486
|
+
from_chat_id?: Integer | string;
|
|
1487
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1488
|
+
disable_notification?: boolean;
|
|
1489
|
+
/** Protects the contents of the forwarded message from forwarding and saving */
|
|
1490
|
+
protect_content?: boolean;
|
|
1491
|
+
/** Message identifier in the chat specified in from_chat_id */
|
|
1492
|
+
message_id?: Integer;
|
|
1493
|
+
}
|
|
1494
|
+
export interface CopyMessagePayload {
|
|
1495
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1496
|
+
chat_id?: Integer | string;
|
|
1497
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1498
|
+
message_thread_id?: number;
|
|
1499
|
+
/** Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) */
|
|
1500
|
+
from_chat_id?: Integer | string;
|
|
1501
|
+
/** Message identifier in the chat specified in from_chat_id */
|
|
1502
|
+
message_id?: Integer;
|
|
1503
|
+
/** New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept */
|
|
1504
|
+
caption?: string;
|
|
1505
|
+
/** Mode for parsing entities in the new caption. See formatting options for more details. */
|
|
1506
|
+
parse_mode?: string;
|
|
1507
|
+
/** A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode */
|
|
1508
|
+
caption_entities?: MessageEntity[];
|
|
1509
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1510
|
+
disable_notification?: boolean;
|
|
1511
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1512
|
+
protect_content?: boolean;
|
|
1513
|
+
/** If the message is a reply, ID of the original message */
|
|
1514
|
+
reply_to_message_id?: Integer;
|
|
1515
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1516
|
+
allow_sending_without_reply?: boolean;
|
|
1517
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1518
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1519
|
+
}
|
|
1520
|
+
export interface SendPhotoPayload {
|
|
1521
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1522
|
+
chat_id?: Integer | string;
|
|
1523
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1524
|
+
message_thread_id?: number;
|
|
1525
|
+
/** 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. More info on Sending Files » */
|
|
1526
|
+
photo?: InputFile | string;
|
|
1527
|
+
/** Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing */
|
|
1528
|
+
caption?: string;
|
|
1529
|
+
/** Mode for parsing entities in the photo caption. See formatting options for more details. */
|
|
1530
|
+
parse_mode?: string;
|
|
1531
|
+
/** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1532
|
+
caption_entities?: MessageEntity[];
|
|
1533
|
+
/** Pass True if the photo needs to be covered with a spoiler animation */
|
|
1534
|
+
has_spoiler?: boolean;
|
|
1535
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1536
|
+
disable_notification?: boolean;
|
|
1537
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1538
|
+
protect_content?: boolean;
|
|
1539
|
+
/** If the message is a reply, ID of the original message */
|
|
1540
|
+
reply_to_message_id?: Integer;
|
|
1541
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1542
|
+
allow_sending_without_reply?: boolean;
|
|
1543
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1544
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1545
|
+
}
|
|
1546
|
+
export interface SendAudioPayload {
|
|
1547
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1548
|
+
chat_id?: Integer | string;
|
|
1549
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1550
|
+
message_thread_id?: number;
|
|
1551
|
+
/** 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. More info on Sending Files » */
|
|
1552
|
+
audio?: InputFile | string;
|
|
1553
|
+
/** Audio caption, 0-1024 characters after entities parsing */
|
|
1554
|
+
caption?: string;
|
|
1555
|
+
/** Mode for parsing entities in the audio caption. See formatting options for more details. */
|
|
1556
|
+
parse_mode?: string;
|
|
1557
|
+
/** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1558
|
+
caption_entities?: MessageEntity[];
|
|
1559
|
+
/** Duration of the audio in seconds */
|
|
1560
|
+
duration?: Integer;
|
|
1561
|
+
/** Performer */
|
|
1562
|
+
performer?: string;
|
|
1563
|
+
/** Track name */
|
|
1564
|
+
title?: string;
|
|
1565
|
+
/** 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>. More info on Sending Files » */
|
|
1566
|
+
thumb?: InputFile | string;
|
|
1567
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1568
|
+
disable_notification?: boolean;
|
|
1569
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1570
|
+
protect_content?: boolean;
|
|
1571
|
+
/** If the message is a reply, ID of the original message */
|
|
1572
|
+
reply_to_message_id?: Integer;
|
|
1573
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1574
|
+
allow_sending_without_reply?: boolean;
|
|
1575
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1576
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1577
|
+
}
|
|
1578
|
+
export interface SendDocumentPayload {
|
|
1579
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1580
|
+
chat_id?: Integer | string;
|
|
1581
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1582
|
+
message_thread_id?: number;
|
|
1583
|
+
/** 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. More info on Sending Files » */
|
|
1584
|
+
document?: InputFile | string;
|
|
1585
|
+
/** 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>. More info on Sending Files » */
|
|
1586
|
+
thumb?: InputFile | string;
|
|
1587
|
+
/** Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing */
|
|
1588
|
+
caption?: string;
|
|
1589
|
+
/** Mode for parsing entities in the document caption. See formatting options for more details. */
|
|
1590
|
+
parse_mode?: string;
|
|
1591
|
+
/** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1592
|
+
caption_entities?: MessageEntity[];
|
|
1593
|
+
/** Disables automatic server-side content type detection for files uploaded using multipart/form-data */
|
|
1594
|
+
disable_content_type_detection?: boolean;
|
|
1595
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1596
|
+
disable_notification?: boolean;
|
|
1597
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1598
|
+
protect_content?: boolean;
|
|
1599
|
+
/** If the message is a reply, ID of the original message */
|
|
1600
|
+
reply_to_message_id?: Integer;
|
|
1601
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1602
|
+
allow_sending_without_reply?: boolean;
|
|
1603
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1604
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1605
|
+
}
|
|
1606
|
+
export interface SendVideoPayload {
|
|
1607
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1608
|
+
chat_id?: Integer | string;
|
|
1609
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1610
|
+
message_thread_id?: number;
|
|
1611
|
+
/** 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. More info on Sending Files » */
|
|
1612
|
+
video?: InputFile | string;
|
|
1613
|
+
/** Duration of sent video in seconds */
|
|
1614
|
+
duration?: Integer;
|
|
1615
|
+
/** Video width */
|
|
1616
|
+
width?: Integer;
|
|
1617
|
+
/** Video height */
|
|
1618
|
+
height?: Integer;
|
|
1619
|
+
/** 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>. More info on Sending Files » */
|
|
1620
|
+
thumb?: InputFile | string;
|
|
1621
|
+
/** Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing */
|
|
1622
|
+
caption?: string;
|
|
1623
|
+
/** Mode for parsing entities in the video caption. See formatting options for more details. */
|
|
1624
|
+
parse_mode?: string;
|
|
1625
|
+
/** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1626
|
+
caption_entities?: MessageEntity[];
|
|
1627
|
+
/** Pass True if the video needs to be covered with a spoiler animation */
|
|
1628
|
+
has_spoiler?: boolean;
|
|
1629
|
+
/** Pass True, if the uploaded video is suitable for streaming */
|
|
1630
|
+
supports_streaming?: boolean;
|
|
1631
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1632
|
+
disable_notification?: boolean;
|
|
1633
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1634
|
+
protect_content?: boolean;
|
|
1635
|
+
/** If the message is a reply, ID of the original message */
|
|
1636
|
+
reply_to_message_id?: Integer;
|
|
1637
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1638
|
+
allow_sending_without_reply?: boolean;
|
|
1639
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1640
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1641
|
+
}
|
|
1642
|
+
export interface SendAnimationPayload {
|
|
1643
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1644
|
+
chat_id?: Integer | string;
|
|
1645
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1646
|
+
message_thread_id?: number;
|
|
1647
|
+
/** 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. More info on Sending Files » */
|
|
1648
|
+
animation?: InputFile | string;
|
|
1649
|
+
/** Duration of sent animation in seconds */
|
|
1650
|
+
duration?: Integer;
|
|
1651
|
+
/** Animation width */
|
|
1652
|
+
width?: Integer;
|
|
1653
|
+
/** Animation height */
|
|
1654
|
+
height?: Integer;
|
|
1655
|
+
/** 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>. More info on Sending Files » */
|
|
1656
|
+
thumb?: InputFile | string;
|
|
1657
|
+
/** Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing */
|
|
1658
|
+
caption?: string;
|
|
1659
|
+
/** Mode for parsing entities in the animation caption. See formatting options for more details. */
|
|
1660
|
+
parse_mode?: string;
|
|
1661
|
+
/** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1662
|
+
caption_entities?: MessageEntity[];
|
|
1663
|
+
/** Pass True if the animation needs to be covered with a spoiler animation */
|
|
1664
|
+
has_spoiler?: boolean;
|
|
1665
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1666
|
+
disable_notification?: boolean;
|
|
1667
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1668
|
+
protect_content?: boolean;
|
|
1669
|
+
/** If the message is a reply, ID of the original message */
|
|
1670
|
+
reply_to_message_id?: Integer;
|
|
1671
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1672
|
+
allow_sending_without_reply?: boolean;
|
|
1673
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1674
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1675
|
+
}
|
|
1676
|
+
export interface SendVoicePayload {
|
|
1677
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1678
|
+
chat_id?: Integer | string;
|
|
1679
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1680
|
+
message_thread_id?: number;
|
|
1681
|
+
/** 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. More info on Sending Files » */
|
|
1682
|
+
voice?: InputFile | string;
|
|
1683
|
+
/** Voice message caption, 0-1024 characters after entities parsing */
|
|
1684
|
+
caption?: string;
|
|
1685
|
+
/** Mode for parsing entities in the voice message caption. See formatting options for more details. */
|
|
1686
|
+
parse_mode?: string;
|
|
1687
|
+
/** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1688
|
+
caption_entities?: MessageEntity[];
|
|
1689
|
+
/** Duration of the voice message in seconds */
|
|
1690
|
+
duration?: Integer;
|
|
1691
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1692
|
+
disable_notification?: boolean;
|
|
1693
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1694
|
+
protect_content?: boolean;
|
|
1695
|
+
/** If the message is a reply, ID of the original message */
|
|
1696
|
+
reply_to_message_id?: Integer;
|
|
1697
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1698
|
+
allow_sending_without_reply?: boolean;
|
|
1699
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1700
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1701
|
+
}
|
|
1702
|
+
export interface SendVideoNotePayload {
|
|
1703
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1704
|
+
chat_id?: Integer | string;
|
|
1705
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1706
|
+
message_thread_id?: number;
|
|
1707
|
+
/** 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. More info on Sending Files ». Sending video notes by a URL is currently unsupported */
|
|
1708
|
+
video_note?: InputFile | string;
|
|
1709
|
+
/** Duration of sent video in seconds */
|
|
1710
|
+
duration?: Integer;
|
|
1711
|
+
/** Video width and height, i.e. diameter of the video message */
|
|
1712
|
+
length?: Integer;
|
|
1713
|
+
/** 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>. More info on Sending Files » */
|
|
1714
|
+
thumb?: InputFile | string;
|
|
1715
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1716
|
+
disable_notification?: boolean;
|
|
1717
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1718
|
+
protect_content?: boolean;
|
|
1719
|
+
/** If the message is a reply, ID of the original message */
|
|
1720
|
+
reply_to_message_id?: Integer;
|
|
1721
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1722
|
+
allow_sending_without_reply?: boolean;
|
|
1723
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1724
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1725
|
+
}
|
|
1726
|
+
export interface SendMediaGroupPayload {
|
|
1727
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1728
|
+
chat_id?: Integer | string;
|
|
1729
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1730
|
+
message_thread_id?: number;
|
|
1731
|
+
/** A JSON-serialized array describing messages to be sent, must include 2-10 items */
|
|
1732
|
+
media?: (InputMediaAudio | InputMediaDocument | InputMediaPhoto | InputMediaVideo)[];
|
|
1733
|
+
/** Sends messages silently. Users will receive a notification with no sound. */
|
|
1734
|
+
disable_notification?: boolean;
|
|
1735
|
+
/** Protects the contents of the sent messages from forwarding and saving */
|
|
1736
|
+
protect_content?: boolean;
|
|
1737
|
+
/** If the messages are a reply, ID of the original message */
|
|
1738
|
+
reply_to_message_id?: Integer;
|
|
1739
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1740
|
+
allow_sending_without_reply?: boolean;
|
|
1741
|
+
/** Parameters for replying to another message. */
|
|
1742
|
+
reply_parameters?: ReplyParameters;
|
|
1743
|
+
}
|
|
1744
|
+
export interface SendLocationPayload {
|
|
1745
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1746
|
+
chat_id?: Integer | string;
|
|
1747
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1748
|
+
message_thread_id?: number;
|
|
1749
|
+
/** Latitude of the location */
|
|
1750
|
+
latitude?: Float;
|
|
1751
|
+
/** Longitude of the location */
|
|
1752
|
+
longitude?: Float;
|
|
1753
|
+
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
1754
|
+
horizontal_accuracy?: Float;
|
|
1755
|
+
/** Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400. */
|
|
1756
|
+
live_period?: Integer;
|
|
1757
|
+
/** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
|
|
1758
|
+
heading?: Integer;
|
|
1759
|
+
/** For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. */
|
|
1760
|
+
proximity_alert_radius?: Integer;
|
|
1761
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1762
|
+
disable_notification?: boolean;
|
|
1763
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1764
|
+
protect_content?: boolean;
|
|
1765
|
+
/** If the message is a reply, ID of the original message */
|
|
1766
|
+
reply_to_message_id?: Integer;
|
|
1767
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1768
|
+
allow_sending_without_reply?: boolean;
|
|
1769
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1770
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1771
|
+
}
|
|
1772
|
+
export interface EditMessageLiveLocationPayload {
|
|
1773
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1774
|
+
chat_id?: Integer | string;
|
|
1775
|
+
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
1776
|
+
message_id?: Integer;
|
|
1777
|
+
/** Required if chat_id and message_id are not specified. Identifier of the inline message */
|
|
1778
|
+
inline_message_id?: string;
|
|
1779
|
+
/** Latitude of new location */
|
|
1780
|
+
latitude?: Float;
|
|
1781
|
+
/** Longitude of new location */
|
|
1782
|
+
longitude?: Float;
|
|
1783
|
+
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
1784
|
+
horizontal_accuracy?: Float;
|
|
1785
|
+
/** Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
|
|
1786
|
+
heading?: Integer;
|
|
1787
|
+
/** Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. */
|
|
1788
|
+
proximity_alert_radius?: Integer;
|
|
1789
|
+
/** A JSON-serialized object for a new inline keyboard. */
|
|
1790
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
1791
|
+
}
|
|
1792
|
+
export interface StopMessageLiveLocationPayload {
|
|
1793
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1794
|
+
chat_id?: Integer | string;
|
|
1795
|
+
/** Required if inline_message_id is not specified. Identifier of the message with live location to stop */
|
|
1796
|
+
message_id?: Integer;
|
|
1797
|
+
/** Required if chat_id and message_id are not specified. Identifier of the inline message */
|
|
1798
|
+
inline_message_id?: string;
|
|
1799
|
+
/** A JSON-serialized object for a new inline keyboard. */
|
|
1800
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
1801
|
+
}
|
|
1802
|
+
export interface SendVenuePayload {
|
|
1803
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1804
|
+
chat_id?: Integer | string;
|
|
1805
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1806
|
+
message_thread_id?: number;
|
|
1807
|
+
/** Latitude of the venue */
|
|
1808
|
+
latitude?: Float;
|
|
1809
|
+
/** Longitude of the venue */
|
|
1810
|
+
longitude?: Float;
|
|
1811
|
+
/** Name of the venue */
|
|
1812
|
+
title?: string;
|
|
1813
|
+
/** Address of the venue */
|
|
1814
|
+
address?: string;
|
|
1815
|
+
/** Foursquare identifier of the venue */
|
|
1816
|
+
foursquare_id?: string;
|
|
1817
|
+
/** Foursquare type of the venue, if known. (For example, "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".) */
|
|
1818
|
+
foursquare_type?: string;
|
|
1819
|
+
/** Google Places identifier of the venue */
|
|
1820
|
+
google_place_id?: string;
|
|
1821
|
+
/** Google Places type of the venue. (See supported types.) */
|
|
1822
|
+
google_place_type?: string;
|
|
1823
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1824
|
+
disable_notification?: boolean;
|
|
1825
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1826
|
+
protect_content?: boolean;
|
|
1827
|
+
/** If the message is a reply, ID of the original message */
|
|
1828
|
+
reply_to_message_id?: Integer;
|
|
1829
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1830
|
+
allow_sending_without_reply?: boolean;
|
|
1831
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1832
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1833
|
+
}
|
|
1834
|
+
export interface SendContactPayload {
|
|
1835
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1836
|
+
chat_id?: Integer | string;
|
|
1837
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1838
|
+
message_thread_id?: number;
|
|
1839
|
+
/** Contact's phone number */
|
|
1840
|
+
phone_number?: string;
|
|
1841
|
+
/** Contact's first name */
|
|
1842
|
+
first_name?: string;
|
|
1843
|
+
/** Contact's last name */
|
|
1844
|
+
last_name?: string;
|
|
1845
|
+
/** Additional data about the contact in the form of a vCard, 0-2048 bytes */
|
|
1846
|
+
vcard?: string;
|
|
1847
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1848
|
+
disable_notification?: boolean;
|
|
1849
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1850
|
+
protect_content?: boolean;
|
|
1851
|
+
/** If the message is a reply, ID of the original message */
|
|
1852
|
+
reply_to_message_id?: Integer;
|
|
1853
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1854
|
+
allow_sending_without_reply?: boolean;
|
|
1855
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove keyboard or to force a reply from the user. */
|
|
1856
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1857
|
+
}
|
|
1858
|
+
export interface SendPollPayload {
|
|
1859
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1860
|
+
chat_id?: Integer | string;
|
|
1861
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1862
|
+
message_thread_id?: number;
|
|
1863
|
+
/** Poll question, 1-300 characters */
|
|
1864
|
+
question?: string;
|
|
1865
|
+
/** A JSON-serialized list of answer options, 2-10 strings 1-100 characters each */
|
|
1866
|
+
options?: string[];
|
|
1867
|
+
/** True, if the poll needs to be anonymous, defaults to True */
|
|
1868
|
+
is_anonymous?: boolean;
|
|
1869
|
+
/** Poll type, "quiz" or "regular", defaults to "regular" */
|
|
1870
|
+
type?: string;
|
|
1871
|
+
/** True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False */
|
|
1872
|
+
allows_multiple_answers?: boolean;
|
|
1873
|
+
/** 0-based identifier of the correct answer option, required for polls in quiz mode */
|
|
1874
|
+
correct_option_id?: Integer;
|
|
1875
|
+
/** Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing */
|
|
1876
|
+
explanation?: string;
|
|
1877
|
+
/** Mode for parsing entities in the explanation. See formatting options for more details. */
|
|
1878
|
+
explanation_parse_mode?: string;
|
|
1879
|
+
/** A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of parse_mode */
|
|
1880
|
+
explanation_entities?: MessageEntity[];
|
|
1881
|
+
/** Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date. */
|
|
1882
|
+
open_period?: Integer;
|
|
1883
|
+
/** Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period. */
|
|
1884
|
+
close_date?: Integer;
|
|
1885
|
+
/** Pass True, if the poll needs to be immediately closed. This can be useful for poll preview. */
|
|
1886
|
+
is_closed?: boolean;
|
|
1887
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1888
|
+
disable_notification?: boolean;
|
|
1889
|
+
/** Protects the contents of the sent message from forwarding and saving */
|
|
1890
|
+
protect_content?: boolean;
|
|
1891
|
+
/** If the message is a reply, ID of the original message */
|
|
1892
|
+
reply_to_message_id?: Integer;
|
|
1893
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1894
|
+
allow_sending_without_reply?: boolean;
|
|
1895
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1896
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1897
|
+
}
|
|
1898
|
+
export interface SendDicePayload {
|
|
1899
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1900
|
+
chat_id?: Integer | string;
|
|
1901
|
+
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
1902
|
+
message_thread_id?: number;
|
|
1903
|
+
/** 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 "" */
|
|
1904
|
+
emoji?: string;
|
|
1905
|
+
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
1906
|
+
disable_notification?: boolean;
|
|
1907
|
+
/** Protects the contents of the sent message from forwarding */
|
|
1908
|
+
protect_content?: boolean;
|
|
1909
|
+
/** If the message is a reply, ID of the original message */
|
|
1910
|
+
reply_to_message_id?: Integer;
|
|
1911
|
+
/** Pass True, if the message should be sent even if the specified replied-to message is not found */
|
|
1912
|
+
allow_sending_without_reply?: boolean;
|
|
1913
|
+
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
1914
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1915
|
+
}
|
|
1916
|
+
export interface SendChatActionPayload {
|
|
1917
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1918
|
+
chat_id?: Integer | string;
|
|
1919
|
+
/** Unique identifier for the target message thread; supergroups only */
|
|
1920
|
+
message_thread_id?: number;
|
|
1921
|
+
/** Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes. */
|
|
1922
|
+
action?: string;
|
|
1923
|
+
}
|
|
1924
|
+
export interface GetUserProfilePhotosPayload {
|
|
1925
|
+
/** Unique identifier of the target user */
|
|
1926
|
+
user_id?: Integer;
|
|
1927
|
+
/** Sequential number of the first photo to be returned. By default, all photos are returned. */
|
|
1928
|
+
offset?: Integer;
|
|
1929
|
+
/** Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. */
|
|
1930
|
+
limit?: Integer;
|
|
1931
|
+
}
|
|
1932
|
+
export interface GetFilePayload {
|
|
1933
|
+
/** File identifier to get info about */
|
|
1934
|
+
file_id?: string;
|
|
1935
|
+
}
|
|
1936
|
+
export interface BanChatMemberPayload {
|
|
1937
|
+
/** Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername) */
|
|
1938
|
+
chat_id?: Integer | string;
|
|
1939
|
+
/** Unique identifier of the target user */
|
|
1940
|
+
user_id?: Integer;
|
|
1941
|
+
/** Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only. */
|
|
1942
|
+
until_date?: Integer;
|
|
1943
|
+
/** Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels. */
|
|
1944
|
+
revoke_messages?: boolean;
|
|
1945
|
+
}
|
|
1946
|
+
export interface UnbanChatMemberPayload {
|
|
1947
|
+
/** Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername) */
|
|
1948
|
+
chat_id?: Integer | string;
|
|
1949
|
+
/** Unique identifier of the target user */
|
|
1950
|
+
user_id?: Integer;
|
|
1951
|
+
/** Do nothing if the user is not banned */
|
|
1952
|
+
only_if_banned?: boolean;
|
|
1953
|
+
}
|
|
1954
|
+
export interface RestrictChatMemberPayload {
|
|
1955
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
1956
|
+
chat_id?: Integer | string;
|
|
1957
|
+
/** Unique identifier of the target user */
|
|
1958
|
+
user_id?: Integer;
|
|
1959
|
+
/** A JSON-serialized object for new user permissions */
|
|
1960
|
+
permissions?: ChatPermissions;
|
|
1961
|
+
/** Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever */
|
|
1962
|
+
until_date?: Integer;
|
|
1963
|
+
}
|
|
1964
|
+
export interface PromoteChatMemberPayload {
|
|
1965
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1966
|
+
chat_id?: Integer | string;
|
|
1967
|
+
/** Unique identifier of the target user */
|
|
1968
|
+
user_id?: Integer;
|
|
1969
|
+
/** Pass True, if the administrator's presence in the chat is hidden */
|
|
1970
|
+
is_anonymous?: boolean;
|
|
1971
|
+
/** Pass True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
|
|
1972
|
+
can_manage_chat?: boolean;
|
|
1973
|
+
/** Pass True, if the administrator can create channel posts, channels only */
|
|
1974
|
+
can_post_messages?: boolean;
|
|
1975
|
+
/** Pass True, if the administrator can edit messages of other users and can pin messages, channels only */
|
|
1976
|
+
can_edit_messages?: boolean;
|
|
1977
|
+
/** Pass True, if the administrator can delete messages of other users */
|
|
1978
|
+
can_delete_messages?: boolean;
|
|
1979
|
+
/**
|
|
1980
|
+
* Pass True, if the administrator can manage voice chats
|
|
1981
|
+
* @deprecated
|
|
1982
|
+
*/
|
|
1983
|
+
can_manage_voice_chats?: boolean;
|
|
1984
|
+
/** Pass True, if the administrator can manage voice chats */
|
|
1985
|
+
can_manage_video_chats?: boolean;
|
|
1986
|
+
/** Pass True, if the administrator can restrict, ban or unban chat members */
|
|
1987
|
+
can_restrict_members?: boolean;
|
|
1988
|
+
/** Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him) */
|
|
1989
|
+
can_promote_members?: boolean;
|
|
1990
|
+
/** Pass True, if the administrator can change chat title, photo and other settings */
|
|
1991
|
+
can_change_info?: boolean;
|
|
1992
|
+
/** Pass True, if the administrator can invite new users to the chat */
|
|
1993
|
+
can_invite_users?: boolean;
|
|
1994
|
+
/** Pass True, if the administrator can pin messages, supergroups only */
|
|
1995
|
+
can_pin_messages?: boolean;
|
|
1996
|
+
/** Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only */
|
|
1997
|
+
can_manage_topics?: boolean;
|
|
1998
|
+
}
|
|
1999
|
+
export interface SetChatAdministratorCustomTitlePayload {
|
|
2000
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
2001
|
+
chat_id?: Integer | string;
|
|
2002
|
+
/** Unique identifier of the target user */
|
|
2003
|
+
user_id?: Integer;
|
|
2004
|
+
/** New custom title for the administrator; 0-16 characters, emoji are not allowed */
|
|
2005
|
+
custom_title?: string;
|
|
2006
|
+
}
|
|
2007
|
+
export interface BanChatSenderChatPayload {
|
|
2008
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2009
|
+
chat_id?: Integer | string;
|
|
2010
|
+
/** Unique identifier of the target sender chat */
|
|
2011
|
+
sender_chat_id?: Integer;
|
|
2012
|
+
}
|
|
2013
|
+
export interface UnbanChatSenderChatPayload {
|
|
2014
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2015
|
+
chat_id?: Integer | string;
|
|
2016
|
+
/** Unique identifier of the target sender chat */
|
|
2017
|
+
sender_chat_id?: Integer;
|
|
2018
|
+
}
|
|
2019
|
+
export interface SetChatPermissionsPayload {
|
|
2020
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
2021
|
+
chat_id?: Integer | string;
|
|
2022
|
+
/** A JSON-serialized object for new default chat permissions */
|
|
2023
|
+
permissions?: ChatPermissions;
|
|
2024
|
+
}
|
|
2025
|
+
export interface ExportChatInviteLinkPayload {
|
|
2026
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2027
|
+
chat_id?: Integer | string;
|
|
2028
|
+
}
|
|
2029
|
+
export interface CreateChatInviteLinkPayload {
|
|
2030
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2031
|
+
chat_id?: Integer | string;
|
|
2032
|
+
/** Invite link name; 0-32 characters */
|
|
2033
|
+
name?: string;
|
|
2034
|
+
/** Point in time (Unix timestamp) when the link will expire */
|
|
2035
|
+
expire_date?: Integer;
|
|
2036
|
+
/** Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 */
|
|
2037
|
+
member_limit?: Integer;
|
|
2038
|
+
/** True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified */
|
|
2039
|
+
creates_join_request?: boolean;
|
|
2040
|
+
}
|
|
2041
|
+
export interface EditChatInviteLinkPayload {
|
|
2042
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2043
|
+
chat_id?: Integer | string;
|
|
2044
|
+
/** The invite link to edit */
|
|
2045
|
+
invite_link?: string;
|
|
2046
|
+
/** Invite link name; 0-32 characters */
|
|
2047
|
+
name?: string;
|
|
2048
|
+
/** Point in time (Unix timestamp) when the link will expire */
|
|
2049
|
+
expire_date?: Integer;
|
|
2050
|
+
/** Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 */
|
|
2051
|
+
member_limit?: Integer;
|
|
2052
|
+
/** True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified */
|
|
2053
|
+
creates_join_request?: boolean;
|
|
2054
|
+
}
|
|
2055
|
+
export interface RevokeChatInviteLinkPayload {
|
|
2056
|
+
/** Unique identifier of the target chat or username of the target channel (in the format @channelusername) */
|
|
2057
|
+
chat_id?: Integer | string;
|
|
2058
|
+
/** The invite link to revoke */
|
|
2059
|
+
invite_link?: string;
|
|
2060
|
+
}
|
|
2061
|
+
export interface ApproveChatJoinRequestPayload {
|
|
2062
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2063
|
+
chat_id?: Integer | string;
|
|
2064
|
+
/** Unique identifier of the target user */
|
|
2065
|
+
user_id?: Integer;
|
|
2066
|
+
}
|
|
2067
|
+
export interface DeclineChatJoinRequestPayload {
|
|
2068
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2069
|
+
chat_id?: Integer | string;
|
|
2070
|
+
/** Unique identifier of the target user */
|
|
2071
|
+
user_id?: Integer;
|
|
2072
|
+
}
|
|
2073
|
+
export interface SetChatPhotoPayload {
|
|
2074
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2075
|
+
chat_id?: Integer | string;
|
|
2076
|
+
/** New chat photo, uploaded using multipart/form-data */
|
|
2077
|
+
photo?: InputFile;
|
|
2078
|
+
}
|
|
2079
|
+
export interface DeleteChatPhotoPayload {
|
|
2080
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2081
|
+
chat_id?: Integer | string;
|
|
2082
|
+
}
|
|
2083
|
+
export interface SetChatTitlePayload {
|
|
2084
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2085
|
+
chat_id?: Integer | string;
|
|
2086
|
+
/** New chat title, 1-255 characters */
|
|
2087
|
+
title?: string;
|
|
2088
|
+
}
|
|
2089
|
+
export interface SetChatDescriptionPayload {
|
|
2090
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2091
|
+
chat_id?: Integer | string;
|
|
2092
|
+
/** New chat description, 0-255 characters */
|
|
2093
|
+
description?: string;
|
|
2094
|
+
}
|
|
2095
|
+
export interface PinChatMessagePayload {
|
|
2096
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2097
|
+
chat_id?: Integer | string;
|
|
2098
|
+
/** Identifier of a message to pin */
|
|
2099
|
+
message_id?: Integer;
|
|
2100
|
+
/** Pass True, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. */
|
|
2101
|
+
disable_notification?: boolean;
|
|
2102
|
+
}
|
|
2103
|
+
export interface UnpinChatMessagePayload {
|
|
2104
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2105
|
+
chat_id?: Integer | string;
|
|
2106
|
+
/** Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned. */
|
|
2107
|
+
message_id?: Integer;
|
|
2108
|
+
}
|
|
2109
|
+
export interface UnpinAllChatMessagesPayload {
|
|
2110
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2111
|
+
chat_id?: Integer | string;
|
|
2112
|
+
}
|
|
2113
|
+
export interface EditGeneralForumTopicPayload {
|
|
2114
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2115
|
+
chat_id: Integer | string;
|
|
2116
|
+
/** New topic name, 1-128 characters */
|
|
2117
|
+
name: string;
|
|
2118
|
+
}
|
|
2119
|
+
export interface CloseGeneralForumTopicPayload {
|
|
2120
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2121
|
+
chat_id: Integer | string;
|
|
2122
|
+
}
|
|
2123
|
+
export interface ReopenGeneralForumTopicPayload {
|
|
2124
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2125
|
+
chat_id: Integer | string;
|
|
2126
|
+
}
|
|
2127
|
+
export interface HideGeneralForumTopicPayload {
|
|
2128
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2129
|
+
chat_id: Integer | string;
|
|
2130
|
+
}
|
|
2131
|
+
export interface UnhideGeneralForumTopicPaylad {
|
|
2132
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2133
|
+
chat_id: Integer | string;
|
|
2134
|
+
}
|
|
2135
|
+
export interface LeaveChatPayload {
|
|
2136
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
|
|
2137
|
+
chat_id?: Integer | string;
|
|
2138
|
+
}
|
|
2139
|
+
export interface GetChatPayload {
|
|
2140
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
|
|
2141
|
+
chat_id?: Integer | string;
|
|
2142
|
+
}
|
|
2143
|
+
export interface GetChatAdministratorsPayload {
|
|
2144
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
|
|
2145
|
+
chat_id?: Integer | string;
|
|
2146
|
+
}
|
|
2147
|
+
export interface GetChatMemberCountPayload {
|
|
2148
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
|
|
2149
|
+
chat_id?: Integer | string;
|
|
2150
|
+
}
|
|
2151
|
+
export interface GetChatMemberPayload {
|
|
2152
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
|
|
2153
|
+
chat_id?: Integer | string;
|
|
2154
|
+
/** Unique identifier of the target user */
|
|
2155
|
+
user_id?: Integer;
|
|
2156
|
+
}
|
|
2157
|
+
export interface SetChatStickerSetPayload {
|
|
2158
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
2159
|
+
chat_id?: Integer | string;
|
|
2160
|
+
/** Name of the sticker set to be set as the group sticker set */
|
|
2161
|
+
sticker_set_name?: string;
|
|
2162
|
+
}
|
|
2163
|
+
export interface DeleteChatStickerSetPayload {
|
|
2164
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
2165
|
+
chat_id?: Integer | string;
|
|
2166
|
+
}
|
|
2167
|
+
export interface CreateForumTopicPayload {
|
|
2168
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
2169
|
+
chat_id: number | string;
|
|
2170
|
+
/** Topic name, 1-128 characters */
|
|
2171
|
+
name: string;
|
|
2172
|
+
/** Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F) */
|
|
2173
|
+
icon_color?: number;
|
|
2174
|
+
/** Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. */
|
|
2175
|
+
icon_custom_emoji_id?: string;
|
|
2176
|
+
}
|
|
2177
|
+
export interface EditForumTopicPayload {
|
|
2178
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
2179
|
+
chat_id: number | string;
|
|
2180
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
2181
|
+
message_thread_id: number;
|
|
2182
|
+
/** New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept */
|
|
2183
|
+
name?: string;
|
|
2184
|
+
/** New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept */
|
|
2185
|
+
icon_custom_emoji_id?: string;
|
|
2186
|
+
}
|
|
2187
|
+
export interface CloseForumTopicPayload {
|
|
2188
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
2189
|
+
chat_id: number | string;
|
|
2190
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
2191
|
+
message_thread_id: number;
|
|
2192
|
+
}
|
|
2193
|
+
export interface ReopenForumTopicPayload {
|
|
2194
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
2195
|
+
chat_id: number | string;
|
|
2196
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
2197
|
+
message_thread_id: number;
|
|
2198
|
+
}
|
|
2199
|
+
export interface DeleteForumTopicPayload {
|
|
2200
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
2201
|
+
chat_id: number | string;
|
|
2202
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
2203
|
+
message_thread_id: number;
|
|
2204
|
+
}
|
|
2205
|
+
export interface UnpinAllForumTopicMessagesPayload {
|
|
2206
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
2207
|
+
chat_id: number | string;
|
|
2208
|
+
/** Unique identifier for the target message thread of the forum topic */
|
|
2209
|
+
message_thread_id: number;
|
|
2210
|
+
}
|
|
2211
|
+
export interface AnswerCallbackQueryPayload {
|
|
2212
|
+
/** Unique identifier for the query to be answered */
|
|
2213
|
+
callback_query_id?: string;
|
|
2214
|
+
/** Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters */
|
|
2215
|
+
text?: string;
|
|
2216
|
+
/** If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false. */
|
|
2217
|
+
show_alert?: boolean;
|
|
2218
|
+
/**
|
|
2219
|
+
* URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game — note that this will only work if the query comes from a callback_game button.
|
|
2220
|
+
*
|
|
2221
|
+
* Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.
|
|
2222
|
+
*/
|
|
2223
|
+
url?: string;
|
|
2224
|
+
/** The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. */
|
|
2225
|
+
cache_time?: Integer;
|
|
2226
|
+
}
|
|
2227
|
+
export interface SetMyCommandsPayload {
|
|
2228
|
+
/** A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. */
|
|
2229
|
+
commands?: BotCommand[];
|
|
2230
|
+
/** A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault. */
|
|
2231
|
+
scope?: BotCommandScope;
|
|
2232
|
+
/** A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands */
|
|
2233
|
+
language_code?: string;
|
|
2234
|
+
}
|
|
2235
|
+
export interface DeleteMyCommandsPayload {
|
|
2236
|
+
/** A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault. */
|
|
2237
|
+
scope?: BotCommandScope;
|
|
2238
|
+
/** A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands */
|
|
2239
|
+
language_code?: string;
|
|
2240
|
+
}
|
|
2241
|
+
export interface GetMyCommandsPayload {
|
|
2242
|
+
/** A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault. */
|
|
2243
|
+
scope?: BotCommandScope;
|
|
2244
|
+
/** A two-letter ISO 639-1 language code or an empty string */
|
|
2245
|
+
language_code?: string;
|
|
2246
|
+
}
|
|
2247
|
+
export interface SetChatMenuButtonPayload {
|
|
2248
|
+
/** Unique identifier for the target private chat. If not specified, default bot's menu button will be changed */
|
|
2249
|
+
chat_id?: number;
|
|
2250
|
+
/** A JSON-serialized object for the bot's new menu button. Defaults to MenuButtonDefault */
|
|
2251
|
+
menu_button?: MenuButton;
|
|
2252
|
+
}
|
|
2253
|
+
export interface GetChatMenuButtonPayload {
|
|
2254
|
+
/** Unique identifier for the target private chat. If not specified, default bot's menu button will be returned */
|
|
2255
|
+
getChatMenuButton?: number;
|
|
2256
|
+
}
|
|
2257
|
+
export interface SetMyDefaultAdministratorRightsPayload {
|
|
2258
|
+
/** A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared. */
|
|
2259
|
+
rights?: ChatAdministratorRights;
|
|
2260
|
+
/** Pass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed. */
|
|
2261
|
+
for_channels?: boolean;
|
|
2262
|
+
}
|
|
2263
|
+
export interface GetMyDefaultAdministratorRightsPayload {
|
|
2264
|
+
/** Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned. */
|
|
2265
|
+
for_channels?: boolean;
|
|
2266
|
+
}
|
|
2267
|
+
export interface EditMessageTextPayload {
|
|
2268
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2269
|
+
chat_id?: Integer | string;
|
|
2270
|
+
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
2271
|
+
message_id?: Integer;
|
|
2272
|
+
/** Required if chat_id and message_id are not specified. Identifier of the inline message */
|
|
2273
|
+
inline_message_id?: string;
|
|
2274
|
+
/** New text of the message, 1-4096 characters after entities parsing */
|
|
2275
|
+
text?: string;
|
|
2276
|
+
/** Mode for parsing entities in the message text. See formatting options for more details. */
|
|
2277
|
+
parse_mode?: string;
|
|
2278
|
+
/** A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode */
|
|
2279
|
+
entities?: MessageEntity[];
|
|
2280
|
+
/** Disables link previews for links in this message */
|
|
2281
|
+
disable_web_page_preview?: boolean;
|
|
2282
|
+
/** Options for link previews. */
|
|
2283
|
+
link_preview_options?: LinkPreviewOptions;
|
|
2284
|
+
/** Parameters for replying to another message. */
|
|
2285
|
+
reply_parameters?: ReplyParameters;
|
|
2286
|
+
/** A JSON-serialized object for an inline keyboard. */
|
|
2287
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
2288
|
+
}
|
|
2289
|
+
export interface EditMessageCaptionPayload {
|
|
2290
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2291
|
+
chat_id?: Integer | string;
|
|
2292
|
+
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
2293
|
+
message_id?: Integer;
|
|
2294
|
+
/** Required if chat_id and message_id are not specified. Identifier of the inline message */
|
|
2295
|
+
inline_message_id?: string;
|
|
2296
|
+
/** New caption of the message, 0-1024 characters after entities parsing */
|
|
2297
|
+
caption?: string;
|
|
2298
|
+
/** Mode for parsing entities in the message caption. See formatting options for more details. */
|
|
2299
|
+
parse_mode?: string;
|
|
2300
|
+
/** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
2301
|
+
caption_entities?: MessageEntity[];
|
|
2302
|
+
/** A JSON-serialized object for an inline keyboard. */
|
|
2303
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
2304
|
+
}
|
|
2305
|
+
export interface EditMessageMediaPayload {
|
|
2306
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2307
|
+
chat_id?: Integer | string;
|
|
2308
|
+
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
2309
|
+
message_id?: Integer;
|
|
2310
|
+
/** Required if chat_id and message_id are not specified. Identifier of the inline message */
|
|
2311
|
+
inline_message_id?: string;
|
|
2312
|
+
/** A JSON-serialized object for a new media content of the message */
|
|
2313
|
+
media?: InputMedia;
|
|
2314
|
+
/** A JSON-serialized object for a new inline keyboard. */
|
|
2315
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
2316
|
+
}
|
|
2317
|
+
export interface EditMessageReplyMarkupPayload {
|
|
2318
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2319
|
+
chat_id?: Integer | string;
|
|
2320
|
+
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
2321
|
+
message_id?: Integer;
|
|
2322
|
+
/** Required if chat_id and message_id are not specified. Identifier of the inline message */
|
|
2323
|
+
inline_message_id?: string;
|
|
2324
|
+
/** A JSON-serialized object for an inline keyboard. */
|
|
2325
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
2326
|
+
}
|
|
2327
|
+
export interface StopPollPayload {
|
|
2328
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2329
|
+
chat_id?: Integer | string;
|
|
2330
|
+
/** Identifier of the original message with the poll */
|
|
2331
|
+
message_id?: Integer;
|
|
2332
|
+
/** A JSON-serialized object for a new message inline keyboard. */
|
|
2333
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
2334
|
+
}
|
|
2335
|
+
export interface DeleteMessagePayload {
|
|
2336
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
2337
|
+
chat_id?: Integer | string;
|
|
2338
|
+
/** Identifier of the message to delete */
|
|
2339
|
+
message_id?: Integer;
|
|
2340
|
+
}
|
|
2341
|
+
declare module './internal.ts' {
|
|
2342
|
+
interface Internal {
|
|
2343
|
+
/**
|
|
2344
|
+
* A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.
|
|
2345
|
+
* @see https://core.telegram.org/bots/api#getme
|
|
2346
|
+
*/
|
|
2347
|
+
getMe(): Promise<User>;
|
|
2348
|
+
/**
|
|
2349
|
+
* Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.
|
|
2350
|
+
* @see https://core.telegram.org/bots/api#logout
|
|
2351
|
+
*/
|
|
2352
|
+
logOut(): Promise<boolean>;
|
|
2353
|
+
/**
|
|
2354
|
+
* Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.
|
|
2355
|
+
* @see https://core.telegram.org/bots/api#close
|
|
2356
|
+
*/
|
|
2357
|
+
close(): Promise<boolean>;
|
|
2358
|
+
/**
|
|
2359
|
+
* Use this method to send text messages. On success, the sent Message is returned.
|
|
2360
|
+
* @see https://core.telegram.org/bots/api#sendmessage
|
|
2361
|
+
*/
|
|
2362
|
+
sendMessage(payload: SendMessagePayload): Promise<Message>;
|
|
2363
|
+
/**
|
|
2364
|
+
* Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned.
|
|
2365
|
+
* @see https://core.telegram.org/bots/api#forwardmessage
|
|
2366
|
+
*/
|
|
2367
|
+
forwardMessage(payload: ForwardMessagePayload): Promise<Message>;
|
|
2368
|
+
/**
|
|
2369
|
+
* Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
|
|
2370
|
+
* @see https://core.telegram.org/bots/api#copymessage
|
|
2371
|
+
*/
|
|
2372
|
+
copyMessage(payload: CopyMessagePayload): Promise<Integer>;
|
|
2373
|
+
/**
|
|
2374
|
+
* Use this method to send photos. On success, the sent Message is returned.
|
|
2375
|
+
* @see https://core.telegram.org/bots/api#sendphoto
|
|
2376
|
+
*/
|
|
2377
|
+
sendPhoto(payload: SendPhotoPayload): Promise<Message>;
|
|
2378
|
+
/**
|
|
2379
|
+
* Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
|
|
2380
|
+
*
|
|
2381
|
+
* For sending voice messages, use the sendVoice method instead.
|
|
2382
|
+
* @see https://core.telegram.org/bots/api#sendaudio
|
|
2383
|
+
*/
|
|
2384
|
+
sendAudio(payload: SendAudioPayload): Promise<Message>;
|
|
2385
|
+
/**
|
|
2386
|
+
* Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
|
|
2387
|
+
* @see https://core.telegram.org/bots/api#senddocument
|
|
2388
|
+
*/
|
|
2389
|
+
sendDocument(payload: SendDocumentPayload): Promise<Message>;
|
|
2390
|
+
/**
|
|
2391
|
+
* Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
|
|
2392
|
+
* @see https://core.telegram.org/bots/api#sendvideo
|
|
2393
|
+
*/
|
|
2394
|
+
sendVideo(payload: SendVideoPayload): Promise<Message>;
|
|
2395
|
+
/**
|
|
2396
|
+
* Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
|
|
2397
|
+
* @see https://core.telegram.org/bots/api#sendanimation
|
|
2398
|
+
*/
|
|
2399
|
+
sendAnimation(payload: SendAnimationPayload): Promise<Message>;
|
|
2400
|
+
/**
|
|
2401
|
+
* Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
|
|
2402
|
+
* @see https://core.telegram.org/bots/api#sendvoice
|
|
2403
|
+
*/
|
|
2404
|
+
sendVoice(payload: SendVoicePayload): Promise<Message>;
|
|
2405
|
+
/**
|
|
2406
|
+
* As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.
|
|
2407
|
+
* @see https://core.telegram.org/bots/api#sendvideonote
|
|
2408
|
+
*/
|
|
2409
|
+
sendVideoNote(payload: SendVideoNotePayload): Promise<Message>;
|
|
2410
|
+
/**
|
|
2411
|
+
* Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.
|
|
2412
|
+
* @see https://core.telegram.org/bots/api#sendmediagroup
|
|
2413
|
+
*/
|
|
2414
|
+
sendMediaGroup(payload: SendMediaGroupPayload): Promise<Message[]>;
|
|
2415
|
+
/**
|
|
2416
|
+
* Use this method to send point on the map. On success, the sent Message is returned.
|
|
2417
|
+
* @see https://core.telegram.org/bots/api#sendlocation
|
|
2418
|
+
*/
|
|
2419
|
+
sendLocation(payload: SendLocationPayload): Promise<Message>;
|
|
2420
|
+
/**
|
|
2421
|
+
* Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
|
|
2422
|
+
* @see https://core.telegram.org/bots/api#editmessagelivelocation
|
|
2423
|
+
*/
|
|
2424
|
+
editMessageLiveLocation(payload: EditMessageLiveLocationPayload): Promise<Message | boolean>;
|
|
2425
|
+
/**
|
|
2426
|
+
* Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
|
|
2427
|
+
* @see https://core.telegram.org/bots/api#stopmessagelivelocation
|
|
2428
|
+
*/
|
|
2429
|
+
stopMessageLiveLocation(payload: StopMessageLiveLocationPayload): Promise<Message | boolean>;
|
|
2430
|
+
/**
|
|
2431
|
+
* Use this method to send information about a venue. On success, the sent Message is returned.
|
|
2432
|
+
* @see https://core.telegram.org/bots/api#sendvenue
|
|
2433
|
+
*/
|
|
2434
|
+
sendVenue(payload: SendVenuePayload): Promise<Message>;
|
|
2435
|
+
/**
|
|
2436
|
+
* Use this method to send phone contacts. On success, the sent Message is returned.
|
|
2437
|
+
* @see https://core.telegram.org/bots/api#sendcontact
|
|
2438
|
+
*/
|
|
2439
|
+
sendContact(payload: SendContactPayload): Promise<Message>;
|
|
2440
|
+
/**
|
|
2441
|
+
* Use this method to send a native poll. On success, the sent Message is returned.
|
|
2442
|
+
* @see https://core.telegram.org/bots/api#sendpoll
|
|
2443
|
+
*/
|
|
2444
|
+
sendPoll(payload: SendPollPayload): Promise<Message>;
|
|
2445
|
+
/**
|
|
2446
|
+
* Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
|
|
2447
|
+
* @see https://core.telegram.org/bots/api#senddice
|
|
2448
|
+
*/
|
|
2449
|
+
sendDice(payload: SendDicePayload): Promise<Message>;
|
|
2450
|
+
/**
|
|
2451
|
+
* Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
|
|
2452
|
+
*
|
|
2453
|
+
* Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of "Retrieving image, please wait...", the bot may use sendChatAction with action = upload_photo. The user will see a "sending photo" status for the bot.
|
|
2454
|
+
*
|
|
2455
|
+
* We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.
|
|
2456
|
+
* @see https://core.telegram.org/bots/api#sendchataction
|
|
2457
|
+
*/
|
|
2458
|
+
sendChatAction(payload: SendChatActionPayload): Promise<boolean>;
|
|
2459
|
+
/**
|
|
2460
|
+
* Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
|
|
2461
|
+
* @see https://core.telegram.org/bots/api#getuserprofilephotos
|
|
2462
|
+
*/
|
|
2463
|
+
getUserProfilePhotos(payload: GetUserProfilePhotosPayload): Promise<UserProfilePhotos>;
|
|
2464
|
+
/**
|
|
2465
|
+
* Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.
|
|
2466
|
+
* @see https://core.telegram.org/bots/api#getfile
|
|
2467
|
+
*/
|
|
2468
|
+
getFile(payload: GetFilePayload): Promise<File>;
|
|
2469
|
+
/**
|
|
2470
|
+
* Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
|
|
2471
|
+
* @see https://core.telegram.org/bots/api#banchatmember
|
|
2472
|
+
*/
|
|
2473
|
+
banChatMember(payload: BanChatMemberPayload): Promise<boolean>;
|
|
2474
|
+
/**
|
|
2475
|
+
* Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.
|
|
2476
|
+
* @see https://core.telegram.org/bots/api#unbanchatmember
|
|
2477
|
+
*/
|
|
2478
|
+
unbanChatMember(payload: UnbanChatMemberPayload): Promise<boolean>;
|
|
2479
|
+
/**
|
|
2480
|
+
* Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.
|
|
2481
|
+
* @see https://core.telegram.org/bots/api#restrictchatmember
|
|
2482
|
+
*/
|
|
2483
|
+
restrictChatMember(payload: RestrictChatMemberPayload): Promise<boolean>;
|
|
2484
|
+
/**
|
|
2485
|
+
* Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success.
|
|
2486
|
+
* @see https://core.telegram.org/bots/api#promotechatmember
|
|
2487
|
+
*/
|
|
2488
|
+
promoteChatMember(payload: PromoteChatMemberPayload): Promise<boolean>;
|
|
2489
|
+
/**
|
|
2490
|
+
* Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.
|
|
2491
|
+
* @see https://core.telegram.org/bots/api#setchatadministratorcustomtitle
|
|
2492
|
+
*/
|
|
2493
|
+
setChatAdministratorCustomTitle(payload: SetChatAdministratorCustomTitlePayload): Promise<boolean>;
|
|
2494
|
+
/**
|
|
2495
|
+
* Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.
|
|
2496
|
+
* @see https://core.telegram.org/bots/api#banchatsenderchat
|
|
2497
|
+
*/
|
|
2498
|
+
banChatSenderChat(payload: BanChatSenderChatPayload): Promise<boolean>;
|
|
2499
|
+
/**
|
|
2500
|
+
* Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.
|
|
2501
|
+
* @see https://core.telegram.org/bots/api#unbanchatsenderchat
|
|
2502
|
+
*/
|
|
2503
|
+
unbanChatSenderChat(payload: UnbanChatSenderChatPayload): Promise<boolean>;
|
|
2504
|
+
/**
|
|
2505
|
+
* Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success.
|
|
2506
|
+
* @see https://core.telegram.org/bots/api#setchatpermissions
|
|
2507
|
+
*/
|
|
2508
|
+
setChatPermissions(payload: SetChatPermissionsPayload): Promise<boolean>;
|
|
2509
|
+
/**
|
|
2510
|
+
* Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.
|
|
2511
|
+
* @see https://core.telegram.org/bots/api#exportchatinvitelink
|
|
2512
|
+
*/
|
|
2513
|
+
exportChatInviteLink(payload: ExportChatInviteLinkPayload): Promise<string>;
|
|
2514
|
+
/**
|
|
2515
|
+
* Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.
|
|
2516
|
+
* @see https://core.telegram.org/bots/api#createchatinvitelink
|
|
2517
|
+
*/
|
|
2518
|
+
createChatInviteLink(payload: CreateChatInviteLinkPayload): Promise<ChatInviteLink>;
|
|
2519
|
+
/**
|
|
2520
|
+
* Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object.
|
|
2521
|
+
* @see https://core.telegram.org/bots/api#editchatinvitelink
|
|
2522
|
+
*/
|
|
2523
|
+
editChatInviteLink(payload: EditChatInviteLinkPayload): Promise<ChatInviteLink>;
|
|
2524
|
+
/**
|
|
2525
|
+
* Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.
|
|
2526
|
+
* @see https://core.telegram.org/bots/api#revokechatinvitelink
|
|
2527
|
+
*/
|
|
2528
|
+
revokeChatInviteLink(payload: RevokeChatInviteLinkPayload): Promise<ChatInviteLink>;
|
|
2529
|
+
/**
|
|
2530
|
+
* Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.
|
|
2531
|
+
* @see https://core.telegram.org/bots/api#approvechatjoinrequest
|
|
2532
|
+
*/
|
|
2533
|
+
approveChatJoinRequest(payload: ApproveChatJoinRequestPayload): Promise<boolean>;
|
|
2534
|
+
/**
|
|
2535
|
+
* Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.
|
|
2536
|
+
* @see https://core.telegram.org/bots/api#declinechatjoinrequest
|
|
2537
|
+
*/
|
|
2538
|
+
declineChatJoinRequest(payload: DeclineChatJoinRequestPayload): Promise<boolean>;
|
|
2539
|
+
/**
|
|
2540
|
+
* Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
|
|
2541
|
+
* @see https://core.telegram.org/bots/api#setchatphoto
|
|
2542
|
+
*/
|
|
2543
|
+
setChatPhoto(payload: SetChatPhotoPayload): Promise<boolean>;
|
|
2544
|
+
/**
|
|
2545
|
+
* Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
|
|
2546
|
+
* @see https://core.telegram.org/bots/api#deletechatphoto
|
|
2547
|
+
*/
|
|
2548
|
+
deleteChatPhoto(payload: DeleteChatPhotoPayload): Promise<boolean>;
|
|
2549
|
+
/**
|
|
2550
|
+
* Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
|
|
2551
|
+
* @see https://core.telegram.org/bots/api#setchattitle
|
|
2552
|
+
*/
|
|
2553
|
+
setChatTitle(payload: SetChatTitlePayload): Promise<boolean>;
|
|
2554
|
+
/**
|
|
2555
|
+
* Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
|
|
2556
|
+
* @see https://core.telegram.org/bots/api#setchatdescription
|
|
2557
|
+
*/
|
|
2558
|
+
setChatDescription(payload: SetChatDescriptionPayload): Promise<boolean>;
|
|
2559
|
+
/**
|
|
2560
|
+
* Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
|
|
2561
|
+
* @see https://core.telegram.org/bots/api#pinchatmessage
|
|
2562
|
+
*/
|
|
2563
|
+
pinChatMessage(payload: PinChatMessagePayload): Promise<boolean>;
|
|
2564
|
+
/**
|
|
2565
|
+
* Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
|
|
2566
|
+
* @see https://core.telegram.org/bots/api#unpinchatmessage
|
|
2567
|
+
*/
|
|
2568
|
+
unpinChatMessage(payload: UnpinChatMessagePayload): Promise<boolean>;
|
|
2569
|
+
/**
|
|
2570
|
+
* Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
|
|
2571
|
+
* @see https://core.telegram.org/bots/api#unpinallchatmessages
|
|
2572
|
+
*/
|
|
2573
|
+
unpinAllChatMessages(payload: UnpinAllChatMessagesPayload): Promise<boolean>;
|
|
2574
|
+
/**
|
|
2575
|
+
* Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
|
|
2576
|
+
* @see https://core.telegram.org/bots/api#leavechat
|
|
2577
|
+
*/
|
|
2578
|
+
leaveChat(payload: LeaveChatPayload): Promise<boolean>;
|
|
2579
|
+
/**
|
|
2580
|
+
* Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.
|
|
2581
|
+
* @see https://core.telegram.org/bots/api#getchat
|
|
2582
|
+
*/
|
|
2583
|
+
getChat(payload: GetChatPayload): Promise<Chat>;
|
|
2584
|
+
/**
|
|
2585
|
+
* Use this method to get a list of administrators in a chat. On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.
|
|
2586
|
+
* @see https://core.telegram.org/bots/api#getchatadministrators
|
|
2587
|
+
*/
|
|
2588
|
+
getChatAdministrators(payload: GetChatAdministratorsPayload): Promise<ChatMember[]>;
|
|
2589
|
+
/**
|
|
2590
|
+
* Use this method to get the number of members in a chat. Returns Int on success.
|
|
2591
|
+
* @see https://core.telegram.org/bots/api#getchatmembercount
|
|
2592
|
+
*/
|
|
2593
|
+
getChatMemberCount(payload: GetChatMemberCountPayload): Promise<Integer>;
|
|
2594
|
+
/**
|
|
2595
|
+
* Use this method to get information about a member of a chat. Returns a ChatMember object on success.
|
|
2596
|
+
* @see https://core.telegram.org/bots/api#getchatmember
|
|
2597
|
+
*/
|
|
2598
|
+
getChatMember(payload: GetChatMemberPayload): Promise<ChatMember>;
|
|
2599
|
+
/**
|
|
2600
|
+
* Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
|
|
2601
|
+
* @see https://core.telegram.org/bots/api#setchatstickerset
|
|
2602
|
+
*/
|
|
2603
|
+
setChatStickerSet(payload: SetChatStickerSetPayload): Promise<boolean>;
|
|
2604
|
+
/**
|
|
2605
|
+
* Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
|
|
2606
|
+
* @see https://core.telegram.org/bots/api#deletechatstickerset
|
|
2607
|
+
*/
|
|
2608
|
+
deleteChatStickerSet(payload: DeleteChatStickerSetPayload): Promise<boolean>;
|
|
2609
|
+
/**
|
|
2610
|
+
* 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.
|
|
2611
|
+
* @see https://core.telegram.org/bots/api#getforumtopiciconstickers
|
|
2612
|
+
*/
|
|
2613
|
+
getForumTopicIconStickers(): Promise<Sticker[]>;
|
|
2614
|
+
/**
|
|
2615
|
+
* 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.
|
|
2616
|
+
* @see https://core.telegram.org/bots/api#createforumtopic
|
|
2617
|
+
*/
|
|
2618
|
+
createForumTopic(payload: CreateForumTopicPayload): Promise<ForumTopic>;
|
|
2619
|
+
/**
|
|
2620
|
+
* 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.
|
|
2621
|
+
* @see https://core.telegram.org/bots/api#editforumtopic
|
|
2622
|
+
*/
|
|
2623
|
+
editForumTopic(payload: EditForumTopicPayload): Promise<boolean>;
|
|
2624
|
+
/**
|
|
2625
|
+
* 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.
|
|
2626
|
+
* @see https://core.telegram.org/bots/api#closeforumtopic
|
|
2627
|
+
*/
|
|
2628
|
+
closeForumTopic(payload: CloseForumTopicPayload): Promise<boolean>;
|
|
2629
|
+
/**
|
|
2630
|
+
* 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.
|
|
2631
|
+
* @see https://core.telegram.org/bots/api#reopenforumtopic
|
|
2632
|
+
*/
|
|
2633
|
+
reopenForumTopic(payload: ReopenForumTopicPayload): Promise<boolean>;
|
|
2634
|
+
/**
|
|
2635
|
+
* 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.
|
|
2636
|
+
* @see https://core.telegram.org/bots/api#deleteforumtopic
|
|
2637
|
+
*/
|
|
2638
|
+
deleteForumTopic(payload: DeleteForumTopicPayload): Promise<boolean>;
|
|
2639
|
+
/**
|
|
2640
|
+
* 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.
|
|
2641
|
+
* @see https://core.telegram.org/bots/api#unpinallforumtopicmessages
|
|
2642
|
+
*/
|
|
2643
|
+
unpinAllForumTopicMessages(payload: UnpinAllChatMessagesPayload): Promise<boolean>;
|
|
2644
|
+
/**
|
|
2645
|
+
* Use this method to edit the name of the 'General' 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. Returns True on success.
|
|
2646
|
+
* @see https://core.telegram.org/bots/api#editgeneralforumtopic
|
|
2647
|
+
*/
|
|
2648
|
+
editGeneralForumTopic(payload: EditGeneralForumTopicPayload): Promise<boolean>;
|
|
2649
|
+
/**
|
|
2650
|
+
* Use this method to close an open 'General' 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 True on success.
|
|
2651
|
+
* @see https://core.telegram.org/bots/api#closegeneralforumtopic
|
|
2652
|
+
*/
|
|
2653
|
+
closeGeneralForumTopic(payload: CloseGeneralForumTopicPayload): Promise<boolean>;
|
|
2654
|
+
/**
|
|
2655
|
+
* Use this method to reopen a closed 'General' 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. The topic will be automatically unhidden if it was hidden. Returns True on success.
|
|
2656
|
+
* @see https://core.telegram.org/bots/api#reopengeneralforumtopic
|
|
2657
|
+
*/
|
|
2658
|
+
reopenGeneralForumTopic(payload: ReopenForumTopicPayload): Promise<boolean>;
|
|
2659
|
+
/**
|
|
2660
|
+
* Use this method to hide the 'General' 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. The topic will be automatically closed if it was open. Returns True on success.
|
|
2661
|
+
* @see https://core.telegram.org/bots/api#hidegeneralforumtopic
|
|
2662
|
+
*/
|
|
2663
|
+
hideGeneralForumTopic(payload: HideGeneralForumTopicPayload): Promise<boolean>;
|
|
2664
|
+
/**
|
|
2665
|
+
* Use this method to unhide the 'General' 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 True on success.
|
|
2666
|
+
* @see https://core.telegram.org/bots/api#unhidegeneralforumtopic
|
|
2667
|
+
*/
|
|
2668
|
+
unhideGeneralForumTopic(payload: UnhideGeneralForumTopicPaylad): Promise<boolean>;
|
|
2669
|
+
/**
|
|
2670
|
+
* 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.
|
|
2671
|
+
*
|
|
2672
|
+
* 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.
|
|
2673
|
+
* @see https://core.telegram.org/bots/api#answercallbackquery
|
|
2674
|
+
*/
|
|
2675
|
+
answerCallbackQuery(payload: AnswerCallbackQueryPayload): Promise<boolean>;
|
|
2676
|
+
/**
|
|
2677
|
+
* Use this method to change the list of the bot's commands. See https://core.telegram.org/bots#commands for more details about bot commands. Returns True on success.
|
|
2678
|
+
* @see https://core.telegram.org/bots/api#setmycommands
|
|
2679
|
+
*/
|
|
2680
|
+
setMyCommands(payload: SetMyCommandsPayload): Promise<boolean>;
|
|
2681
|
+
/**
|
|
2682
|
+
* Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.
|
|
2683
|
+
* @see https://core.telegram.org/bots/api#deletemycommands
|
|
2684
|
+
*/
|
|
2685
|
+
deleteMyCommands(payload: DeleteMyCommandsPayload): Promise<boolean>;
|
|
2686
|
+
/**
|
|
2687
|
+
* Use this method to get the current list of the bot's commands for the given scope and user language. Returns BotCommand on success. If commands aren't set, an empty list is returned.
|
|
2688
|
+
* @see https://core.telegram.org/bots/api#getmycommands
|
|
2689
|
+
*/
|
|
2690
|
+
getMyCommands(payload: GetMyCommandsPayload): Promise<BotCommand[]>;
|
|
2691
|
+
/**
|
|
2692
|
+
* Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.
|
|
2693
|
+
* @see https://core.telegram.org/bots/api#setchatmenubutton
|
|
2694
|
+
*/
|
|
2695
|
+
setChatMenuButton(payload: SetChatMenuButtonPayload): Promise<boolean>;
|
|
2696
|
+
/**
|
|
2697
|
+
* Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.
|
|
2698
|
+
* @see https://core.telegram.org/bots/api#getchatmenubutton
|
|
2699
|
+
*/
|
|
2700
|
+
getChatMenuButton(payload: GetChatMenuButtonPayload): Promise<MenuButton>;
|
|
2701
|
+
/**
|
|
2702
|
+
* Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.
|
|
2703
|
+
* @see https://core.telegram.org/bots/api#setmydefaultadministratorrights
|
|
2704
|
+
*/
|
|
2705
|
+
setMyDefaultAdministratorRights(payload: SetMyDefaultAdministratorRightsPayload): Promise<boolean>;
|
|
2706
|
+
/**
|
|
2707
|
+
* Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.
|
|
2708
|
+
* @see https://core.telegram.org/bots/api#getmydefaultadministratorrights
|
|
2709
|
+
*/
|
|
2710
|
+
getMyDefaultAdministratorRights(payload: GetMyDefaultAdministratorRightsPayload): Promise<ChatAdministratorRights>;
|
|
2711
|
+
/**
|
|
2712
|
+
* Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
|
|
2713
|
+
* @see https://core.telegram.org/bots/api#editmessagetext
|
|
2714
|
+
*/
|
|
2715
|
+
editMessageText(payload: EditMessageTextPayload): Promise<Message | boolean>;
|
|
2716
|
+
/**
|
|
2717
|
+
* Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
|
|
2718
|
+
* @see https://core.telegram.org/bots/api#editmessagecaption
|
|
2719
|
+
*/
|
|
2720
|
+
editMessageCaption(payload: EditMessageCaptionPayload): Promise<Message | boolean>;
|
|
2721
|
+
/**
|
|
2722
|
+
* Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
|
|
2723
|
+
* @see https://core.telegram.org/bots/api#editmessagemedia
|
|
2724
|
+
*/
|
|
2725
|
+
editMessageMedia(payload: EditMessageMediaPayload): Promise<Message | boolean>;
|
|
2726
|
+
/**
|
|
2727
|
+
* Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
|
|
2728
|
+
* @see https://core.telegram.org/bots/api#editmessagereplymarkup
|
|
2729
|
+
*/
|
|
2730
|
+
editMessageReplyMarkup(payload: EditMessageReplyMarkupPayload): Promise<Message | boolean>;
|
|
2731
|
+
/**
|
|
2732
|
+
* Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
|
|
2733
|
+
* @see https://core.telegram.org/bots/api#stoppoll
|
|
2734
|
+
*/
|
|
2735
|
+
stopPoll(payload: StopPollPayload): Promise<Poll>;
|
|
2736
|
+
/**
|
|
2737
|
+
* Use this method to delete a message, including service messages, with the following limitations:
|
|
2738
|
+
* - A message can only be deleted if it was sent less than 48 hours ago.
|
|
2739
|
+
* - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
|
|
2740
|
+
* - Bots can delete outgoing messages in private chats, groups, and supergroups.
|
|
2741
|
+
* - Bots can delete incoming messages in private chats.
|
|
2742
|
+
* - Bots granted can_post_messages permissions can delete outgoing messages in channels.
|
|
2743
|
+
* - If the bot is an administrator of a group, it can delete any message there.
|
|
2744
|
+
* - If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.
|
|
2745
|
+
* Returns True on success.
|
|
2746
|
+
* @see https://core.telegram.org/bots/api#deletemessage
|
|
2747
|
+
*/
|
|
2748
|
+
deleteMessage(payload: DeleteMessagePayload): Promise<boolean>;
|
|
2749
|
+
}
|
|
2750
|
+
}
|
|
2751
|
+
//# sourceMappingURL=index.d.ts.map
|