@yaebal/contexts 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +17 -0
- package/lib/generated/business-connection.d.ts +14 -0
- package/lib/generated/business-connection.d.ts.map +1 -0
- package/lib/generated/business-connection.js +18 -0
- package/lib/generated/business-connection.js.map +1 -0
- package/lib/generated/business-message.d.ts +208 -0
- package/lib/generated/business-message.d.ts.map +1 -0
- package/lib/generated/business-message.js +406 -0
- package/lib/generated/business-message.js.map +1 -0
- package/lib/generated/callback-query.d.ts +200 -0
- package/lib/generated/callback-query.d.ts.map +1 -0
- package/lib/generated/callback-query.js +390 -0
- package/lib/generated/callback-query.js.map +1 -0
- package/lib/generated/channel-post.d.ts +208 -0
- package/lib/generated/channel-post.d.ts.map +1 -0
- package/lib/generated/channel-post.js +406 -0
- package/lib/generated/channel-post.js.map +1 -0
- package/lib/generated/chat-boost.d.ts +144 -0
- package/lib/generated/chat-boost.d.ts.map +1 -0
- package/lib/generated/chat-boost.js +278 -0
- package/lib/generated/chat-boost.js.map +1 -0
- package/lib/generated/chat-join-request.d.ts +196 -0
- package/lib/generated/chat-join-request.d.ts.map +1 -0
- package/lib/generated/chat-join-request.js +382 -0
- package/lib/generated/chat-join-request.js.map +1 -0
- package/lib/generated/chat-member.d.ts +196 -0
- package/lib/generated/chat-member.d.ts.map +1 -0
- package/lib/generated/chat-member.js +382 -0
- package/lib/generated/chat-member.js.map +1 -0
- package/lib/generated/chosen-inline-result.d.ts +46 -0
- package/lib/generated/chosen-inline-result.d.ts.map +1 -0
- package/lib/generated/chosen-inline-result.js +82 -0
- package/lib/generated/chosen-inline-result.js.map +1 -0
- package/lib/generated/deleted-business-messages.d.ts +144 -0
- package/lib/generated/deleted-business-messages.d.ts.map +1 -0
- package/lib/generated/deleted-business-messages.js +278 -0
- package/lib/generated/deleted-business-messages.js.map +1 -0
- package/lib/generated/edited-business-message.d.ts +208 -0
- package/lib/generated/edited-business-message.d.ts.map +1 -0
- package/lib/generated/edited-business-message.js +406 -0
- package/lib/generated/edited-business-message.js.map +1 -0
- package/lib/generated/edited-channel-post.d.ts +208 -0
- package/lib/generated/edited-channel-post.d.ts.map +1 -0
- package/lib/generated/edited-channel-post.js +406 -0
- package/lib/generated/edited-channel-post.js.map +1 -0
- package/lib/generated/edited-message.d.ts +208 -0
- package/lib/generated/edited-message.d.ts.map +1 -0
- package/lib/generated/edited-message.js +406 -0
- package/lib/generated/edited-message.js.map +1 -0
- package/lib/generated/index.d.ts +88 -0
- package/lib/generated/index.d.ts.map +1 -0
- package/lib/generated/index.js +88 -0
- package/lib/generated/index.js.map +1 -0
- package/lib/generated/inline-query.d.ts +48 -0
- package/lib/generated/inline-query.d.ts.map +1 -0
- package/lib/generated/inline-query.js +86 -0
- package/lib/generated/inline-query.js.map +1 -0
- package/lib/generated/message-reaction-count.d.ts +154 -0
- package/lib/generated/message-reaction-count.d.ts.map +1 -0
- package/lib/generated/message-reaction-count.js +298 -0
- package/lib/generated/message-reaction-count.js.map +1 -0
- package/lib/generated/message-reaction.d.ts +158 -0
- package/lib/generated/message-reaction.d.ts.map +1 -0
- package/lib/generated/message-reaction.js +306 -0
- package/lib/generated/message-reaction.js.map +1 -0
- package/lib/generated/message.d.ts +208 -0
- package/lib/generated/message.d.ts.map +1 -0
- package/lib/generated/message.js +406 -0
- package/lib/generated/message.js.map +1 -0
- package/lib/generated/my-chat-member.d.ts +196 -0
- package/lib/generated/my-chat-member.d.ts.map +1 -0
- package/lib/generated/my-chat-member.js +382 -0
- package/lib/generated/my-chat-member.js.map +1 -0
- package/lib/generated/poll-answer.d.ts +14 -0
- package/lib/generated/poll-answer.d.ts.map +1 -0
- package/lib/generated/poll-answer.js +18 -0
- package/lib/generated/poll-answer.js.map +1 -0
- package/lib/generated/poll.d.ts +10 -0
- package/lib/generated/poll.d.ts.map +1 -0
- package/lib/generated/poll.js +10 -0
- package/lib/generated/poll.js.map +1 -0
- package/lib/generated/pre-checkout-query.d.ts +48 -0
- package/lib/generated/pre-checkout-query.d.ts.map +1 -0
- package/lib/generated/pre-checkout-query.js +86 -0
- package/lib/generated/pre-checkout-query.js.map +1 -0
- package/lib/generated/purchased-paid-media.d.ts +46 -0
- package/lib/generated/purchased-paid-media.d.ts.map +1 -0
- package/lib/generated/purchased-paid-media.js +82 -0
- package/lib/generated/purchased-paid-media.js.map +1 -0
- package/lib/generated/removed-chat-boost.d.ts +144 -0
- package/lib/generated/removed-chat-boost.d.ts.map +1 -0
- package/lib/generated/removed-chat-boost.js +278 -0
- package/lib/generated/removed-chat-boost.js.map +1 -0
- package/lib/generated/shipping-query.d.ts +48 -0
- package/lib/generated/shipping-query.d.ts.map +1 -0
- package/lib/generated/shipping-query.js +86 -0
- package/lib/generated/shipping-query.js.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -0
- package/lib/index.test.d.ts +2 -0
- package/lib/index.test.d.ts.map +1 -0
- package/lib/index.test.js +202 -0
- package/lib/index.test.js.map +1 -0
- package/lib/sugar/business-message.d.ts +69 -0
- package/lib/sugar/business-message.d.ts.map +1 -0
- package/lib/sugar/business-message.js +6 -0
- package/lib/sugar/business-message.js.map +1 -0
- package/lib/sugar/callback-query.d.ts +21 -0
- package/lib/sugar/callback-query.d.ts.map +1 -0
- package/lib/sugar/callback-query.js +19 -0
- package/lib/sugar/callback-query.js.map +1 -0
- package/lib/sugar/channel-post.d.ts +69 -0
- package/lib/sugar/channel-post.d.ts.map +1 -0
- package/lib/sugar/channel-post.js +6 -0
- package/lib/sugar/channel-post.js.map +1 -0
- package/lib/sugar/chat-join-request.d.ts +9 -0
- package/lib/sugar/chat-join-request.d.ts.map +1 -0
- package/lib/sugar/chat-join-request.js +13 -0
- package/lib/sugar/chat-join-request.js.map +1 -0
- package/lib/sugar/edited-business-message.d.ts +69 -0
- package/lib/sugar/edited-business-message.d.ts.map +1 -0
- package/lib/sugar/edited-business-message.js +6 -0
- package/lib/sugar/edited-business-message.js.map +1 -0
- package/lib/sugar/edited-channel-post.d.ts +69 -0
- package/lib/sugar/edited-channel-post.d.ts.map +1 -0
- package/lib/sugar/edited-channel-post.js +6 -0
- package/lib/sugar/edited-channel-post.js.map +1 -0
- package/lib/sugar/edited-message.d.ts +69 -0
- package/lib/sugar/edited-message.d.ts.map +1 -0
- package/lib/sugar/edited-message.js +6 -0
- package/lib/sugar/edited-message.js.map +1 -0
- package/lib/sugar/inline-query.d.ts +14 -0
- package/lib/sugar/inline-query.d.ts.map +1 -0
- package/lib/sugar/inline-query.js +11 -0
- package/lib/sugar/inline-query.js.map +1 -0
- package/lib/sugar/message-mixin.d.ts +55 -0
- package/lib/sugar/message-mixin.d.ts.map +1 -0
- package/lib/sugar/message-mixin.js +74 -0
- package/lib/sugar/message-mixin.js.map +1 -0
- package/lib/sugar/message.d.ts +69 -0
- package/lib/sugar/message.d.ts.map +1 -0
- package/lib/sugar/message.js +6 -0
- package/lib/sugar/message.js.map +1 -0
- package/lib/sugar/pre-checkout-query.d.ts +11 -0
- package/lib/sugar/pre-checkout-query.d.ts.map +1 -0
- package/lib/sugar/pre-checkout-query.js +8 -0
- package/lib/sugar/pre-checkout-query.js.map +1 -0
- package/lib/sugar/shipping-query.d.ts +11 -0
- package/lib/sugar/shipping-query.d.ts.map +1 -0
- package/lib/sugar/shipping-query.js +8 -0
- package/lib/sugar/shipping-query.js.map +1 -0
- package/package.json +50 -0
- package/src/generated/business-connection.ts +22 -0
- package/src/generated/business-message.ts +410 -0
- package/src/generated/callback-query.ts +394 -0
- package/src/generated/channel-post.ts +410 -0
- package/src/generated/chat-boost.ts +282 -0
- package/src/generated/chat-join-request.ts +386 -0
- package/src/generated/chat-member.ts +386 -0
- package/src/generated/chosen-inline-result.ts +86 -0
- package/src/generated/deleted-business-messages.ts +282 -0
- package/src/generated/edited-business-message.ts +410 -0
- package/src/generated/edited-channel-post.ts +410 -0
- package/src/generated/edited-message.ts +410 -0
- package/src/generated/index.ts +127 -0
- package/src/generated/inline-query.ts +90 -0
- package/src/generated/message-reaction-count.ts +302 -0
- package/src/generated/message-reaction.ts +310 -0
- package/src/generated/message.ts +410 -0
- package/src/generated/my-chat-member.ts +386 -0
- package/src/generated/poll-answer.ts +22 -0
- package/src/generated/poll.ts +15 -0
- package/src/generated/pre-checkout-query.ts +90 -0
- package/src/generated/purchased-paid-media.ts +86 -0
- package/src/generated/removed-chat-boost.ts +282 -0
- package/src/generated/shipping-query.ts +90 -0
- package/src/index.test.ts +241 -0
- package/src/index.ts +9 -0
- package/src/sugar/business-message.ts +5 -0
- package/src/sugar/callback-query.ts +41 -0
- package/src/sugar/channel-post.ts +5 -0
- package/src/sugar/chat-join-request.ts +13 -0
- package/src/sugar/edited-business-message.ts +5 -0
- package/src/sugar/edited-channel-post.ts +5 -0
- package/src/sugar/edited-message.ts +5 -0
- package/src/sugar/inline-query.ts +20 -0
- package/src/sugar/message-mixin.ts +137 -0
- package/src/sugar/message.ts +7 -0
- package/src/sugar/pre-checkout-query.ts +19 -0
- package/src/sugar/shipping-query.ts +17 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
export class MessageReactionContext {
|
|
2
|
+
api;
|
|
3
|
+
update;
|
|
4
|
+
constructor(api, update) {
|
|
5
|
+
this.api = api;
|
|
6
|
+
this.update = update;
|
|
7
|
+
Object.assign(this, update.message_reaction ?? {});
|
|
8
|
+
}
|
|
9
|
+
/** Id of the user this update is from. */
|
|
10
|
+
get senderId() {
|
|
11
|
+
return this.user?.id;
|
|
12
|
+
}
|
|
13
|
+
/** First name of the user this update is from. */
|
|
14
|
+
get firstName() {
|
|
15
|
+
return this.user?.first_name;
|
|
16
|
+
}
|
|
17
|
+
/** Id of the chat this update is in. */
|
|
18
|
+
get chatId() {
|
|
19
|
+
return this.chat.id;
|
|
20
|
+
}
|
|
21
|
+
/** Whether this is a private (1:1) chat. */
|
|
22
|
+
get isPM() {
|
|
23
|
+
return this.chat.type === "private";
|
|
24
|
+
}
|
|
25
|
+
/** Whether this is a group or supergroup. */
|
|
26
|
+
get isGroup() {
|
|
27
|
+
return this.chat.type === "group" || this.chat.type === "supergroup";
|
|
28
|
+
}
|
|
29
|
+
/** Camel-case alias for `message_id`. */
|
|
30
|
+
get messageId() {
|
|
31
|
+
return this.message_id;
|
|
32
|
+
}
|
|
33
|
+
/** Use this method to send text messages. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
34
|
+
send(params) {
|
|
35
|
+
return this.api.call("sendMessage", { chat_id: this.chat.id, ...params });
|
|
36
|
+
}
|
|
37
|
+
/** Use this method to send photos. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
38
|
+
sendPhoto(params) {
|
|
39
|
+
return this.api.call("sendPhoto", { chat_id: this.chat.id, ...params });
|
|
40
|
+
}
|
|
41
|
+
/** 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](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. For sending voice messages, use the [sendVoice](https://core.telegram.org/bots/api/#sendvoice) method instead. */
|
|
42
|
+
sendAudio(params) {
|
|
43
|
+
return this.api.call("sendAudio", { chat_id: this.chat.id, ...params });
|
|
44
|
+
}
|
|
45
|
+
/** Use this method to send general files. On success, the sent [Message](https://core.telegram.org/bots/api/#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. */
|
|
46
|
+
sendDocument(params) {
|
|
47
|
+
return this.api.call("sendDocument", { chat_id: this.chat.id, ...params });
|
|
48
|
+
}
|
|
49
|
+
/** Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as [Document](https://core.telegram.org/bots/api/#document)). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. */
|
|
50
|
+
sendVideo(params) {
|
|
51
|
+
return this.api.call("sendVideo", { chat_id: this.chat.id, ...params });
|
|
52
|
+
}
|
|
53
|
+
/** Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. */
|
|
54
|
+
sendAnimation(params) {
|
|
55
|
+
return this.api.call("sendAnimation", { chat_id: this.chat.id, ...params });
|
|
56
|
+
}
|
|
57
|
+
/** 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, or in .MP3 format, or in .M4A format (other formats may be sent as [Audio](https://core.telegram.org/bots/api/#audio) or [Document](https://core.telegram.org/bots/api/#document)). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. */
|
|
58
|
+
sendVoice(params) {
|
|
59
|
+
return this.api.call("sendVoice", { chat_id: this.chat.id, ...params });
|
|
60
|
+
}
|
|
61
|
+
/** As of [v.4.0](https://telegram.org/blog/video-messages-and-telescope), Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
62
|
+
sendVideoNote(params) {
|
|
63
|
+
return this.api.call("sendVideoNote", { chat_id: this.chat.id, ...params });
|
|
64
|
+
}
|
|
65
|
+
/** Use this method to send paid media. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
66
|
+
sendPaidMedia(params) {
|
|
67
|
+
return this.api.call("sendPaidMedia", { chat_id: this.chat.id, ...params });
|
|
68
|
+
}
|
|
69
|
+
/** 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](https://core.telegram.org/bots/api/#message) that were sent is returned. */
|
|
70
|
+
sendMediaGroup(params) {
|
|
71
|
+
return this.api.call("sendMediaGroup", { chat_id: this.chat.id, ...params });
|
|
72
|
+
}
|
|
73
|
+
/** Use this method to send point on the map. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
74
|
+
sendLocation(params) {
|
|
75
|
+
return this.api.call("sendLocation", { chat_id: this.chat.id, ...params });
|
|
76
|
+
}
|
|
77
|
+
/** Use this method to send information about a venue. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
78
|
+
sendVenue(params) {
|
|
79
|
+
return this.api.call("sendVenue", { chat_id: this.chat.id, ...params });
|
|
80
|
+
}
|
|
81
|
+
/** Use this method to send phone contacts. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
82
|
+
sendContact(params) {
|
|
83
|
+
return this.api.call("sendContact", { chat_id: this.chat.id, ...params });
|
|
84
|
+
}
|
|
85
|
+
/** Use this method to send a native poll. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
86
|
+
sendPoll(params) {
|
|
87
|
+
return this.api.call("sendPoll", { chat_id: this.chat.id, ...params });
|
|
88
|
+
}
|
|
89
|
+
/** Use this method to send an animated emoji that will display a random value. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
90
|
+
sendDice(params) {
|
|
91
|
+
return this.api.call("sendDice", { chat_id: this.chat.id, ...params });
|
|
92
|
+
}
|
|
93
|
+
/** 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. Example: The [ImageBot](https://t.me/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](https://core.telegram.org/bots/api/#sendchataction) with *action* = *upload\_photo*. The user will see a “sending photo” status for the bot. We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. */
|
|
94
|
+
sendChatAction(params) {
|
|
95
|
+
return this.api.call("sendChatAction", { chat_id: this.chat.id, ...params });
|
|
96
|
+
}
|
|
97
|
+
/** Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns *True* on success. */
|
|
98
|
+
react(params) {
|
|
99
|
+
return this.api.call("setMessageReaction", { chat_id: this.chat.id, message_id: this.message_id, ...params });
|
|
100
|
+
}
|
|
101
|
+
/** Use this method to ban a channel chat in a supergroup or a channel. Until the chat is [unbanned](https://core.telegram.org/bots/api/#unbanchatsenderchat), 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. */
|
|
102
|
+
banChatSenderChat(params) {
|
|
103
|
+
return this.api.call("banChatSenderChat", { chat_id: this.chat.id, ...params });
|
|
104
|
+
}
|
|
105
|
+
/** 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. */
|
|
106
|
+
unbanChatSenderChat(params) {
|
|
107
|
+
return this.api.call("unbanChatSenderChat", { chat_id: this.chat.id, ...params });
|
|
108
|
+
}
|
|
109
|
+
/** 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. */
|
|
110
|
+
setChatPermissions(params) {
|
|
111
|
+
return this.api.call("setChatPermissions", { chat_id: this.chat.id, ...params });
|
|
112
|
+
}
|
|
113
|
+
/** 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. */
|
|
114
|
+
exportChatInviteLink(params) {
|
|
115
|
+
return this.api.call("exportChatInviteLink", { chat_id: this.chat.id, ...params });
|
|
116
|
+
}
|
|
117
|
+
/** 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](https://core.telegram.org/bots/api/#revokechatinvitelink). Returns the new invite link as [ChatInviteLink](https://core.telegram.org/bots/api/#chatinvitelink) object. */
|
|
118
|
+
createChatInviteLink(params) {
|
|
119
|
+
return this.api.call("createChatInviteLink", { chat_id: this.chat.id, ...params });
|
|
120
|
+
}
|
|
121
|
+
/** 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](https://core.telegram.org/bots/api/#chatinvitelink) object. */
|
|
122
|
+
editChatInviteLink(params) {
|
|
123
|
+
return this.api.call("editChatInviteLink", { chat_id: this.chat.id, ...params });
|
|
124
|
+
}
|
|
125
|
+
/** Use this method to create a [subscription invite link](https://telegram.org/blog/superchannels-star-reactions-subscriptions#star-subscriptions) for a channel chat. The bot must have the *can\_invite\_users* administrator rights. The link can be edited using the method [editChatSubscriptionInviteLink](https://core.telegram.org/bots/api/#editchatsubscriptioninvitelink) or revoked using the method [revokeChatInviteLink](https://core.telegram.org/bots/api/#revokechatinvitelink). Returns the new invite link as a [ChatInviteLink](https://core.telegram.org/bots/api/#chatinvitelink) object. */
|
|
126
|
+
createChatSubscriptionInviteLink(params) {
|
|
127
|
+
return this.api.call("createChatSubscriptionInviteLink", { chat_id: this.chat.id, ...params });
|
|
128
|
+
}
|
|
129
|
+
/** Use this method to edit a subscription invite link created by the bot. The bot must have the *can\_invite\_users* administrator rights. Returns the edited invite link as a [ChatInviteLink](https://core.telegram.org/bots/api/#chatinvitelink) object. */
|
|
130
|
+
editChatSubscriptionInviteLink(params) {
|
|
131
|
+
return this.api.call("editChatSubscriptionInviteLink", { chat_id: this.chat.id, ...params });
|
|
132
|
+
}
|
|
133
|
+
/** 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](https://core.telegram.org/bots/api/#chatinvitelink) object. */
|
|
134
|
+
revokeChatInviteLink(params) {
|
|
135
|
+
return this.api.call("revokeChatInviteLink", { chat_id: this.chat.id, ...params });
|
|
136
|
+
}
|
|
137
|
+
/** 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. */
|
|
138
|
+
setChatPhoto(params) {
|
|
139
|
+
return this.api.call("setChatPhoto", { chat_id: this.chat.id, ...params });
|
|
140
|
+
}
|
|
141
|
+
/** 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. */
|
|
142
|
+
deleteChatPhoto(params) {
|
|
143
|
+
return this.api.call("deleteChatPhoto", { chat_id: this.chat.id, ...params });
|
|
144
|
+
}
|
|
145
|
+
/** 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. */
|
|
146
|
+
setChatTitle(params) {
|
|
147
|
+
return this.api.call("setChatTitle", { chat_id: this.chat.id, ...params });
|
|
148
|
+
}
|
|
149
|
+
/** 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. */
|
|
150
|
+
setChatDescription(params) {
|
|
151
|
+
return this.api.call("setChatDescription", { chat_id: this.chat.id, ...params });
|
|
152
|
+
}
|
|
153
|
+
/** 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. */
|
|
154
|
+
pin(params) {
|
|
155
|
+
return this.api.call("pinChatMessage", { chat_id: this.chat.id, message_id: this.message_id, ...params });
|
|
156
|
+
}
|
|
157
|
+
/** 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. */
|
|
158
|
+
unpin(params) {
|
|
159
|
+
return this.api.call("unpinChatMessage", { chat_id: this.chat.id, message_id: this.message_id, ...params });
|
|
160
|
+
}
|
|
161
|
+
/** 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. */
|
|
162
|
+
unpinAllChatMessages(params) {
|
|
163
|
+
return this.api.call("unpinAllChatMessages", { chat_id: this.chat.id, ...params });
|
|
164
|
+
}
|
|
165
|
+
/** Use this method for your bot to leave a group, supergroup or channel. Returns *True* on success. */
|
|
166
|
+
leaveChat(params) {
|
|
167
|
+
return this.api.call("leaveChat", { chat_id: this.chat.id, ...params });
|
|
168
|
+
}
|
|
169
|
+
/** Use this method to get up-to-date information about the chat. Returns a [ChatFullInfo](https://core.telegram.org/bots/api/#chatfullinfo) object on success. */
|
|
170
|
+
getChat(params) {
|
|
171
|
+
return this.api.call("getChat", { chat_id: this.chat.id, ...params });
|
|
172
|
+
}
|
|
173
|
+
/** Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of [ChatMember](https://core.telegram.org/bots/api/#chatmember) objects. */
|
|
174
|
+
getChatAdministrators(params) {
|
|
175
|
+
return this.api.call("getChatAdministrators", { chat_id: this.chat.id, ...params });
|
|
176
|
+
}
|
|
177
|
+
/** Use this method to get the number of members in a chat. Returns *Int* on success. */
|
|
178
|
+
getChatMemberCount(params) {
|
|
179
|
+
return this.api.call("getChatMemberCount", { chat_id: this.chat.id, ...params });
|
|
180
|
+
}
|
|
181
|
+
/** 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](https://core.telegram.org/bots/api/#getchat) requests to check if the bot can use this method. Returns *True* on success. */
|
|
182
|
+
setChatStickerSet(params) {
|
|
183
|
+
return this.api.call("setChatStickerSet", { chat_id: this.chat.id, ...params });
|
|
184
|
+
}
|
|
185
|
+
/** 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](https://core.telegram.org/bots/api/#getchat) requests to check if the bot can use this method. Returns *True* on success. */
|
|
186
|
+
deleteChatStickerSet(params) {
|
|
187
|
+
return this.api.call("deleteChatStickerSet", { chat_id: this.chat.id, ...params });
|
|
188
|
+
}
|
|
189
|
+
/** 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](https://core.telegram.org/bots/api/#forumtopic) object. */
|
|
190
|
+
createForumTopic(params) {
|
|
191
|
+
return this.api.call("createForumTopic", { chat_id: this.chat.id, ...params });
|
|
192
|
+
}
|
|
193
|
+
/** 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 the *can\_manage\_topics* administrator rights, unless it is the creator of the topic. Returns *True* on success. */
|
|
194
|
+
editForumTopic(params) {
|
|
195
|
+
return this.api.call("editForumTopic", { chat_id: this.chat.id, ...params });
|
|
196
|
+
}
|
|
197
|
+
/** 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. */
|
|
198
|
+
closeForumTopic(params) {
|
|
199
|
+
return this.api.call("closeForumTopic", { chat_id: this.chat.id, ...params });
|
|
200
|
+
}
|
|
201
|
+
/** 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. */
|
|
202
|
+
reopenForumTopic(params) {
|
|
203
|
+
return this.api.call("reopenForumTopic", { chat_id: this.chat.id, ...params });
|
|
204
|
+
}
|
|
205
|
+
/** 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. */
|
|
206
|
+
deleteForumTopic(params) {
|
|
207
|
+
return this.api.call("deleteForumTopic", { chat_id: this.chat.id, ...params });
|
|
208
|
+
}
|
|
209
|
+
/** 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. */
|
|
210
|
+
unpinAllForumTopicMessages(params) {
|
|
211
|
+
return this.api.call("unpinAllForumTopicMessages", { chat_id: this.chat.id, ...params });
|
|
212
|
+
}
|
|
213
|
+
/** 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 the *can\_manage\_topics* administrator rights. Returns *True* on success. */
|
|
214
|
+
editGeneralForumTopic(params) {
|
|
215
|
+
return this.api.call("editGeneralForumTopic", { chat_id: this.chat.id, ...params });
|
|
216
|
+
}
|
|
217
|
+
/** 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. */
|
|
218
|
+
closeGeneralForumTopic(params) {
|
|
219
|
+
return this.api.call("closeGeneralForumTopic", { chat_id: this.chat.id, ...params });
|
|
220
|
+
}
|
|
221
|
+
/** 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. */
|
|
222
|
+
reopenGeneralForumTopic(params) {
|
|
223
|
+
return this.api.call("reopenGeneralForumTopic", { chat_id: this.chat.id, ...params });
|
|
224
|
+
}
|
|
225
|
+
/** 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. */
|
|
226
|
+
hideGeneralForumTopic(params) {
|
|
227
|
+
return this.api.call("hideGeneralForumTopic", { chat_id: this.chat.id, ...params });
|
|
228
|
+
}
|
|
229
|
+
/** 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. */
|
|
230
|
+
unhideGeneralForumTopic(params) {
|
|
231
|
+
return this.api.call("unhideGeneralForumTopic", { chat_id: this.chat.id, ...params });
|
|
232
|
+
}
|
|
233
|
+
/** Use this method to clear the list of pinned messages in a General 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. */
|
|
234
|
+
unpinAllGeneralForumTopicMessages(params) {
|
|
235
|
+
return this.api.call("unpinAllGeneralForumTopicMessages", { chat_id: this.chat.id, ...params });
|
|
236
|
+
}
|
|
237
|
+
/** Use this method to change the bot's menu button in a private chat, or the default menu button. Returns *True* on success. */
|
|
238
|
+
setChatMenuButton(params) {
|
|
239
|
+
return this.api.call("setChatMenuButton", { chat_id: this.chat.id, ...params });
|
|
240
|
+
}
|
|
241
|
+
/** 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](https://core.telegram.org/bots/api/#menubutton) on success. */
|
|
242
|
+
getChatMenuButton(params) {
|
|
243
|
+
return this.api.call("getChatMenuButton", { chat_id: this.chat.id, ...params });
|
|
244
|
+
}
|
|
245
|
+
/** Use this method to edit text and [game](https://core.telegram.org/bots/api/#games) messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. */
|
|
246
|
+
editText(params) {
|
|
247
|
+
return this.api.call("editMessageText", { chat_id: this.chat.id, message_id: this.message_id, ...params });
|
|
248
|
+
}
|
|
249
|
+
/** Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. */
|
|
250
|
+
editCaption(params) {
|
|
251
|
+
return this.api.call("editMessageCaption", { chat_id: this.chat.id, message_id: this.message_id, ...params });
|
|
252
|
+
}
|
|
253
|
+
/** Use this method to edit animation, audio, document, photo, or video messages, or to add media to text 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](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. */
|
|
254
|
+
editMedia(params) {
|
|
255
|
+
return this.api.call("editMessageMedia", { chat_id: this.chat.id, message_id: this.message_id, ...params });
|
|
256
|
+
}
|
|
257
|
+
/** 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](https://core.telegram.org/bots/api/#stopmessagelivelocation). On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. */
|
|
258
|
+
editLiveLocation(params) {
|
|
259
|
+
return this.api.call("editMessageLiveLocation", { chat_id: this.chat.id, message_id: this.message_id, ...params });
|
|
260
|
+
}
|
|
261
|
+
/** 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](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. */
|
|
262
|
+
stopMessageLiveLocation(params) {
|
|
263
|
+
return this.api.call("stopMessageLiveLocation", { chat_id: this.chat.id, message_id: this.message_id, ...params });
|
|
264
|
+
}
|
|
265
|
+
/** 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](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. */
|
|
266
|
+
editReplyMarkup(params) {
|
|
267
|
+
return this.api.call("editMessageReplyMarkup", { chat_id: this.chat.id, message_id: this.message_id, ...params });
|
|
268
|
+
}
|
|
269
|
+
/** Use this method to stop a poll which was sent by the bot. On success, the stopped [Poll](https://core.telegram.org/bots/api/#poll) is returned. */
|
|
270
|
+
stopPoll(params) {
|
|
271
|
+
return this.api.call("stopPoll", { chat_id: this.chat.id, message_id: this.message_id, ...params });
|
|
272
|
+
}
|
|
273
|
+
/** Use this method to delete a message, including service messages, with the following limitations: \- A message can only be deleted if it was sent less than 48 hours ago. \- Service messages about a supergroup, channel, or forum topic creation can't be deleted. \- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. \- Bots can delete outgoing messages in private chats, groups, and supergroups. \- Bots can delete incoming messages in private chats. \- Bots granted *can\_post\_messages* permissions can delete outgoing messages in channels. \- If the bot is an administrator of a group, it can delete any message there. \- If the bot has *can\_delete\_messages* permission in a supergroup or a channel, it can delete any message there. Returns *True* on success. */
|
|
274
|
+
delete(params) {
|
|
275
|
+
return this.api.call("deleteMessage", { chat_id: this.chat.id, message_id: this.message_id, ...params });
|
|
276
|
+
}
|
|
277
|
+
/** Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns *True* on success. */
|
|
278
|
+
deleteMessages(params) {
|
|
279
|
+
return this.api.call("deleteMessages", { chat_id: this.chat.id, ...params });
|
|
280
|
+
}
|
|
281
|
+
/** Use this method to send static .WEBP, [animated](https://telegram.org/blog/animated-stickers) .TGS, or [video](https://telegram.org/blog/video-stickers-better-reactions) .WEBM stickers. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
282
|
+
sendSticker(params) {
|
|
283
|
+
return this.api.call("sendSticker", { chat_id: this.chat.id, ...params });
|
|
284
|
+
}
|
|
285
|
+
/** Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns *True* on success. */
|
|
286
|
+
sendGift(params) {
|
|
287
|
+
return this.api.call("sendGift", { chat_id: this.chat.id, ...params });
|
|
288
|
+
}
|
|
289
|
+
/** Verifies a chat [on behalf of the organization](https://telegram.org/verify#third-party-verification) which is represented by the bot. Returns *True* on success. */
|
|
290
|
+
verifyChat(params) {
|
|
291
|
+
return this.api.call("verifyChat", { chat_id: this.chat.id, ...params });
|
|
292
|
+
}
|
|
293
|
+
/** Removes verification from a chat that is currently verified [on behalf of the organization](https://telegram.org/verify#third-party-verification) represented by the bot. Returns *True* on success. */
|
|
294
|
+
removeChatVerification(params) {
|
|
295
|
+
return this.api.call("removeChatVerification", { chat_id: this.chat.id, ...params });
|
|
296
|
+
}
|
|
297
|
+
/** Use this method to send invoices. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
298
|
+
sendInvoice(params) {
|
|
299
|
+
return this.api.call("sendInvoice", { chat_id: this.chat.id, ...params });
|
|
300
|
+
}
|
|
301
|
+
/** Use this method to send a game. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
302
|
+
sendGame(params) {
|
|
303
|
+
return this.api.call("sendGame", { chat_id: this.chat.id, ...params });
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
//# sourceMappingURL=message-reaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-reaction.js","sourceRoot":"","sources":["../../src/generated/message-reaction.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,sBAAsB;IACzB,GAAG,CAAM;IACT,MAAM,CAAW;IAC1B,YAAY,GAAQ,EAAE,MAAgB;QACrC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC;IACpD,CAAC;IACD,0CAA0C;IAC1C,IAAI,QAAQ;QACX,OAAO,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;IACtB,CAAC;IACD,kDAAkD;IAClD,IAAI,SAAS;QACZ,OAAO,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC;IAC9B,CAAC;IACD,wCAAwC;IACxC,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACrB,CAAC;IACD,4CAA4C;IAC5C,IAAI,IAAI;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC;IACr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,MAAM,EAAE,CAAC,CAAC;IACnF,CAAC;IACD,2MAA2M;IAC3M,sBAAsB,CAAC,MAAwD;QAC9E,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAU,wBAAwB,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IAC/F,CAAC;IACD,iIAAiI;IACjI,WAAW,CAAC,MAA4C;QACvD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAY,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IACtF,CAAC;IACD,+HAA+H;IAC/H,QAAQ,CAAC,MAAyC;QACjD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAY,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IACnF,CAAC;CACD"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import type { Api } from "@yaebal/core";
|
|
2
|
+
import type * as t from "@yaebal/types";
|
|
3
|
+
export interface MessageContextBase extends t.Message {
|
|
4
|
+
}
|
|
5
|
+
export declare class MessageContextBase {
|
|
6
|
+
readonly api: Api;
|
|
7
|
+
readonly update: t.Update;
|
|
8
|
+
constructor(api: Api, update: t.Update);
|
|
9
|
+
/** Id of the user this update is from. */
|
|
10
|
+
get senderId(): number | undefined;
|
|
11
|
+
/** First name of the user this update is from. */
|
|
12
|
+
get firstName(): string | undefined;
|
|
13
|
+
/** Id of the chat this update is in. */
|
|
14
|
+
get chatId(): number;
|
|
15
|
+
/** Whether this is a private (1:1) chat. */
|
|
16
|
+
get isPM(): boolean;
|
|
17
|
+
/** Whether this is a group or supergroup. */
|
|
18
|
+
get isGroup(): boolean;
|
|
19
|
+
/** Camel-case alias for `message_id`. */
|
|
20
|
+
get messageId(): number;
|
|
21
|
+
/** Reply to this message. */
|
|
22
|
+
reply(params: Omit<t.SendMessageParams, "chat_id">): Promise<t.Message>;
|
|
23
|
+
/** Use this method to send text messages. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
24
|
+
send(params: Omit<t.SendMessageParams, "chat_id">): Promise<t.Message>;
|
|
25
|
+
/** Use this method to send photos. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
26
|
+
sendPhoto(params: Omit<t.SendPhotoParams, "chat_id">): Promise<t.Message>;
|
|
27
|
+
/** 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](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. For sending voice messages, use the [sendVoice](https://core.telegram.org/bots/api/#sendvoice) method instead. */
|
|
28
|
+
sendAudio(params: Omit<t.SendAudioParams, "chat_id">): Promise<t.Message>;
|
|
29
|
+
/** Use this method to send general files. On success, the sent [Message](https://core.telegram.org/bots/api/#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. */
|
|
30
|
+
sendDocument(params: Omit<t.SendDocumentParams, "chat_id">): Promise<t.Message>;
|
|
31
|
+
/** Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as [Document](https://core.telegram.org/bots/api/#document)). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. */
|
|
32
|
+
sendVideo(params: Omit<t.SendVideoParams, "chat_id">): Promise<t.Message>;
|
|
33
|
+
/** Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. */
|
|
34
|
+
sendAnimation(params: Omit<t.SendAnimationParams, "chat_id">): Promise<t.Message>;
|
|
35
|
+
/** 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, or in .MP3 format, or in .M4A format (other formats may be sent as [Audio](https://core.telegram.org/bots/api/#audio) or [Document](https://core.telegram.org/bots/api/#document)). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. */
|
|
36
|
+
sendVoice(params: Omit<t.SendVoiceParams, "chat_id">): Promise<t.Message>;
|
|
37
|
+
/** As of [v.4.0](https://telegram.org/blog/video-messages-and-telescope), Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
38
|
+
sendVideoNote(params: Omit<t.SendVideoNoteParams, "chat_id">): Promise<t.Message>;
|
|
39
|
+
/** Use this method to send paid media. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
40
|
+
sendPaidMedia(params: Omit<t.SendPaidMediaParams, "chat_id">): Promise<t.Message>;
|
|
41
|
+
/** 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](https://core.telegram.org/bots/api/#message) that were sent is returned. */
|
|
42
|
+
sendMediaGroup(params: Omit<t.SendMediaGroupParams, "chat_id">): Promise<t.Message[]>;
|
|
43
|
+
/** Use this method to send point on the map. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
44
|
+
sendLocation(params: Omit<t.SendLocationParams, "chat_id">): Promise<t.Message>;
|
|
45
|
+
/** Use this method to send information about a venue. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
46
|
+
sendVenue(params: Omit<t.SendVenueParams, "chat_id">): Promise<t.Message>;
|
|
47
|
+
/** Use this method to send phone contacts. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
48
|
+
sendContact(params: Omit<t.SendContactParams, "chat_id">): Promise<t.Message>;
|
|
49
|
+
/** Use this method to send a native poll. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
50
|
+
sendPoll(params: Omit<t.SendPollParams, "chat_id">): Promise<t.Message>;
|
|
51
|
+
/** Use this method to send an animated emoji that will display a random value. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
52
|
+
sendDice(params: Omit<t.SendDiceParams, "chat_id">): Promise<t.Message>;
|
|
53
|
+
/** 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. Example: The [ImageBot](https://t.me/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](https://core.telegram.org/bots/api/#sendchataction) with *action* = *upload\_photo*. The user will see a “sending photo” status for the bot. We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. */
|
|
54
|
+
sendChatAction(params: Omit<t.SendChatActionParams, "chat_id">): Promise<boolean>;
|
|
55
|
+
/** Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns *True* on success. */
|
|
56
|
+
react(params: Omit<t.SetMessageReactionParams, "chat_id" | "message_id">): Promise<boolean>;
|
|
57
|
+
/** Use this method to get a list of profile pictures for a user. Returns a [UserProfilePhotos](https://core.telegram.org/bots/api/#userprofilephotos) object. */
|
|
58
|
+
getUserProfilePhotos(params: Omit<t.GetUserProfilePhotosParams, "user_id">): Promise<t.UserProfilePhotos>;
|
|
59
|
+
/** Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method [requestEmojiStatusAccess](https://core.telegram.org/bots/webapps#initializing-mini-apps). Returns *True* on success. */
|
|
60
|
+
setUserEmojiStatus(params: Omit<t.SetUserEmojiStatusParams, "user_id">): Promise<boolean>;
|
|
61
|
+
/** 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](https://core.telegram.org/bots/api/#unbanchatmember) 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. */
|
|
62
|
+
banChatMember(params: Omit<t.BanChatMemberParams, "chat_id" | "user_id">): Promise<boolean>;
|
|
63
|
+
/** 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. */
|
|
64
|
+
unbanChatMember(params: Omit<t.UnbanChatMemberParams, "chat_id" | "user_id">): Promise<boolean>;
|
|
65
|
+
/** 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. */
|
|
66
|
+
restrictChatMember(params: Omit<t.RestrictChatMemberParams, "chat_id" | "user_id">): Promise<boolean>;
|
|
67
|
+
/** 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. */
|
|
68
|
+
promoteChatMember(params: Omit<t.PromoteChatMemberParams, "chat_id" | "user_id">): Promise<boolean>;
|
|
69
|
+
/** Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns *True* on success. */
|
|
70
|
+
setChatAdministratorCustomTitle(params: Omit<t.SetChatAdministratorCustomTitleParams, "chat_id" | "user_id">): Promise<boolean>;
|
|
71
|
+
/** Use this method to ban a channel chat in a supergroup or a channel. Until the chat is [unbanned](https://core.telegram.org/bots/api/#unbanchatsenderchat), 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. */
|
|
72
|
+
banChatSenderChat(params: Omit<t.BanChatSenderChatParams, "chat_id">): Promise<boolean>;
|
|
73
|
+
/** 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. */
|
|
74
|
+
unbanChatSenderChat(params: Omit<t.UnbanChatSenderChatParams, "chat_id">): Promise<boolean>;
|
|
75
|
+
/** 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. */
|
|
76
|
+
setChatPermissions(params: Omit<t.SetChatPermissionsParams, "chat_id">): Promise<boolean>;
|
|
77
|
+
/** 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. */
|
|
78
|
+
exportChatInviteLink(params?: Omit<t.ExportChatInviteLinkParams, "chat_id">): Promise<string>;
|
|
79
|
+
/** 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](https://core.telegram.org/bots/api/#revokechatinvitelink). Returns the new invite link as [ChatInviteLink](https://core.telegram.org/bots/api/#chatinvitelink) object. */
|
|
80
|
+
createChatInviteLink(params: Omit<t.CreateChatInviteLinkParams, "chat_id">): Promise<t.ChatInviteLink>;
|
|
81
|
+
/** 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](https://core.telegram.org/bots/api/#chatinvitelink) object. */
|
|
82
|
+
editChatInviteLink(params: Omit<t.EditChatInviteLinkParams, "chat_id">): Promise<t.ChatInviteLink>;
|
|
83
|
+
/** Use this method to create a [subscription invite link](https://telegram.org/blog/superchannels-star-reactions-subscriptions#star-subscriptions) for a channel chat. The bot must have the *can\_invite\_users* administrator rights. The link can be edited using the method [editChatSubscriptionInviteLink](https://core.telegram.org/bots/api/#editchatsubscriptioninvitelink) or revoked using the method [revokeChatInviteLink](https://core.telegram.org/bots/api/#revokechatinvitelink). Returns the new invite link as a [ChatInviteLink](https://core.telegram.org/bots/api/#chatinvitelink) object. */
|
|
84
|
+
createChatSubscriptionInviteLink(params: Omit<t.CreateChatSubscriptionInviteLinkParams, "chat_id">): Promise<t.ChatInviteLink>;
|
|
85
|
+
/** Use this method to edit a subscription invite link created by the bot. The bot must have the *can\_invite\_users* administrator rights. Returns the edited invite link as a [ChatInviteLink](https://core.telegram.org/bots/api/#chatinvitelink) object. */
|
|
86
|
+
editChatSubscriptionInviteLink(params: Omit<t.EditChatSubscriptionInviteLinkParams, "chat_id">): Promise<t.ChatInviteLink>;
|
|
87
|
+
/** 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](https://core.telegram.org/bots/api/#chatinvitelink) object. */
|
|
88
|
+
revokeChatInviteLink(params: Omit<t.RevokeChatInviteLinkParams, "chat_id">): Promise<t.ChatInviteLink>;
|
|
89
|
+
/** 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. */
|
|
90
|
+
approveChatJoinRequest(params?: Omit<t.ApproveChatJoinRequestParams, "chat_id" | "user_id">): Promise<boolean>;
|
|
91
|
+
/** 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. */
|
|
92
|
+
declineChatJoinRequest(params?: Omit<t.DeclineChatJoinRequestParams, "chat_id" | "user_id">): Promise<boolean>;
|
|
93
|
+
/** 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. */
|
|
94
|
+
setChatPhoto(params: Omit<t.SetChatPhotoParams, "chat_id">): Promise<boolean>;
|
|
95
|
+
/** 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. */
|
|
96
|
+
deleteChatPhoto(params?: Omit<t.DeleteChatPhotoParams, "chat_id">): Promise<boolean>;
|
|
97
|
+
/** 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. */
|
|
98
|
+
setChatTitle(params: Omit<t.SetChatTitleParams, "chat_id">): Promise<boolean>;
|
|
99
|
+
/** 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. */
|
|
100
|
+
setChatDescription(params: Omit<t.SetChatDescriptionParams, "chat_id">): Promise<boolean>;
|
|
101
|
+
/** 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. */
|
|
102
|
+
pin(params: Omit<t.PinChatMessageParams, "chat_id" | "message_id">): Promise<boolean>;
|
|
103
|
+
/** 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. */
|
|
104
|
+
unpin(params: Omit<t.UnpinChatMessageParams, "chat_id" | "message_id">): Promise<boolean>;
|
|
105
|
+
/** 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. */
|
|
106
|
+
unpinAllChatMessages(params?: Omit<t.UnpinAllChatMessagesParams, "chat_id">): Promise<boolean>;
|
|
107
|
+
/** Use this method for your bot to leave a group, supergroup or channel. Returns *True* on success. */
|
|
108
|
+
leaveChat(params?: Omit<t.LeaveChatParams, "chat_id">): Promise<boolean>;
|
|
109
|
+
/** Use this method to get up-to-date information about the chat. Returns a [ChatFullInfo](https://core.telegram.org/bots/api/#chatfullinfo) object on success. */
|
|
110
|
+
getChat(params?: Omit<t.GetChatParams, "chat_id">): Promise<t.ChatFullInfo>;
|
|
111
|
+
/** Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of [ChatMember](https://core.telegram.org/bots/api/#chatmember) objects. */
|
|
112
|
+
getChatAdministrators(params?: Omit<t.GetChatAdministratorsParams, "chat_id">): Promise<t.ChatMember[]>;
|
|
113
|
+
/** Use this method to get the number of members in a chat. Returns *Int* on success. */
|
|
114
|
+
getChatMemberCount(params?: Omit<t.GetChatMemberCountParams, "chat_id">): Promise<number>;
|
|
115
|
+
/** Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a [ChatMember](https://core.telegram.org/bots/api/#chatmember) object on success. */
|
|
116
|
+
getChatMember(params?: Omit<t.GetChatMemberParams, "chat_id" | "user_id">): Promise<t.ChatMember>;
|
|
117
|
+
/** 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](https://core.telegram.org/bots/api/#getchat) requests to check if the bot can use this method. Returns *True* on success. */
|
|
118
|
+
setChatStickerSet(params: Omit<t.SetChatStickerSetParams, "chat_id">): Promise<boolean>;
|
|
119
|
+
/** 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](https://core.telegram.org/bots/api/#getchat) requests to check if the bot can use this method. Returns *True* on success. */
|
|
120
|
+
deleteChatStickerSet(params?: Omit<t.DeleteChatStickerSetParams, "chat_id">): Promise<boolean>;
|
|
121
|
+
/** 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](https://core.telegram.org/bots/api/#forumtopic) object. */
|
|
122
|
+
createForumTopic(params: Omit<t.CreateForumTopicParams, "chat_id">): Promise<t.ForumTopic>;
|
|
123
|
+
/** 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 the *can\_manage\_topics* administrator rights, unless it is the creator of the topic. Returns *True* on success. */
|
|
124
|
+
editForumTopic(params: Omit<t.EditForumTopicParams, "chat_id">): Promise<boolean>;
|
|
125
|
+
/** 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. */
|
|
126
|
+
closeForumTopic(params: Omit<t.CloseForumTopicParams, "chat_id">): Promise<boolean>;
|
|
127
|
+
/** 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. */
|
|
128
|
+
reopenForumTopic(params: Omit<t.ReopenForumTopicParams, "chat_id">): Promise<boolean>;
|
|
129
|
+
/** 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. */
|
|
130
|
+
deleteForumTopic(params: Omit<t.DeleteForumTopicParams, "chat_id">): Promise<boolean>;
|
|
131
|
+
/** 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. */
|
|
132
|
+
unpinAllForumTopicMessages(params: Omit<t.UnpinAllForumTopicMessagesParams, "chat_id">): Promise<boolean>;
|
|
133
|
+
/** 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 the *can\_manage\_topics* administrator rights. Returns *True* on success. */
|
|
134
|
+
editGeneralForumTopic(params: Omit<t.EditGeneralForumTopicParams, "chat_id">): Promise<boolean>;
|
|
135
|
+
/** 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. */
|
|
136
|
+
closeGeneralForumTopic(params?: Omit<t.CloseGeneralForumTopicParams, "chat_id">): Promise<boolean>;
|
|
137
|
+
/** 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. */
|
|
138
|
+
reopenGeneralForumTopic(params?: Omit<t.ReopenGeneralForumTopicParams, "chat_id">): Promise<boolean>;
|
|
139
|
+
/** 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. */
|
|
140
|
+
hideGeneralForumTopic(params?: Omit<t.HideGeneralForumTopicParams, "chat_id">): Promise<boolean>;
|
|
141
|
+
/** 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. */
|
|
142
|
+
unhideGeneralForumTopic(params?: Omit<t.UnhideGeneralForumTopicParams, "chat_id">): Promise<boolean>;
|
|
143
|
+
/** Use this method to clear the list of pinned messages in a General 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. */
|
|
144
|
+
unpinAllGeneralForumTopicMessages(params?: Omit<t.UnpinAllGeneralForumTopicMessagesParams, "chat_id">): Promise<boolean>;
|
|
145
|
+
/** Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a [UserChatBoosts](https://core.telegram.org/bots/api/#userchatboosts) object. */
|
|
146
|
+
getUserChatBoosts(params?: Omit<t.GetUserChatBoostsParams, "chat_id" | "user_id">): Promise<t.UserChatBoosts>;
|
|
147
|
+
/** Use this method to change the bot's menu button in a private chat, or the default menu button. Returns *True* on success. */
|
|
148
|
+
setChatMenuButton(params: Omit<t.SetChatMenuButtonParams, "chat_id">): Promise<boolean>;
|
|
149
|
+
/** 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](https://core.telegram.org/bots/api/#menubutton) on success. */
|
|
150
|
+
getChatMenuButton(params?: Omit<t.GetChatMenuButtonParams, "chat_id">): Promise<t.MenuButton>;
|
|
151
|
+
/** Use this method to edit text and [game](https://core.telegram.org/bots/api/#games) messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. */
|
|
152
|
+
editText(params: Omit<t.EditMessageTextParams, "chat_id" | "message_id">): Promise<boolean | t.Message>;
|
|
153
|
+
/** Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. */
|
|
154
|
+
editCaption(params: Omit<t.EditMessageCaptionParams, "chat_id" | "message_id">): Promise<boolean | t.Message>;
|
|
155
|
+
/** Use this method to edit animation, audio, document, photo, or video messages, or to add media to text 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](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. */
|
|
156
|
+
editMedia(params: Omit<t.EditMessageMediaParams, "chat_id" | "message_id">): Promise<boolean | t.Message>;
|
|
157
|
+
/** 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](https://core.telegram.org/bots/api/#stopmessagelivelocation). On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. */
|
|
158
|
+
editLiveLocation(params: Omit<t.EditMessageLiveLocationParams, "chat_id" | "message_id">): Promise<boolean | t.Message>;
|
|
159
|
+
/** 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](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. */
|
|
160
|
+
stopMessageLiveLocation(params: Omit<t.StopMessageLiveLocationParams, "chat_id" | "message_id">): Promise<boolean | t.Message>;
|
|
161
|
+
/** 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](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. */
|
|
162
|
+
editReplyMarkup(params: Omit<t.EditMessageReplyMarkupParams, "chat_id" | "message_id">): Promise<boolean | t.Message>;
|
|
163
|
+
/** Use this method to stop a poll which was sent by the bot. On success, the stopped [Poll](https://core.telegram.org/bots/api/#poll) is returned. */
|
|
164
|
+
stopPoll(params: Omit<t.StopPollParams, "chat_id" | "message_id">): Promise<t.Poll>;
|
|
165
|
+
/** Use this method to delete a message, including service messages, with the following limitations: \- A message can only be deleted if it was sent less than 48 hours ago. \- Service messages about a supergroup, channel, or forum topic creation can't be deleted. \- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. \- Bots can delete outgoing messages in private chats, groups, and supergroups. \- Bots can delete incoming messages in private chats. \- Bots granted *can\_post\_messages* permissions can delete outgoing messages in channels. \- If the bot is an administrator of a group, it can delete any message there. \- If the bot has *can\_delete\_messages* permission in a supergroup or a channel, it can delete any message there. Returns *True* on success. */
|
|
166
|
+
delete(params?: Omit<t.DeleteMessageParams, "chat_id" | "message_id">): Promise<boolean>;
|
|
167
|
+
/** Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns *True* on success. */
|
|
168
|
+
deleteMessages(params: Omit<t.DeleteMessagesParams, "chat_id">): Promise<boolean>;
|
|
169
|
+
/** Use this method to send static .WEBP, [animated](https://telegram.org/blog/animated-stickers) .TGS, or [video](https://telegram.org/blog/video-stickers-better-reactions) .WEBM stickers. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
170
|
+
sendSticker(params: Omit<t.SendStickerParams, "chat_id">): Promise<t.Message>;
|
|
171
|
+
/** Use this method to upload a file with a sticker for later use in the [createNewStickerSet](https://core.telegram.org/bots/api/#createnewstickerset), [addStickerToSet](https://core.telegram.org/bots/api/#addstickertoset), or [replaceStickerInSet](https://core.telegram.org/bots/api/#replacestickerinset) methods (the file can be used multiple times). Returns the uploaded [File](https://core.telegram.org/bots/api/#file) on success. */
|
|
172
|
+
uploadStickerFile(params: Omit<t.UploadStickerFileParams, "user_id">): Promise<t.File>;
|
|
173
|
+
/** Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns *True* on success. */
|
|
174
|
+
createNewStickerSet(params: Omit<t.CreateNewStickerSetParams, "user_id">): Promise<boolean>;
|
|
175
|
+
/** Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns *True* on success. */
|
|
176
|
+
addStickerToSet(params: Omit<t.AddStickerToSetParams, "user_id">): Promise<boolean>;
|
|
177
|
+
/** Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling [deleteStickerFromSet](https://core.telegram.org/bots/api/#deletestickerfromset), then [addStickerToSet](https://core.telegram.org/bots/api/#addstickertoset), then [setStickerPositionInSet](https://core.telegram.org/bots/api/#setstickerpositioninset). Returns *True* on success. */
|
|
178
|
+
replaceStickerInSet(params: Omit<t.ReplaceStickerInSetParams, "user_id">): Promise<boolean>;
|
|
179
|
+
/** Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns *True* on success. */
|
|
180
|
+
setStickerSetThumbnail(params: Omit<t.SetStickerSetThumbnailParams, "user_id">): Promise<boolean>;
|
|
181
|
+
/** Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns *True* on success. */
|
|
182
|
+
sendGift(params: Omit<t.SendGiftParams, "user_id" | "chat_id">): Promise<boolean>;
|
|
183
|
+
/** Verifies a user [on behalf of the organization](https://telegram.org/verify#third-party-verification) which is represented by the bot. Returns *True* on success. */
|
|
184
|
+
verifyUser(params: Omit<t.VerifyUserParams, "user_id">): Promise<boolean>;
|
|
185
|
+
/** Verifies a chat [on behalf of the organization](https://telegram.org/verify#third-party-verification) which is represented by the bot. Returns *True* on success. */
|
|
186
|
+
verifyChat(params: Omit<t.VerifyChatParams, "chat_id">): Promise<boolean>;
|
|
187
|
+
/** Removes verification from a user who is currently verified [on behalf of the organization](https://telegram.org/verify#third-party-verification) represented by the bot. Returns *True* on success. */
|
|
188
|
+
removeUserVerification(params?: Omit<t.RemoveUserVerificationParams, "user_id">): Promise<boolean>;
|
|
189
|
+
/** Removes verification from a chat that is currently verified [on behalf of the organization](https://telegram.org/verify#third-party-verification) represented by the bot. Returns *True* on success. */
|
|
190
|
+
removeChatVerification(params?: Omit<t.RemoveChatVerificationParams, "chat_id">): Promise<boolean>;
|
|
191
|
+
/** Stores a message that can be sent by a user of a Mini App. Returns a [PreparedInlineMessage](https://core.telegram.org/bots/api/#preparedinlinemessage) object. */
|
|
192
|
+
savePreparedInlineMessage(params: Omit<t.SavePreparedInlineMessageParams, "user_id">): Promise<t.PreparedInlineMessage>;
|
|
193
|
+
/** Use this method to send invoices. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
194
|
+
sendInvoice(params: Omit<t.SendInvoiceParams, "chat_id">): Promise<t.Message>;
|
|
195
|
+
/** Refunds a successful payment in [Telegram Stars](https://t.me/BotNews/90). Returns *True* on success. */
|
|
196
|
+
refundStarPayment(params: Omit<t.RefundStarPaymentParams, "user_id">): Promise<boolean>;
|
|
197
|
+
/** Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns *True* on success. */
|
|
198
|
+
editUserStarSubscription(params: Omit<t.EditUserStarSubscriptionParams, "user_id">): Promise<boolean>;
|
|
199
|
+
/** Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns *True* on success. Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. */
|
|
200
|
+
setPassportDataErrors(params: Omit<t.SetPassportDataErrorsParams, "user_id">): Promise<boolean>;
|
|
201
|
+
/** Use this method to send a game. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. */
|
|
202
|
+
sendGame(params: Omit<t.SendGameParams, "chat_id">): Promise<t.Message>;
|
|
203
|
+
/** Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned. Returns an error, if the new score is not greater than the user's current score in the chat and *force* is *False*. */
|
|
204
|
+
setGameScore(params: Omit<t.SetGameScoreParams, "user_id" | "chat_id" | "message_id">): Promise<boolean | t.Message>;
|
|
205
|
+
/** Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of [GameHighScore](https://core.telegram.org/bots/api/#gamehighscore) objects. This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change. */
|
|
206
|
+
getGameHighScores(params: Omit<t.GetGameHighScoresParams, "user_id" | "chat_id" | "message_id">): Promise<t.GameHighScore[]>;
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=message.d.ts.map
|