@grom.js/effect-tg 0.4.0 → 0.5.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.
Files changed (122) hide show
  1. package/dist/Bot.d.ts +5 -1
  2. package/dist/Bot.d.ts.map +1 -1
  3. package/dist/Bot.js +2 -0
  4. package/dist/Bot.js.map +1 -0
  5. package/dist/BotApi.d.ts +12 -3
  6. package/dist/BotApi.d.ts.map +1 -1
  7. package/dist/BotApi.js +7 -2
  8. package/dist/BotApi.js.map +1 -0
  9. package/dist/BotApiTransport.d.ts +11 -10
  10. package/dist/BotApiTransport.d.ts.map +1 -1
  11. package/dist/BotApiTransport.js +6 -8
  12. package/dist/BotApiTransport.js.map +1 -0
  13. package/dist/BotApiUrl.d.ts +14 -0
  14. package/dist/BotApiUrl.d.ts.map +1 -0
  15. package/dist/BotApiUrl.js +13 -0
  16. package/dist/BotApiUrl.js.map +1 -0
  17. package/dist/Content.d.ts +288 -16
  18. package/dist/Content.d.ts.map +1 -1
  19. package/dist/Content.js +189 -28
  20. package/dist/Content.js.map +1 -0
  21. package/dist/Dialog.d.ts +61 -0
  22. package/dist/Dialog.d.ts.map +1 -0
  23. package/dist/Dialog.js +35 -0
  24. package/dist/Dialog.js.map +1 -0
  25. package/dist/File.d.ts +23 -0
  26. package/dist/File.d.ts.map +1 -0
  27. package/dist/File.js +24 -0
  28. package/dist/File.js.map +1 -0
  29. package/dist/LinkPreview.d.ts +2 -2
  30. package/dist/LinkPreview.d.ts.map +1 -1
  31. package/dist/LinkPreview.js +17 -16
  32. package/dist/LinkPreview.js.map +1 -0
  33. package/dist/Markup.d.ts +41 -0
  34. package/dist/Markup.d.ts.map +1 -0
  35. package/dist/Markup.js +10 -0
  36. package/dist/Markup.js.map +1 -0
  37. package/dist/Runner.d.ts +3 -3
  38. package/dist/Runner.d.ts.map +1 -1
  39. package/dist/Runner.js +1 -0
  40. package/dist/Runner.js.map +1 -0
  41. package/dist/Send.d.ts +177 -13
  42. package/dist/Send.d.ts.map +1 -1
  43. package/dist/Send.js +187 -18
  44. package/dist/Send.js.map +1 -0
  45. package/dist/Text.d.ts +21 -11
  46. package/dist/Text.d.ts.map +1 -1
  47. package/dist/Text.js +10 -17
  48. package/dist/Text.js.map +1 -0
  49. package/dist/index.d.ts +4 -4
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +5 -4
  52. package/dist/index.js.map +1 -0
  53. package/dist/internal/botApi.d.ts +3 -4
  54. package/dist/internal/botApi.d.ts.map +1 -1
  55. package/dist/internal/botApi.js +18 -22
  56. package/dist/internal/botApi.js.map +1 -0
  57. package/dist/internal/botApiMethods.gen.d.ts +19 -19
  58. package/dist/internal/botApiMethods.gen.d.ts.map +1 -1
  59. package/dist/internal/botApiMethods.gen.js +1 -0
  60. package/dist/internal/botApiMethods.gen.js.map +1 -0
  61. package/dist/internal/botApiShape.gen.d.ts +159 -159
  62. package/dist/internal/botApiShape.gen.d.ts.map +1 -1
  63. package/dist/internal/botApiShape.gen.js +1 -0
  64. package/dist/internal/botApiShape.gen.js.map +1 -0
  65. package/dist/internal/botApiTransport.d.ts +4 -6
  66. package/dist/internal/botApiTransport.d.ts.map +1 -1
  67. package/dist/internal/botApiTransport.js +89 -17
  68. package/dist/internal/botApiTransport.js.map +1 -0
  69. package/dist/internal/botApiTypes.gen.js +1 -0
  70. package/dist/internal/botApiTypes.gen.js.map +1 -0
  71. package/dist/internal/dialog.d.ts +12 -0
  72. package/dist/internal/dialog.d.ts.map +1 -0
  73. package/dist/internal/dialog.js +19 -0
  74. package/dist/internal/dialog.js.map +1 -0
  75. package/dist/internal/runner.d.ts +1 -1
  76. package/dist/internal/runner.d.ts.map +1 -1
  77. package/dist/internal/runner.js +8 -4
  78. package/dist/internal/runner.js.map +1 -0
  79. package/dist/internal/send.d.ts +13 -0
  80. package/dist/internal/send.d.ts.map +1 -0
  81. package/dist/internal/send.js +220 -0
  82. package/dist/internal/send.js.map +1 -0
  83. package/package.json +13 -10
  84. package/src/Bot.ts +16 -0
  85. package/src/BotApi.ts +68 -0
  86. package/src/BotApiTransport.ts +55 -0
  87. package/src/BotApiUrl.ts +28 -0
  88. package/src/Content.ts +410 -0
  89. package/src/Dialog.ts +54 -0
  90. package/src/File.ts +45 -0
  91. package/src/LinkPreview.ts +26 -0
  92. package/src/Markup.ts +33 -0
  93. package/src/Runner.ts +22 -0
  94. package/src/Send.ts +330 -0
  95. package/src/Text.ts +42 -0
  96. package/src/index.ts +12 -0
  97. package/src/internal/botApi.ts +31 -0
  98. package/src/internal/botApiMethods.gen.ts +2027 -0
  99. package/src/internal/botApiShape.gen.ts +398 -0
  100. package/src/internal/botApiTransport.ts +118 -0
  101. package/src/internal/botApiTypes.gen.ts +4178 -0
  102. package/src/internal/dialog.ts +33 -0
  103. package/src/internal/runner.ts +57 -0
  104. package/src/internal/send.ts +318 -0
  105. package/dist/BotApiWebhook.d.ts +0 -41
  106. package/dist/BotApiWebhook.d.ts.map +0 -1
  107. package/dist/BotApiWebhook.js +0 -43
  108. package/dist/Chat.d.ts +0 -96
  109. package/dist/Chat.d.ts.map +0 -1
  110. package/dist/Chat.js +0 -48
  111. package/dist/InputFile.d.ts +0 -4
  112. package/dist/InputFile.d.ts.map +0 -1
  113. package/dist/InputFile.js +0 -3
  114. package/dist/Middleware.d.ts +0 -6
  115. package/dist/Middleware.d.ts.map +0 -1
  116. package/dist/Middleware.js +0 -1
  117. package/dist/internal/botApiMethod.d.ts +0 -8
  118. package/dist/internal/botApiMethod.d.ts.map +0 -1
  119. package/dist/internal/botApiMethod.js +0 -1
  120. package/dist/internal/chat.d.ts +0 -14
  121. package/dist/internal/chat.d.ts.map +0 -1
  122. package/dist/internal/chat.js +0 -20
@@ -1,4 +1,4 @@
1
- import type { BotApiMethod } from './botApiMethod.ts';
1
+ import type * as BotApi from '../BotApi.ts';
2
2
  export interface BotApiShape {
3
3
  /**
4
4
  * Use this method to receive incoming updates using long polling ([wiki](https://en.wikipedia.org/wiki/Push_technology#Long_polling)). Returns an Array of [Update](https://core.telegram.org/bots/api#update) objects.
@@ -9,7 +9,7 @@ export interface BotApiShape {
9
9
  * >
10
10
  * > **2.** In order to avoid getting duplicate updates, recalculate _offset_ after each server response.
11
11
  */
12
- getUpdates: BotApiMethod<'getUpdates'>;
12
+ getUpdates: BotApi.Method<'getUpdates'>;
13
13
  /**
14
14
  * Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized [Update](https://core.telegram.org/bots/api#update). In case of an unsuccessful request (a request with response [HTTP status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) different from `2XY`), we will repeat the request and give up after a reasonable amount of attempts. Returns _True_ on success.
15
15
  *
@@ -25,61 +25,61 @@ export interface BotApiShape {
25
25
  * >
26
26
  * > If you're having any trouble setting up webhooks, please check out this [amazing guide to webhooks](https://core.telegram.org/bots/webhooks).
27
27
  */
28
- setWebhook: BotApiMethod<'setWebhook'>;
28
+ setWebhook: BotApi.Method<'setWebhook'>;
29
29
  /** Use this method to remove webhook integration if you decide to switch back to [getUpdates](https://core.telegram.org/bots/api#getupdates). Returns _True_ on success. */
30
- deleteWebhook: BotApiMethod<'deleteWebhook'>;
30
+ deleteWebhook: BotApi.Method<'deleteWebhook'>;
31
31
  /** Use this method to get current webhook status. Requires no parameters. On success, returns a [WebhookInfo](https://core.telegram.org/bots/api#webhookinfo) object. If the bot is using [getUpdates](https://core.telegram.org/bots/api#getupdates), will return an object with the _url_ field empty. */
32
- getWebhookInfo: BotApiMethod<'getWebhookInfo'>;
32
+ getWebhookInfo: BotApi.Method<'getWebhookInfo'>;
33
33
  /** A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a [User](https://core.telegram.org/bots/api#user) object. */
34
- getMe: BotApiMethod<'getMe'>;
34
+ getMe: BotApi.Method<'getMe'>;
35
35
  /** 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. */
36
- logOut: BotApiMethod<'logOut'>;
36
+ logOut: BotApi.Method<'logOut'>;
37
37
  /** 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. */
38
- close: BotApiMethod<'close'>;
38
+ close: BotApi.Method<'close'>;
39
39
  /** Use this method to send text messages. On success, the sent [Message](https://core.telegram.org/bots/api#message) is returned. */
40
- sendMessage: BotApiMethod<'sendMessage'>;
40
+ sendMessage: BotApi.Method<'sendMessage'>;
41
41
  /** Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent [Message](https://core.telegram.org/bots/api#message) is returned. */
42
- forwardMessage: BotApiMethod<'forwardMessage'>;
42
+ forwardMessage: BotApi.Method<'forwardMessage'>;
43
43
  /** Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of [MessageId](https://core.telegram.org/bots/api#messageid) of the sent messages is returned. */
44
- forwardMessages: BotApiMethod<'forwardMessages'>;
44
+ forwardMessages: BotApi.Method<'forwardMessages'>;
45
45
  /** Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz [poll](https://core.telegram.org/bots/api#poll) can be copied only if the value of the field _correct\_option\_id_ is known to the bot. The method is analogous to the method [forwardMessage](https://core.telegram.org/bots/api#forwardmessage), but the copied message doesn't have a link to the original message. Returns the [MessageId](https://core.telegram.org/bots/api#messageid) of the sent message on success. */
46
- copyMessage: BotApiMethod<'copyMessage'>;
46
+ copyMessage: BotApi.Method<'copyMessage'>;
47
47
  /** Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz [poll](https://core.telegram.org/bots/api#poll) can be copied only if the value of the field _correct\_option\_id_ is known to the bot. The method is analogous to the method [forwardMessages](https://core.telegram.org/bots/api#forwardmessages), but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of [MessageId](https://core.telegram.org/bots/api#messageid) of the sent messages is returned. */
48
- copyMessages: BotApiMethod<'copyMessages'>;
48
+ copyMessages: BotApi.Method<'copyMessages'>;
49
49
  /** Use this method to send photos. On success, the sent [Message](https://core.telegram.org/bots/api#message) is returned. */
50
- sendPhoto: BotApiMethod<'sendPhoto'>;
50
+ sendPhoto: BotApi.Method<'sendPhoto'>;
51
51
  /**
52
52
  * 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.
53
53
  *
54
54
  * For sending voice messages, use the [sendVoice](https://core.telegram.org/bots/api#sendvoice) method instead.
55
55
  */
56
- sendAudio: BotApiMethod<'sendAudio'>;
56
+ sendAudio: BotApi.Method<'sendAudio'>;
57
57
  /** 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. */
58
- sendDocument: BotApiMethod<'sendDocument'>;
58
+ sendDocument: BotApi.Method<'sendDocument'>;
59
59
  /** 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. */
60
- sendVideo: BotApiMethod<'sendVideo'>;
60
+ sendVideo: BotApi.Method<'sendVideo'>;
61
61
  /** 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. */
62
- sendAnimation: BotApiMethod<'sendAnimation'>;
62
+ sendAnimation: BotApi.Method<'sendAnimation'>;
63
63
  /** 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. */
64
- sendVoice: BotApiMethod<'sendVoice'>;
64
+ sendVoice: BotApi.Method<'sendVoice'>;
65
65
  /** 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. */
66
- sendVideoNote: BotApiMethod<'sendVideoNote'>;
66
+ sendVideoNote: BotApi.Method<'sendVideoNote'>;
67
67
  /** Use this method to send paid media. On success, the sent [Message](https://core.telegram.org/bots/api#message) is returned. */
68
- sendPaidMedia: BotApiMethod<'sendPaidMedia'>;
68
+ sendPaidMedia: BotApi.Method<'sendPaidMedia'>;
69
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 [Message](https://core.telegram.org/bots/api#message) objects that were sent is returned. */
70
- sendMediaGroup: BotApiMethod<'sendMediaGroup'>;
70
+ sendMediaGroup: BotApi.Method<'sendMediaGroup'>;
71
71
  /** Use this method to send point on the map. On success, the sent [Message](https://core.telegram.org/bots/api#message) is returned. */
72
- sendLocation: BotApiMethod<'sendLocation'>;
72
+ sendLocation: BotApi.Method<'sendLocation'>;
73
73
  /** Use this method to send information about a venue. On success, the sent [Message](https://core.telegram.org/bots/api#message) is returned. */
74
- sendVenue: BotApiMethod<'sendVenue'>;
74
+ sendVenue: BotApi.Method<'sendVenue'>;
75
75
  /** Use this method to send phone contacts. On success, the sent [Message](https://core.telegram.org/bots/api#message) is returned. */
76
- sendContact: BotApiMethod<'sendContact'>;
76
+ sendContact: BotApi.Method<'sendContact'>;
77
77
  /** Use this method to send a native poll. On success, the sent [Message](https://core.telegram.org/bots/api#message) is returned. */
78
- sendPoll: BotApiMethod<'sendPoll'>;
78
+ sendPoll: BotApi.Method<'sendPoll'>;
79
79
  /** Use this method to send a checklist on behalf of a connected business account. On success, the sent [Message](https://core.telegram.org/bots/api#message) is returned. */
80
- sendChecklist: BotApiMethod<'sendChecklist'>;
80
+ sendChecklist: BotApi.Method<'sendChecklist'>;
81
81
  /** 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. */
82
- sendDice: BotApiMethod<'sendDice'>;
82
+ sendDice: BotApi.Method<'sendDice'>;
83
83
  /**
84
84
  * 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.
85
85
  *
@@ -87,213 +87,213 @@ export interface BotApiShape {
87
87
  *
88
88
  * We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive.
89
89
  */
90
- sendChatAction: BotApiMethod<'sendChatAction'>;
90
+ sendChatAction: BotApi.Method<'sendChatAction'>;
91
91
  /** 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. */
92
- setMessageReaction: BotApiMethod<'setMessageReaction'>;
92
+ setMessageReaction: BotApi.Method<'setMessageReaction'>;
93
93
  /** Use this method to get a list of profile pictures for a user. Returns a [UserProfilePhotos](https://core.telegram.org/bots/api#userprofilephotos) object. */
94
- getUserProfilePhotos: BotApiMethod<'getUserProfilePhotos'>;
94
+ getUserProfilePhotos: BotApi.Method<'getUserProfilePhotos'>;
95
95
  /** 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. */
96
- setUserEmojiStatus: BotApiMethod<'setUserEmojiStatus'>;
96
+ setUserEmojiStatus: BotApi.Method<'setUserEmojiStatus'>;
97
97
  /**
98
98
  * Use this method to get basic information 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](https://core.telegram.org/bots/api#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](https://core.telegram.org/bots/api#getfile) again.
99
99
  *
100
100
  * **Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.
101
101
  */
102
- getFile: BotApiMethod<'getFile'>;
102
+ getFile: BotApi.Method<'getFile'>;
103
103
  /** 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. */
104
- banChatMember: BotApiMethod<'banChatMember'>;
104
+ banChatMember: BotApi.Method<'banChatMember'>;
105
105
  /** 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. */
106
- unbanChatMember: BotApiMethod<'unbanChatMember'>;
106
+ unbanChatMember: BotApi.Method<'unbanChatMember'>;
107
107
  /** 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. */
108
- restrictChatMember: BotApiMethod<'restrictChatMember'>;
108
+ restrictChatMember: BotApi.Method<'restrictChatMember'>;
109
109
  /** 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. */
110
- promoteChatMember: BotApiMethod<'promoteChatMember'>;
110
+ promoteChatMember: BotApi.Method<'promoteChatMember'>;
111
111
  /** Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns _True_ on success. */
112
- setChatAdministratorCustomTitle: BotApiMethod<'setChatAdministratorCustomTitle'>;
112
+ setChatAdministratorCustomTitle: BotApi.Method<'setChatAdministratorCustomTitle'>;
113
113
  /** 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. */
114
- banChatSenderChat: BotApiMethod<'banChatSenderChat'>;
114
+ banChatSenderChat: BotApi.Method<'banChatSenderChat'>;
115
115
  /** 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. */
116
- unbanChatSenderChat: BotApiMethod<'unbanChatSenderChat'>;
116
+ unbanChatSenderChat: BotApi.Method<'unbanChatSenderChat'>;
117
117
  /** 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. */
118
- setChatPermissions: BotApiMethod<'setChatPermissions'>;
118
+ setChatPermissions: BotApi.Method<'setChatPermissions'>;
119
119
  /**
120
120
  * 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.
121
121
  *
122
122
  * > Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using [exportChatInviteLink](https://core.telegram.org/bots/api#exportchatinvitelink) or by calling the [getChat](https://core.telegram.org/bots/api#getchat) method. If your bot needs to generate a new primary invite link replacing its previous one, use [exportChatInviteLink](https://core.telegram.org/bots/api#exportchatinvitelink) again.
123
123
  */
124
- exportChatInviteLink: BotApiMethod<'exportChatInviteLink'>;
124
+ exportChatInviteLink: BotApi.Method<'exportChatInviteLink'>;
125
125
  /** 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. */
126
- createChatInviteLink: BotApiMethod<'createChatInviteLink'>;
126
+ createChatInviteLink: BotApi.Method<'createChatInviteLink'>;
127
127
  /** 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. */
128
- editChatInviteLink: BotApiMethod<'editChatInviteLink'>;
128
+ editChatInviteLink: BotApi.Method<'editChatInviteLink'>;
129
129
  /** 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. */
130
- createChatSubscriptionInviteLink: BotApiMethod<'createChatSubscriptionInviteLink'>;
130
+ createChatSubscriptionInviteLink: BotApi.Method<'createChatSubscriptionInviteLink'>;
131
131
  /** 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. */
132
- editChatSubscriptionInviteLink: BotApiMethod<'editChatSubscriptionInviteLink'>;
132
+ editChatSubscriptionInviteLink: BotApi.Method<'editChatSubscriptionInviteLink'>;
133
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: BotApiMethod<'revokeChatInviteLink'>;
134
+ revokeChatInviteLink: BotApi.Method<'revokeChatInviteLink'>;
135
135
  /** 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. */
136
- approveChatJoinRequest: BotApiMethod<'approveChatJoinRequest'>;
136
+ approveChatJoinRequest: BotApi.Method<'approveChatJoinRequest'>;
137
137
  /** 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. */
138
- declineChatJoinRequest: BotApiMethod<'declineChatJoinRequest'>;
138
+ declineChatJoinRequest: BotApi.Method<'declineChatJoinRequest'>;
139
139
  /** 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. */
140
- setChatPhoto: BotApiMethod<'setChatPhoto'>;
140
+ setChatPhoto: BotApi.Method<'setChatPhoto'>;
141
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: BotApiMethod<'deleteChatPhoto'>;
142
+ deleteChatPhoto: BotApi.Method<'deleteChatPhoto'>;
143
143
  /** 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. */
144
- setChatTitle: BotApiMethod<'setChatTitle'>;
144
+ setChatTitle: BotApi.Method<'setChatTitle'>;
145
145
  /** 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. */
146
- setChatDescription: BotApiMethod<'setChatDescription'>;
146
+ setChatDescription: BotApi.Method<'setChatDescription'>;
147
147
  /** Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can\_pin\_messages' right or the 'can\_edit\_messages' right to pin messages in groups and channels respectively. Returns _True_ on success. */
148
- pinChatMessage: BotApiMethod<'pinChatMessage'>;
148
+ pinChatMessage: BotApi.Method<'pinChatMessage'>;
149
149
  /** Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can\_pin\_messages' right or the 'can\_edit\_messages' right to unpin messages in groups and channels respectively. Returns _True_ on success. */
150
- unpinChatMessage: BotApiMethod<'unpinChatMessage'>;
150
+ unpinChatMessage: BotApi.Method<'unpinChatMessage'>;
151
151
  /** Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can\_pin\_messages' right or the 'can\_edit\_messages' right to unpin all pinned messages in groups and channels respectively. Returns _True_ on success. */
152
- unpinAllChatMessages: BotApiMethod<'unpinAllChatMessages'>;
152
+ unpinAllChatMessages: BotApi.Method<'unpinAllChatMessages'>;
153
153
  /** Use this method for your bot to leave a group, supergroup or channel. Returns _True_ on success. */
154
- leaveChat: BotApiMethod<'leaveChat'>;
154
+ leaveChat: BotApi.Method<'leaveChat'>;
155
155
  /** 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. */
156
- getChat: BotApiMethod<'getChat'>;
156
+ getChat: BotApi.Method<'getChat'>;
157
157
  /** 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. */
158
- getChatAdministrators: BotApiMethod<'getChatAdministrators'>;
158
+ getChatAdministrators: BotApi.Method<'getChatAdministrators'>;
159
159
  /** Use this method to get the number of members in a chat. Returns _Int_ on success. */
160
- getChatMemberCount: BotApiMethod<'getChatMemberCount'>;
160
+ getChatMemberCount: BotApi.Method<'getChatMemberCount'>;
161
161
  /** 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. */
162
- getChatMember: BotApiMethod<'getChatMember'>;
162
+ getChatMember: BotApi.Method<'getChatMember'>;
163
163
  /** 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. */
164
- setChatStickerSet: BotApiMethod<'setChatStickerSet'>;
164
+ setChatStickerSet: BotApi.Method<'setChatStickerSet'>;
165
165
  /** 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. */
166
- deleteChatStickerSet: BotApiMethod<'deleteChatStickerSet'>;
166
+ deleteChatStickerSet: BotApi.Method<'deleteChatStickerSet'>;
167
167
  /** 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](https://core.telegram.org/bots/api#sticker) objects. */
168
- getForumTopicIconStickers: BotApiMethod<'getForumTopicIconStickers'>;
168
+ getForumTopicIconStickers: BotApi.Method<'getForumTopicIconStickers'>;
169
169
  /** 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. */
170
- createForumTopic: BotApiMethod<'createForumTopic'>;
170
+ createForumTopic: BotApi.Method<'createForumTopic'>;
171
171
  /** 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. */
172
- editForumTopic: BotApiMethod<'editForumTopic'>;
172
+ editForumTopic: BotApi.Method<'editForumTopic'>;
173
173
  /** 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. */
174
- closeForumTopic: BotApiMethod<'closeForumTopic'>;
174
+ closeForumTopic: BotApi.Method<'closeForumTopic'>;
175
175
  /** 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. */
176
- reopenForumTopic: BotApiMethod<'reopenForumTopic'>;
176
+ reopenForumTopic: BotApi.Method<'reopenForumTopic'>;
177
177
  /** 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. */
178
- deleteForumTopic: BotApiMethod<'deleteForumTopic'>;
178
+ deleteForumTopic: BotApi.Method<'deleteForumTopic'>;
179
179
  /** 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. */
180
- unpinAllForumTopicMessages: BotApiMethod<'unpinAllForumTopicMessages'>;
180
+ unpinAllForumTopicMessages: BotApi.Method<'unpinAllForumTopicMessages'>;
181
181
  /** 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. */
182
- editGeneralForumTopic: BotApiMethod<'editGeneralForumTopic'>;
182
+ editGeneralForumTopic: BotApi.Method<'editGeneralForumTopic'>;
183
183
  /** 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. */
184
- closeGeneralForumTopic: BotApiMethod<'closeGeneralForumTopic'>;
184
+ closeGeneralForumTopic: BotApi.Method<'closeGeneralForumTopic'>;
185
185
  /** 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. */
186
- reopenGeneralForumTopic: BotApiMethod<'reopenGeneralForumTopic'>;
186
+ reopenGeneralForumTopic: BotApi.Method<'reopenGeneralForumTopic'>;
187
187
  /** 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. */
188
- hideGeneralForumTopic: BotApiMethod<'hideGeneralForumTopic'>;
188
+ hideGeneralForumTopic: BotApi.Method<'hideGeneralForumTopic'>;
189
189
  /** 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. */
190
- unhideGeneralForumTopic: BotApiMethod<'unhideGeneralForumTopic'>;
190
+ unhideGeneralForumTopic: BotApi.Method<'unhideGeneralForumTopic'>;
191
191
  /** 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. */
192
- unpinAllGeneralForumTopicMessages: BotApiMethod<'unpinAllGeneralForumTopicMessages'>;
192
+ unpinAllGeneralForumTopicMessages: BotApi.Method<'unpinAllGeneralForumTopicMessages'>;
193
193
  /**
194
194
  * Use this method to send answers to callback queries sent from [inline keyboards](https://core.telegram.org/bots/features#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.
195
195
  *
196
196
  * > 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](https://t.me/botfather) and accept the terms. Otherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter.
197
197
  */
198
- answerCallbackQuery: BotApiMethod<'answerCallbackQuery'>;
198
+ answerCallbackQuery: BotApi.Method<'answerCallbackQuery'>;
199
199
  /** 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. */
200
- getUserChatBoosts: BotApiMethod<'getUserChatBoosts'>;
200
+ getUserChatBoosts: BotApi.Method<'getUserChatBoosts'>;
201
201
  /** Use this method to get information about the connection of the bot with a business account. Returns a [BusinessConnection](https://core.telegram.org/bots/api#businessconnection) object on success. */
202
- getBusinessConnection: BotApiMethod<'getBusinessConnection'>;
202
+ getBusinessConnection: BotApi.Method<'getBusinessConnection'>;
203
203
  /** Use this method to change the list of the bot's commands. See [this manual](https://core.telegram.org/bots/features#commands) for more details about bot commands. Returns _True_ on success. */
204
- setMyCommands: BotApiMethod<'setMyCommands'>;
204
+ setMyCommands: BotApi.Method<'setMyCommands'>;
205
205
  /** Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, [higher level commands](https://core.telegram.org/bots/api#determining-list-of-commands) will be shown to affected users. Returns _True_ on success. */
206
- deleteMyCommands: BotApiMethod<'deleteMyCommands'>;
206
+ deleteMyCommands: BotApi.Method<'deleteMyCommands'>;
207
207
  /** Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of [BotCommand](https://core.telegram.org/bots/api#botcommand) objects. If commands aren't set, an empty list is returned. */
208
- getMyCommands: BotApiMethod<'getMyCommands'>;
208
+ getMyCommands: BotApi.Method<'getMyCommands'>;
209
209
  /** Use this method to change the bot's name. Returns _True_ on success. */
210
- setMyName: BotApiMethod<'setMyName'>;
210
+ setMyName: BotApi.Method<'setMyName'>;
211
211
  /** Use this method to get the current bot name for the given user language. Returns [BotName](https://core.telegram.org/bots/api#botname) on success. */
212
- getMyName: BotApiMethod<'getMyName'>;
212
+ getMyName: BotApi.Method<'getMyName'>;
213
213
  /** Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns _True_ on success. */
214
- setMyDescription: BotApiMethod<'setMyDescription'>;
214
+ setMyDescription: BotApi.Method<'setMyDescription'>;
215
215
  /** Use this method to get the current bot description for the given user language. Returns [BotDescription](https://core.telegram.org/bots/api#botdescription) on success. */
216
- getMyDescription: BotApiMethod<'getMyDescription'>;
216
+ getMyDescription: BotApi.Method<'getMyDescription'>;
217
217
  /** Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns _True_ on success. */
218
- setMyShortDescription: BotApiMethod<'setMyShortDescription'>;
218
+ setMyShortDescription: BotApi.Method<'setMyShortDescription'>;
219
219
  /** Use this method to get the current bot short description for the given user language. Returns [BotShortDescription](https://core.telegram.org/bots/api#botshortdescription) on success. */
220
- getMyShortDescription: BotApiMethod<'getMyShortDescription'>;
220
+ getMyShortDescription: BotApi.Method<'getMyShortDescription'>;
221
221
  /** Use this method to change the bot's menu button in a private chat, or the default menu button. Returns _True_ on success. */
222
- setChatMenuButton: BotApiMethod<'setChatMenuButton'>;
222
+ setChatMenuButton: BotApi.Method<'setChatMenuButton'>;
223
223
  /** 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. */
224
- getChatMenuButton: BotApiMethod<'getChatMenuButton'>;
224
+ getChatMenuButton: BotApi.Method<'getChatMenuButton'>;
225
225
  /** 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 free to modify the list before adding the bot. Returns _True_ on success. */
226
- setMyDefaultAdministratorRights: BotApiMethod<'setMyDefaultAdministratorRights'>;
226
+ setMyDefaultAdministratorRights: BotApi.Method<'setMyDefaultAdministratorRights'>;
227
227
  /** Use this method to get the current default administrator rights of the bot. Returns [ChatAdministratorRights](https://core.telegram.org/bots/api#chatadministratorrights) on success. */
228
- getMyDefaultAdministratorRights: BotApiMethod<'getMyDefaultAdministratorRights'>;
228
+ getMyDefaultAdministratorRights: BotApi.Method<'getMyDefaultAdministratorRights'>;
229
229
  /** Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a [Gifts](https://core.telegram.org/bots/api#gifts) object. */
230
- getAvailableGifts: BotApiMethod<'getAvailableGifts'>;
230
+ getAvailableGifts: BotApi.Method<'getAvailableGifts'>;
231
231
  /** 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. */
232
- sendGift: BotApiMethod<'sendGift'>;
232
+ sendGift: BotApi.Method<'sendGift'>;
233
233
  /** Gifts a Telegram Premium subscription to the given user. Returns _True_ on success. */
234
- giftPremiumSubscription: BotApiMethod<'giftPremiumSubscription'>;
234
+ giftPremiumSubscription: BotApi.Method<'giftPremiumSubscription'>;
235
235
  /** 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. */
236
- verifyUser: BotApiMethod<'verifyUser'>;
236
+ verifyUser: BotApi.Method<'verifyUser'>;
237
237
  /** 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. */
238
- verifyChat: BotApiMethod<'verifyChat'>;
238
+ verifyChat: BotApi.Method<'verifyChat'>;
239
239
  /** 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. */
240
- removeUserVerification: BotApiMethod<'removeUserVerification'>;
240
+ removeUserVerification: BotApi.Method<'removeUserVerification'>;
241
241
  /** 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. */
242
- removeChatVerification: BotApiMethod<'removeChatVerification'>;
242
+ removeChatVerification: BotApi.Method<'removeChatVerification'>;
243
243
  /** Marks incoming message as read on behalf of a business account. Requires the _can\_read\_messages_ business bot right. Returns _True_ on success. */
244
- readBusinessMessage: BotApiMethod<'readBusinessMessage'>;
244
+ readBusinessMessage: BotApi.Method<'readBusinessMessage'>;
245
245
  /** Delete messages on behalf of a business account. Requires the _can\_delete\_sent\_messages_ business bot right to delete messages sent by the bot itself, or the _can\_delete\_all\_messages_ business bot right to delete any message. Returns _True_ on success. */
246
- deleteBusinessMessages: BotApiMethod<'deleteBusinessMessages'>;
246
+ deleteBusinessMessages: BotApi.Method<'deleteBusinessMessages'>;
247
247
  /** Changes the first and last name of a managed business account. Requires the _can\_change\_name_ business bot right. Returns _True_ on success. */
248
- setBusinessAccountName: BotApiMethod<'setBusinessAccountName'>;
248
+ setBusinessAccountName: BotApi.Method<'setBusinessAccountName'>;
249
249
  /** Changes the username of a managed business account. Requires the _can\_change\_username_ business bot right. Returns _True_ on success. */
250
- setBusinessAccountUsername: BotApiMethod<'setBusinessAccountUsername'>;
250
+ setBusinessAccountUsername: BotApi.Method<'setBusinessAccountUsername'>;
251
251
  /** Changes the bio of a managed business account. Requires the _can\_change\_bio_ business bot right. Returns _True_ on success. */
252
- setBusinessAccountBio: BotApiMethod<'setBusinessAccountBio'>;
252
+ setBusinessAccountBio: BotApi.Method<'setBusinessAccountBio'>;
253
253
  /** Changes the profile photo of a managed business account. Requires the _can\_edit\_profile\_photo_ business bot right. Returns _True_ on success. */
254
- setBusinessAccountProfilePhoto: BotApiMethod<'setBusinessAccountProfilePhoto'>;
254
+ setBusinessAccountProfilePhoto: BotApi.Method<'setBusinessAccountProfilePhoto'>;
255
255
  /** Removes the current profile photo of a managed business account. Requires the _can\_edit\_profile\_photo_ business bot right. Returns _True_ on success. */
256
- removeBusinessAccountProfilePhoto: BotApiMethod<'removeBusinessAccountProfilePhoto'>;
256
+ removeBusinessAccountProfilePhoto: BotApi.Method<'removeBusinessAccountProfilePhoto'>;
257
257
  /** Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the _can\_change\_gift\_settings_ business bot right. Returns _True_ on success. */
258
- setBusinessAccountGiftSettings: BotApiMethod<'setBusinessAccountGiftSettings'>;
258
+ setBusinessAccountGiftSettings: BotApi.Method<'setBusinessAccountGiftSettings'>;
259
259
  /** Returns the amount of Telegram Stars owned by a managed business account. Requires the _can\_view\_gifts\_and\_stars_ business bot right. Returns [StarAmount](https://core.telegram.org/bots/api#staramount) on success. */
260
- getBusinessAccountStarBalance: BotApiMethod<'getBusinessAccountStarBalance'>;
260
+ getBusinessAccountStarBalance: BotApi.Method<'getBusinessAccountStarBalance'>;
261
261
  /** Transfers Telegram Stars from the business account balance to the bot's balance. Requires the _can\_transfer\_stars_ business bot right. Returns _True_ on success. */
262
- transferBusinessAccountStars: BotApiMethod<'transferBusinessAccountStars'>;
262
+ transferBusinessAccountStars: BotApi.Method<'transferBusinessAccountStars'>;
263
263
  /** Returns the gifts received and owned by a managed business account. Requires the _can\_view\_gifts\_and\_stars_ business bot right. Returns [OwnedGifts](https://core.telegram.org/bots/api#ownedgifts) on success. */
264
- getBusinessAccountGifts: BotApiMethod<'getBusinessAccountGifts'>;
264
+ getBusinessAccountGifts: BotApi.Method<'getBusinessAccountGifts'>;
265
265
  /** Converts a given regular gift to Telegram Stars. Requires the _can\_convert\_gifts\_to\_stars_ business bot right. Returns _True_ on success. */
266
- convertGiftToStars: BotApiMethod<'convertGiftToStars'>;
266
+ convertGiftToStars: BotApi.Method<'convertGiftToStars'>;
267
267
  /** Upgrades a given regular gift to a unique gift. Requires the _can\_transfer\_and\_upgrade\_gifts_ business bot right. Additionally requires the _can\_transfer\_stars_ business bot right if the upgrade is paid. Returns _True_ on success. */
268
- upgradeGift: BotApiMethod<'upgradeGift'>;
268
+ upgradeGift: BotApi.Method<'upgradeGift'>;
269
269
  /** Transfers an owned unique gift to another user. Requires the _can\_transfer\_and\_upgrade\_gifts_ business bot right. Requires _can\_transfer\_stars_ business bot right if the transfer is paid. Returns _True_ on success. */
270
- transferGift: BotApiMethod<'transferGift'>;
270
+ transferGift: BotApi.Method<'transferGift'>;
271
271
  /** Posts a story on behalf of a managed business account. Requires the _can\_manage\_stories_ business bot right. Returns [Story](https://core.telegram.org/bots/api#story) on success. */
272
- postStory: BotApiMethod<'postStory'>;
272
+ postStory: BotApi.Method<'postStory'>;
273
273
  /** Edits a story previously posted by the bot on behalf of a managed business account. Requires the _can\_manage\_stories_ business bot right. Returns [Story](https://core.telegram.org/bots/api#story) on success. */
274
- editStory: BotApiMethod<'editStory'>;
274
+ editStory: BotApi.Method<'editStory'>;
275
275
  /** Deletes a story previously posted by the bot on behalf of a managed business account. Requires the _can\_manage\_stories_ business bot right. Returns _True_ on success. */
276
- deleteStory: BotApiMethod<'deleteStory'>;
276
+ deleteStory: BotApi.Method<'deleteStory'>;
277
277
  /** 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. */
278
- editMessageText: BotApiMethod<'editMessageText'>;
278
+ editMessageText: BotApi.Method<'editMessageText'>;
279
279
  /** 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. */
280
- editMessageCaption: BotApiMethod<'editMessageCaption'>;
280
+ editMessageCaption: BotApi.Method<'editMessageCaption'>;
281
281
  /** 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. */
282
- editMessageMedia: BotApiMethod<'editMessageMedia'>;
282
+ editMessageMedia: BotApi.Method<'editMessageMedia'>;
283
283
  /** 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. */
284
- editMessageLiveLocation: BotApiMethod<'editMessageLiveLocation'>;
284
+ editMessageLiveLocation: BotApi.Method<'editMessageLiveLocation'>;
285
285
  /** 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. */
286
- stopMessageLiveLocation: BotApiMethod<'stopMessageLiveLocation'>;
286
+ stopMessageLiveLocation: BotApi.Method<'stopMessageLiveLocation'>;
287
287
  /** Use this method to edit a checklist on behalf of a connected business account. On success, the edited [Message](https://core.telegram.org/bots/api#message) is returned. */
288
- editMessageChecklist: BotApiMethod<'editMessageChecklist'>;
288
+ editMessageChecklist: BotApi.Method<'editMessageChecklist'>;
289
289
  /** 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. */
290
- editMessageReplyMarkup: BotApiMethod<'editMessageReplyMarkup'>;
290
+ editMessageReplyMarkup: BotApi.Method<'editMessageReplyMarkup'>;
291
291
  /** 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. */
292
- stopPoll: BotApiMethod<'stopPoll'>;
292
+ stopPoll: BotApi.Method<'stopPoll'>;
293
293
  /** Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can\_post\_messages' administrator right in the corresponding channel chat. Returns _True_ on success. */
294
- approveSuggestedPost: BotApiMethod<'approveSuggestedPost'>;
294
+ approveSuggestedPost: BotApi.Method<'approveSuggestedPost'>;
295
295
  /** Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can\_manage\_direct\_messages' administrator right in the corresponding channel chat. Returns _True_ on success. */
296
- declineSuggestedPost: BotApiMethod<'declineSuggestedPost'>;
296
+ declineSuggestedPost: BotApi.Method<'declineSuggestedPost'>;
297
297
  /**
298
298
  * Use this method to delete a message, including service messages, with the following limitations:
299
299
  *
@@ -317,82 +317,82 @@ export interface BotApiShape {
317
317
  *
318
318
  * Returns _True_ on success.
319
319
  */
320
- deleteMessage: BotApiMethod<'deleteMessage'>;
320
+ deleteMessage: BotApi.Method<'deleteMessage'>;
321
321
  /** 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. */
322
- deleteMessages: BotApiMethod<'deleteMessages'>;
322
+ deleteMessages: BotApi.Method<'deleteMessages'>;
323
323
  /** 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. */
324
- sendSticker: BotApiMethod<'sendSticker'>;
324
+ sendSticker: BotApi.Method<'sendSticker'>;
325
325
  /** Use this method to get a sticker set. On success, a [StickerSet](https://core.telegram.org/bots/api#stickerset) object is returned. */
326
- getStickerSet: BotApiMethod<'getStickerSet'>;
326
+ getStickerSet: BotApi.Method<'getStickerSet'>;
327
327
  /** Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of [Sticker](https://core.telegram.org/bots/api#sticker) objects. */
328
- getCustomEmojiStickers: BotApiMethod<'getCustomEmojiStickers'>;
328
+ getCustomEmojiStickers: BotApi.Method<'getCustomEmojiStickers'>;
329
329
  /** 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. */
330
- uploadStickerFile: BotApiMethod<'uploadStickerFile'>;
330
+ uploadStickerFile: BotApi.Method<'uploadStickerFile'>;
331
331
  /** 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. */
332
- createNewStickerSet: BotApiMethod<'createNewStickerSet'>;
332
+ createNewStickerSet: BotApi.Method<'createNewStickerSet'>;
333
333
  /** 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. */
334
- addStickerToSet: BotApiMethod<'addStickerToSet'>;
334
+ addStickerToSet: BotApi.Method<'addStickerToSet'>;
335
335
  /** Use this method to move a sticker in a set created by the bot to a specific position. Returns _True_ on success. */
336
- setStickerPositionInSet: BotApiMethod<'setStickerPositionInSet'>;
336
+ setStickerPositionInSet: BotApi.Method<'setStickerPositionInSet'>;
337
337
  /** Use this method to delete a sticker from a set created by the bot. Returns _True_ on success. */
338
- deleteStickerFromSet: BotApiMethod<'deleteStickerFromSet'>;
338
+ deleteStickerFromSet: BotApi.Method<'deleteStickerFromSet'>;
339
339
  /** 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. */
340
- replaceStickerInSet: BotApiMethod<'replaceStickerInSet'>;
340
+ replaceStickerInSet: BotApi.Method<'replaceStickerInSet'>;
341
341
  /** Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns _True_ on success. */
342
- setStickerEmojiList: BotApiMethod<'setStickerEmojiList'>;
342
+ setStickerEmojiList: BotApi.Method<'setStickerEmojiList'>;
343
343
  /** Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns _True_ on success. */
344
- setStickerKeywords: BotApiMethod<'setStickerKeywords'>;
344
+ setStickerKeywords: BotApi.Method<'setStickerKeywords'>;
345
345
  /** Use this method to change the [mask position](https://core.telegram.org/bots/api#maskposition) of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns _True_ on success. */
346
- setStickerMaskPosition: BotApiMethod<'setStickerMaskPosition'>;
346
+ setStickerMaskPosition: BotApi.Method<'setStickerMaskPosition'>;
347
347
  /** Use this method to set the title of a created sticker set. Returns _True_ on success. */
348
- setStickerSetTitle: BotApiMethod<'setStickerSetTitle'>;
348
+ setStickerSetTitle: BotApi.Method<'setStickerSetTitle'>;
349
349
  /** 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. */
350
- setStickerSetThumbnail: BotApiMethod<'setStickerSetThumbnail'>;
350
+ setStickerSetThumbnail: BotApi.Method<'setStickerSetThumbnail'>;
351
351
  /** Use this method to set the thumbnail of a custom emoji sticker set. Returns _True_ on success. */
352
- setCustomEmojiStickerSetThumbnail: BotApiMethod<'setCustomEmojiStickerSetThumbnail'>;
352
+ setCustomEmojiStickerSetThumbnail: BotApi.Method<'setCustomEmojiStickerSetThumbnail'>;
353
353
  /** Use this method to delete a sticker set that was created by the bot. Returns _True_ on success. */
354
- deleteStickerSet: BotApiMethod<'deleteStickerSet'>;
354
+ deleteStickerSet: BotApi.Method<'deleteStickerSet'>;
355
355
  /**
356
356
  * Use this method to send answers to an inline query. On success, _True_ is returned.
357
357
  *
358
358
  * No more than **50** results per query are allowed.
359
359
  */
360
- answerInlineQuery: BotApiMethod<'answerInlineQuery'>;
360
+ answerInlineQuery: BotApi.Method<'answerInlineQuery'>;
361
361
  /** Use this method to set the result of an interaction with a [Web App](https://core.telegram.org/bots/webapps) and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a [SentWebAppMessage](https://core.telegram.org/bots/api#sentwebappmessage) object is returned. */
362
- answerWebAppQuery: BotApiMethod<'answerWebAppQuery'>;
362
+ answerWebAppQuery: BotApi.Method<'answerWebAppQuery'>;
363
363
  /** 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. */
364
- savePreparedInlineMessage: BotApiMethod<'savePreparedInlineMessage'>;
364
+ savePreparedInlineMessage: BotApi.Method<'savePreparedInlineMessage'>;
365
365
  /** Use this method to send invoices. On success, the sent [Message](https://core.telegram.org/bots/api#message) is returned. */
366
- sendInvoice: BotApiMethod<'sendInvoice'>;
366
+ sendInvoice: BotApi.Method<'sendInvoice'>;
367
367
  /** Use this method to create a link for an invoice. Returns the created invoice link as _String_ on success. */
368
- createInvoiceLink: BotApiMethod<'createInvoiceLink'>;
368
+ createInvoiceLink: BotApi.Method<'createInvoiceLink'>;
369
369
  /** If you sent an invoice requesting a shipping address and the parameter _is\_flexible_ was specified, the Bot API will send an [Update](https://core.telegram.org/bots/api#update) with a _shipping\_query_ field to the bot. Use this method to reply to shipping queries. On success, _True_ is returned. */
370
- answerShippingQuery: BotApiMethod<'answerShippingQuery'>;
370
+ answerShippingQuery: BotApi.Method<'answerShippingQuery'>;
371
371
  /** Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an [Update](https://core.telegram.org/bots/api#update) with the field _pre\_checkout\_query_. Use this method to respond to such pre-checkout queries. On success, _True_ is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. */
372
- answerPreCheckoutQuery: BotApiMethod<'answerPreCheckoutQuery'>;
372
+ answerPreCheckoutQuery: BotApi.Method<'answerPreCheckoutQuery'>;
373
373
  /** A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a [StarAmount](https://core.telegram.org/bots/api#staramount) object. */
374
- getMyStarBalance: BotApiMethod<'getMyStarBalance'>;
374
+ getMyStarBalance: BotApi.Method<'getMyStarBalance'>;
375
375
  /** Returns the bot's Telegram Star transactions in chronological order. On success, returns a [StarTransactions](https://core.telegram.org/bots/api#startransactions) object. */
376
- getStarTransactions: BotApiMethod<'getStarTransactions'>;
376
+ getStarTransactions: BotApi.Method<'getStarTransactions'>;
377
377
  /** Refunds a successful payment in [Telegram Stars](https://t.me/BotNews/90). Returns _True_ on success. */
378
- refundStarPayment: BotApiMethod<'refundStarPayment'>;
378
+ refundStarPayment: BotApi.Method<'refundStarPayment'>;
379
379
  /** Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns _True_ on success. */
380
- editUserStarSubscription: BotApiMethod<'editUserStarSubscription'>;
380
+ editUserStarSubscription: BotApi.Method<'editUserStarSubscription'>;
381
381
  /**
382
382
  * 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.
383
383
  *
384
384
  * 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.
385
385
  */
386
- setPassportDataErrors: BotApiMethod<'setPassportDataErrors'>;
386
+ setPassportDataErrors: BotApi.Method<'setPassportDataErrors'>;
387
387
  /** Use this method to send a game. On success, the sent [Message](https://core.telegram.org/bots/api#message) is returned. */
388
- sendGame: BotApiMethod<'sendGame'>;
388
+ sendGame: BotApi.Method<'sendGame'>;
389
389
  /** 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_. */
390
- setGameScore: BotApiMethod<'setGameScore'>;
390
+ setGameScore: BotApi.Method<'setGameScore'>;
391
391
  /**
392
392
  * 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.
393
393
  *
394
394
  * > 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.
395
395
  */
396
- getGameHighScores: BotApiMethod<'getGameHighScores'>;
396
+ getGameHighScores: BotApi.Method<'getGameHighScores'>;
397
397
  }
398
398
  //# sourceMappingURL=botApiShape.gen.d.ts.map