@mtcute/core 0.30.2 → 0.31.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 (233) hide show
  1. package/client.cjs +73 -0
  2. package/client.js +73 -0
  3. package/highlevel/client.d.cts +344 -114
  4. package/highlevel/client.d.ts +344 -114
  5. package/highlevel/methods/auth/sign-in-qr.cjs +2 -0
  6. package/highlevel/methods/auth/sign-in-qr.js +2 -0
  7. package/highlevel/methods/auth/sign-in-qr.test.d.cts +1 -0
  8. package/highlevel/methods/auth/sign-in-qr.test.d.ts +1 -0
  9. package/highlevel/methods/chats/join-chat.cjs +1 -1
  10. package/highlevel/methods/chats/join-chat.d.cts +2 -1
  11. package/highlevel/methods/chats/join-chat.d.ts +2 -1
  12. package/highlevel/methods/chats/join-chat.js +1 -1
  13. package/highlevel/methods/chats/transfer-chat-ownership.cjs +6 -17
  14. package/highlevel/methods/chats/transfer-chat-ownership.js +6 -17
  15. package/highlevel/methods/communities/ban-community-participant.cjs +30 -0
  16. package/highlevel/methods/communities/ban-community-participant.d.cts +20 -0
  17. package/highlevel/methods/communities/ban-community-participant.d.ts +20 -0
  18. package/highlevel/methods/communities/ban-community-participant.js +25 -0
  19. package/highlevel/methods/communities/create-community.cjs +29 -0
  20. package/highlevel/methods/communities/create-community.d.cts +22 -0
  21. package/highlevel/methods/communities/create-community.d.ts +22 -0
  22. package/highlevel/methods/communities/create-community.js +24 -0
  23. package/highlevel/methods/communities/get-community-link-requests.cjs +27 -0
  24. package/highlevel/methods/communities/get-community-link-requests.d.cts +17 -0
  25. package/highlevel/methods/communities/get-community-link-requests.d.ts +17 -0
  26. package/highlevel/methods/communities/get-community-link-requests.js +22 -0
  27. package/highlevel/methods/communities/get-community-participant-chats.cjs +24 -0
  28. package/highlevel/methods/communities/get-community-participant-chats.d.cts +17 -0
  29. package/highlevel/methods/communities/get-community-participant-chats.d.ts +17 -0
  30. package/highlevel/methods/communities/get-community-participant-chats.js +19 -0
  31. package/highlevel/methods/communities/get-joined-communities.cjs +21 -0
  32. package/highlevel/methods/communities/get-joined-communities.d.cts +6 -0
  33. package/highlevel/methods/communities/get-joined-communities.d.ts +6 -0
  34. package/highlevel/methods/communities/get-joined-communities.js +16 -0
  35. package/highlevel/methods/communities/hide-community-link-request.cjs +30 -0
  36. package/highlevel/methods/communities/hide-community-link-request.d.cts +22 -0
  37. package/highlevel/methods/communities/hide-community-link-request.d.ts +22 -0
  38. package/highlevel/methods/communities/hide-community-link-request.js +25 -0
  39. package/highlevel/methods/communities/link-community-peer.cjs +32 -0
  40. package/highlevel/methods/communities/link-community-peer.d.cts +22 -0
  41. package/highlevel/methods/communities/link-community-peer.d.ts +22 -0
  42. package/highlevel/methods/communities/link-community-peer.js +27 -0
  43. package/highlevel/methods/communities/toggle-community-collapsed.cjs +18 -0
  44. package/highlevel/methods/communities/toggle-community-collapsed.d.cts +16 -0
  45. package/highlevel/methods/communities/toggle-community-collapsed.d.ts +16 -0
  46. package/highlevel/methods/communities/toggle-community-collapsed.js +13 -0
  47. package/highlevel/methods/ephemeral/delete-ephemeral-message.cjs +20 -0
  48. package/highlevel/methods/ephemeral/delete-ephemeral-message.d.cts +13 -0
  49. package/highlevel/methods/ephemeral/delete-ephemeral-message.d.ts +13 -0
  50. package/highlevel/methods/ephemeral/delete-ephemeral-message.js +15 -0
  51. package/highlevel/methods/ephemeral/edit-ephemeral-message.cjs +33 -0
  52. package/highlevel/methods/ephemeral/edit-ephemeral-message.d.cts +25 -0
  53. package/highlevel/methods/ephemeral/edit-ephemeral-message.d.ts +25 -0
  54. package/highlevel/methods/ephemeral/edit-ephemeral-message.js +28 -0
  55. package/highlevel/methods/ephemeral/find-in-update.cjs +27 -0
  56. package/highlevel/methods/ephemeral/find-in-update.d.cts +8 -0
  57. package/highlevel/methods/ephemeral/find-in-update.d.ts +8 -0
  58. package/highlevel/methods/ephemeral/find-in-update.js +22 -0
  59. package/highlevel/methods/ephemeral/get-ephemeral-callback-answer.cjs +31 -0
  60. package/highlevel/methods/ephemeral/get-ephemeral-callback-answer.d.cts +29 -0
  61. package/highlevel/methods/ephemeral/get-ephemeral-callback-answer.d.ts +29 -0
  62. package/highlevel/methods/ephemeral/get-ephemeral-callback-answer.js +26 -0
  63. package/highlevel/methods/ephemeral/send-ephemeral-message.cjs +38 -0
  64. package/highlevel/methods/ephemeral/send-ephemeral-message.d.cts +29 -0
  65. package/highlevel/methods/ephemeral/send-ephemeral-message.d.ts +29 -0
  66. package/highlevel/methods/ephemeral/send-ephemeral-message.js +33 -0
  67. package/highlevel/methods/files/download-iterable.cjs +4 -2
  68. package/highlevel/methods/files/download-iterable.js +4 -2
  69. package/highlevel/methods/files/download-iterable.test.d.cts +1 -0
  70. package/highlevel/methods/files/download-iterable.test.d.ts +1 -0
  71. package/highlevel/methods/files/download-stream.cjs +5 -6
  72. package/highlevel/methods/files/download-stream.js +5 -6
  73. package/highlevel/methods/forums/create-forum-topic.d.cts +7 -0
  74. package/highlevel/methods/forums/create-forum-topic.d.ts +7 -0
  75. package/highlevel/methods/forums/delete-forum-topic-history.d.cts +1 -1
  76. package/highlevel/methods/forums/delete-forum-topic-history.d.ts +1 -1
  77. package/highlevel/methods/forums/edit-forum-topic.cjs +1 -1
  78. package/highlevel/methods/forums/edit-forum-topic.d.cts +2 -2
  79. package/highlevel/methods/forums/edit-forum-topic.d.ts +2 -2
  80. package/highlevel/methods/forums/edit-forum-topic.js +1 -1
  81. package/highlevel/methods/forums/get-forum-topics-by-id.cjs +5 -1
  82. package/highlevel/methods/forums/get-forum-topics-by-id.d.cts +9 -1
  83. package/highlevel/methods/forums/get-forum-topics-by-id.d.ts +9 -1
  84. package/highlevel/methods/forums/get-forum-topics-by-id.js +5 -1
  85. package/highlevel/methods/forums/get-forum-topics-by-id.test.d.cts +1 -0
  86. package/highlevel/methods/forums/get-forum-topics-by-id.test.d.ts +1 -0
  87. package/highlevel/methods/forums/get-forum-topics.cjs +1 -1
  88. package/highlevel/methods/forums/get-forum-topics.js +1 -1
  89. package/highlevel/methods/forums/toggle-forum-topic-closed.d.cts +1 -1
  90. package/highlevel/methods/forums/toggle-forum-topic-closed.d.ts +1 -1
  91. package/highlevel/methods/forums/toggle-forum-topic-pinned.d.cts +1 -1
  92. package/highlevel/methods/forums/toggle-forum-topic-pinned.d.ts +1 -1
  93. package/highlevel/methods/forums/toggle-general-topic-hidden.cjs +2 -2
  94. package/highlevel/methods/forums/toggle-general-topic-hidden.js +3 -3
  95. package/highlevel/methods/messages/send-common.d.cts +7 -1
  96. package/highlevel/methods/messages/send-common.d.ts +7 -1
  97. package/highlevel/methods/messages/send-text.cjs +70 -4
  98. package/highlevel/methods/messages/send-text.js +70 -4
  99. package/highlevel/methods/users/resolve-peer.cjs +11 -1
  100. package/highlevel/methods/users/resolve-peer.js +11 -1
  101. package/highlevel/methods.d.cts +16 -0
  102. package/highlevel/methods.d.ts +16 -0
  103. package/highlevel/storage/service/peers.cjs +25 -0
  104. package/highlevel/storage/service/peers.js +25 -0
  105. package/highlevel/storage/service/peers.test.d.cts +1 -0
  106. package/highlevel/storage/service/peers.test.d.ts +1 -0
  107. package/highlevel/types/conversation.cjs +8 -0
  108. package/highlevel/types/conversation.d.cts +1 -0
  109. package/highlevel/types/conversation.d.ts +1 -0
  110. package/highlevel/types/conversation.js +10 -2
  111. package/highlevel/types/conversation.test.d.cts +1 -0
  112. package/highlevel/types/conversation.test.d.ts +1 -0
  113. package/highlevel/types/messages/ephemeral-message.cjs +103 -0
  114. package/highlevel/types/messages/ephemeral-message.d.cts +55 -0
  115. package/highlevel/types/messages/ephemeral-message.d.ts +55 -0
  116. package/highlevel/types/messages/ephemeral-message.js +98 -0
  117. package/highlevel/types/messages/index.d.cts +1 -0
  118. package/highlevel/types/messages/index.d.ts +1 -0
  119. package/highlevel/types/messages/message-action.cjs +6 -0
  120. package/highlevel/types/messages/message-action.d.cts +8 -1
  121. package/highlevel/types/messages/message-action.d.ts +8 -1
  122. package/highlevel/types/messages/message-action.js +6 -0
  123. package/highlevel/types/messages/replied-message.cjs +5 -1
  124. package/highlevel/types/messages/replied-message.d.cts +5 -1
  125. package/highlevel/types/messages/replied-message.d.ts +5 -1
  126. package/highlevel/types/messages/replied-message.js +5 -1
  127. package/highlevel/types/peers/chat.cjs +23 -3
  128. package/highlevel/types/peers/chat.d.cts +8 -3
  129. package/highlevel/types/peers/chat.d.ts +8 -3
  130. package/highlevel/types/peers/chat.js +24 -4
  131. package/highlevel/types/peers/community-peer.cjs +60 -0
  132. package/highlevel/types/peers/community-peer.d.cts +37 -0
  133. package/highlevel/types/peers/community-peer.d.ts +37 -0
  134. package/highlevel/types/peers/community-peer.js +55 -0
  135. package/highlevel/types/peers/full-chat.cjs +20 -5
  136. package/highlevel/types/peers/full-chat.d.cts +5 -0
  137. package/highlevel/types/peers/full-chat.d.ts +5 -0
  138. package/highlevel/types/peers/full-chat.js +20 -5
  139. package/highlevel/types/peers/index.d.cts +1 -0
  140. package/highlevel/types/peers/index.d.ts +1 -0
  141. package/highlevel/types/peers/peer.cjs +2 -0
  142. package/highlevel/types/peers/peer.js +2 -0
  143. package/highlevel/types/peers/user.cjs +6 -0
  144. package/highlevel/types/peers/user.d.cts +2 -0
  145. package/highlevel/types/peers/user.d.ts +2 -0
  146. package/highlevel/types/peers/user.js +6 -0
  147. package/highlevel/types/updates/delete-ephemeral-messages-update.cjs +27 -0
  148. package/highlevel/types/updates/delete-ephemeral-messages-update.d.cts +15 -0
  149. package/highlevel/types/updates/delete-ephemeral-messages-update.d.ts +15 -0
  150. package/highlevel/types/updates/delete-ephemeral-messages-update.js +22 -0
  151. package/highlevel/types/updates/ephemeral-callback-query.cjs +61 -0
  152. package/highlevel/types/updates/ephemeral-callback-query.d.cts +38 -0
  153. package/highlevel/types/updates/ephemeral-callback-query.d.ts +38 -0
  154. package/highlevel/types/updates/ephemeral-callback-query.js +56 -0
  155. package/highlevel/types/updates/index.d.cts +16 -2
  156. package/highlevel/types/updates/index.d.ts +16 -2
  157. package/highlevel/types/updates/parse-update.cjs +12 -1
  158. package/highlevel/types/updates/parse-update.js +12 -1
  159. package/highlevel/updates/manager.cjs +31 -13
  160. package/highlevel/updates/manager.d.cts +1 -0
  161. package/highlevel/updates/manager.d.ts +1 -0
  162. package/highlevel/updates/manager.js +31 -13
  163. package/highlevel/updates/manager.test.d.cts +1 -0
  164. package/highlevel/updates/manager.test.d.ts +1 -0
  165. package/highlevel/utils/stream-utils.cjs +8 -4
  166. package/highlevel/utils/stream-utils.js +8 -4
  167. package/highlevel/utils/stream-utils.test.d.cts +1 -0
  168. package/highlevel/utils/stream-utils.test.d.ts +1 -0
  169. package/highlevel/utils/walk-page-blocks.cjs +4 -0
  170. package/highlevel/utils/walk-page-blocks.js +4 -0
  171. package/index.cjs +10 -0
  172. package/index.js +11 -1
  173. package/methods.cjs +27 -0
  174. package/methods.js +27 -0
  175. package/network/client.cjs +4 -3
  176. package/network/client.d.cts +1 -0
  177. package/network/client.d.ts +1 -0
  178. package/network/client.js +4 -3
  179. package/network/middlewares/flood-waiter.cjs +2 -2
  180. package/network/middlewares/flood-waiter.js +2 -2
  181. package/network/middlewares/internal-errors.cjs +1 -1
  182. package/network/middlewares/internal-errors.js +1 -1
  183. package/network/middlewares/media-throttle.cjs +1 -1
  184. package/network/middlewares/media-throttle.js +1 -1
  185. package/network/mtproxy/index.cjs +4 -3
  186. package/network/mtproxy/index.d.cts +2 -2
  187. package/network/mtproxy/index.d.ts +2 -2
  188. package/network/mtproxy/index.js +4 -3
  189. package/network/network-manager.cjs +44 -16
  190. package/network/network-manager.d.cts +10 -3
  191. package/network/network-manager.d.ts +10 -3
  192. package/network/network-manager.js +45 -17
  193. package/network/network-manager.test.d.cts +1 -0
  194. package/network/network-manager.test.d.ts +1 -0
  195. package/network/persistent-connection.cjs +10 -2
  196. package/network/persistent-connection.js +10 -2
  197. package/network/session-connection.cjs +3 -0
  198. package/network/session-connection.js +3 -0
  199. package/network/transports/abstract.cjs +16 -0
  200. package/network/transports/abstract.d.cts +8 -2
  201. package/network/transports/abstract.d.ts +8 -2
  202. package/network/transports/abstract.js +17 -1
  203. package/network/transports/obfuscated.cjs +3 -1
  204. package/network/transports/obfuscated.js +3 -1
  205. package/package.json +6 -6
  206. package/tl/api-schema.json +1 -1
  207. package/tl/binary/reader.cjs +90 -15
  208. package/tl/binary/reader.js +90 -15
  209. package/tl/binary/writer.cjs +385 -80
  210. package/tl/binary/writer.js +385 -80
  211. package/tl/compat/reader.cjs +11 -0
  212. package/tl/compat/reader.js +11 -0
  213. package/tl/index.d.cts +12380 -4272
  214. package/tl/index.d.ts +12380 -4272
  215. package/tl/inner-tl.cjs +70 -20
  216. package/tl/inner-tl.js +70 -20
  217. package/tl/raw-errors.json +1 -1
  218. package/utils/abort-signal.cjs +1 -12
  219. package/utils/abort-signal.js +1 -12
  220. package/utils/abort-signal.test.d.cts +1 -0
  221. package/utils/abort-signal.test.d.ts +1 -0
  222. package/utils/binary/compat.cjs +14 -0
  223. package/utils/binary/compat.js +14 -0
  224. package/utils/early-timer.cjs +3 -11
  225. package/utils/early-timer.js +3 -11
  226. package/utils/early-timer.test.d.cts +1 -0
  227. package/utils/early-timer.test.d.ts +1 -0
  228. package/utils/function-utils.cjs +9 -4
  229. package/utils/function-utils.js +9 -4
  230. package/utils/links/bots.cjs +3 -0
  231. package/utils/links/bots.js +3 -0
  232. package/utils/peer-utils.cjs +8 -0
  233. package/utils/peer-utils.js +8 -0
@@ -8,6 +8,7 @@ import { LogOutResult } from './methods/auth/log-out.js';
8
8
  import { CreateGroupResult } from './methods/chats/create-group.js';
9
9
  import { JoinChatResult } from './methods/chats/join-chat.js';
10
10
  import { DraftMessageInput } from './methods/chats/save-draft.js';
11
+ import { CommunityParticipantChats } from './methods/communities/get-community-participant-chats.js';
11
12
  import { GetForumTopicsOffset, getForumTopics } from './methods/forums/get-forum-topics.js';
12
13
  import { InputStarGiftAttributeIds, ResaleStarGiftsMeta } from './methods/gifts/get-resale-star-gifts.js';
13
14
  import { StarGiftUpgradeOptions } from './methods/gifts/get-star-gift-upgrade-options.js';
@@ -30,7 +31,7 @@ import { InputStarsAmount } from './methods/premium/_normalize-stars-amount.js';
30
31
  import { CanApplyBoostResult } from './methods/premium/can-apply-boost.js';
31
32
  import { CanSendStoryResult } from './methods/stories/can-send-story.js';
32
33
  import { ITelegramStorageProvider } from './storage/provider.js';
33
- import { AllStories, ArrayPaginated, ArrayPaginatedWithMeta, ArrayWithTotal, Audio, Boost, BoostSlot, BoostStats, BotChatJoinRequestUpdate, BotCommands, BotGuestChatQuery, BotReactionCountUpdate, BotReactionUpdate, BotStoppedUpdate, BusinessCallbackQuery, BusinessChatLink, BusinessConnection, BusinessMessage, BusinessWorkHoursDay, CallbackQuery, Chat, ChatEvent, ChatInviteLink, ChatInviteLinkMember, ChatJoinRequestUpdate, ChatlistPreview, ChatMember, ChatMemberUpdate, ChatPreview, ChosenInlineResult, CollectibleInfo, DeleteBusinessMessageUpdate, DeleteMessageUpdate, DeleteStoryUpdate, Dialog, FactCheck, FileDownloadLocation, FileDownloadParameters, ForumTopic, FullChat, FullUser, GameHighScore, HistoryReadUpdate, InlineCallbackQuery, InlineQuery, InputChatEventFilters, InputDialogFolder, InputDocumentId, InputFileLike, InputInlineMessage, InputInlineResult, InputMediaAudio, InputMediaLike, InputMediaSticker, InputMessageId, InputPeerLike, InputPrivacyRule, InputReaction, InputRichMessage, InputStarGift, InputStickerSet, InputStickerSetItem, InputText, InputWebview, MaybeDynamic, Message, MessageEffect, MessageMedia, MessageReactions, ParametersSkip2, ParsedUpdate, Peer, PeerReaction, PeerSettings, PeerStories, Photo, Poll, PollUpdate, PollVoteUpdate, PreCheckoutQuery, RawDocument, ReplyMarkup, RichMediaUploadCache, SavedStarGift, SentCode, StarGift, StarGiftUnique, StarGiftValue, StarsStatus, StarsTransaction, Sticker, StickerSet, StickerType, StoriesStealthMode, Story, StoryInteractions, StoryUpdate, StoryViewer, StoryViewersList, TakeoutSession, TextWithEntities, TypingStatus, UploadedFile, UploadFileLike, User, UserStatusUpdate, UserTypingUpdate, WebPageMedia, WebviewResult } from './types/index.js';
34
+ import { AllStories, ArrayPaginated, ArrayPaginatedWithMeta, ArrayWithTotal, Audio, Boost, BoostSlot, BoostStats, BotChatJoinRequestUpdate, BotCommands, BotGuestChatQuery, BotReactionCountUpdate, BotReactionUpdate, BotStoppedUpdate, BusinessCallbackQuery, BusinessChatLink, BusinessConnection, BusinessMessage, BusinessWorkHoursDay, CallbackQuery, Chat, ChatEvent, ChatInviteLink, ChatInviteLinkMember, ChatJoinRequestUpdate, ChatlistPreview, ChatMember, ChatMemberUpdate, ChatPreview, ChosenInlineResult, CollectibleInfo, CommunityPeerRequest, DeleteBusinessMessageUpdate, DeleteEphemeralMessagesUpdate, DeleteMessageUpdate, DeleteStoryUpdate, Dialog, EphemeralCallbackQuery, EphemeralMessage, FactCheck, FileDownloadLocation, FileDownloadParameters, ForumTopic, FullChat, FullUser, GameHighScore, HistoryReadUpdate, InlineCallbackQuery, InlineQuery, InputChatEventFilters, InputDialogFolder, InputDocumentId, InputFileLike, InputInlineMessage, InputInlineResult, InputMediaAudio, InputMediaLike, InputMediaSticker, InputMessageId, InputPeerLike, InputPrivacyRule, InputReaction, InputRichMessage, InputStarGift, InputStickerSet, InputStickerSetItem, InputText, InputWebview, MaybeDynamic, Message, MessageEffect, MessageMedia, MessageReactions, ParametersSkip2, ParsedUpdate, Peer, PeerReaction, PeerSettings, PeerStories, Photo, Poll, PollUpdate, PollVoteUpdate, PreCheckoutQuery, RawDocument, ReplyMarkup, RichMediaUploadCache, SavedStarGift, SentCode, StarGift, StarGiftUnique, StarGiftValue, StarsStatus, StarsTransaction, Sticker, StickerSet, StickerType, StoriesStealthMode, Story, StoryInteractions, StoryUpdate, StoryViewer, StoryViewersList, TakeoutSession, TextWithEntities, TypingStatus, UploadedFile, UploadFileLike, User, UserStatusUpdate, UserTypingUpdate, WebPageMedia, WebviewResult } from './types/index.js';
34
35
  import { ParsedUpdateHandlerParams } from './updates/parsed.js';
35
36
  import { RawUpdateInfo } from './updates/types.js';
36
37
  import { InputStringSessionData } from './utils/string-session.js';
@@ -140,6 +141,14 @@ export interface TelegramClient extends ITelegramClient {
140
141
  readonly onBusinessMessageGroup: Emitter<BusinessMessage[]>;
141
142
  /** a delete business message handler */
142
143
  readonly onDeleteBusinessMessage: Emitter<DeleteBusinessMessageUpdate>;
144
+ /** a new ephemeral message handler */
145
+ readonly onNewEphemeralMessage: Emitter<EphemeralMessage>;
146
+ /** an edit ephemeral message handler */
147
+ readonly onEditEphemeralMessage: Emitter<EphemeralMessage>;
148
+ /** a delete ephemeral messages handler */
149
+ readonly onDeleteEphemeralMessages: Emitter<DeleteEphemeralMessagesUpdate>;
150
+ /** an ephemeral callback query handler */
151
+ readonly onEphemeralCallbackQuery: Emitter<EphemeralCallbackQuery>;
143
152
  /**
144
153
  * Wrap this client so that all RPC calls will use the specified parameters.
145
154
  *
@@ -177,7 +186,7 @@ export interface TelegramClient extends ITelegramClient {
177
186
  * When you log out, you can immediately log back in using
178
187
  * the same {@link TelegramClient} instance.
179
188
  *
180
- * **Available**: 👤 users only
189
+ * **Available**: both users and bots
181
190
  *
182
191
  * @returns On success, `true` is returned
183
192
  */
@@ -239,7 +248,7 @@ export interface TelegramClient extends ITelegramClient {
239
248
  /**
240
249
  * Authorize a bot using its token issued by [@BotFather](//t.me/BotFather)
241
250
  *
242
- * **Available**: 👤 users only
251
+ * **Available**: both users and bots
243
252
  *
244
253
  * @param token Bot token issued by BotFather
245
254
  * @returns Bot's {@link User} object
@@ -305,7 +314,7 @@ export interface TelegramClient extends ITelegramClient {
305
314
  * > **Note**: Using this method assumes that you
306
315
  * > are using a test DC in `primaryDc` parameter.
307
316
  *
308
- * **Available**: 👤 users only
317
+ * **Available**: both users and bots
309
318
  *
310
319
  * @param params Additional parameters
311
320
  */
@@ -420,6 +429,8 @@ export interface TelegramClient extends ITelegramClient {
420
429
  /**
421
430
  * Answer a bot guest chat query with a result.
422
431
  *
432
+ * **Available**: 🤖 bots only
433
+ *
423
434
  * @param queryId Query ID
424
435
  * @param result Result of the query
425
436
  * @returns ID of the inline message that was sent
@@ -428,7 +439,7 @@ export interface TelegramClient extends ITelegramClient {
428
439
  /**
429
440
  * Send an answer to a callback query.
430
441
  *
431
- * **Available**: 👤 users only
442
+ * **Available**: 🤖 bots only
432
443
  *
433
444
  * @param queryId ID of the callback query, or the query itself
434
445
  * @param params Parameters of the answer
@@ -468,7 +479,7 @@ export interface TelegramClient extends ITelegramClient {
468
479
  /**
469
480
  * Answer an inline query.
470
481
  *
471
- * **Available**: 👤 users only
482
+ * **Available**: 🤖 bots only
472
483
  *
473
484
  * @param queryId Inline query ID
474
485
  * @param results Results of the query
@@ -554,7 +565,7 @@ export interface TelegramClient extends ITelegramClient {
554
565
  /**
555
566
  * Answer a pre-checkout query.
556
567
  *
557
- * **Available**: 👤 users only
568
+ * **Available**: 🤖 bots only
558
569
  *
559
570
  * @param queryId Pre-checkout query ID
560
571
  */
@@ -568,7 +579,7 @@ export interface TelegramClient extends ITelegramClient {
568
579
  * Does the same as passing `null` to {@link setMyCommands}
569
580
  *
570
581
  * Learn more about scopes in the [Bot API docs](https://core.telegram.org/bots/api#botcommandscope)
571
- * **Available**: 👤 users only
582
+ * **Available**: 🤖 bots only
572
583
  *
573
584
  */
574
585
  deleteMyCommands(params?: {
@@ -585,7 +596,7 @@ export interface TelegramClient extends ITelegramClient {
585
596
  }): Promise<void>;
586
597
  /**
587
598
  * Gets information about a bot the current uzer owns (or the current bot)
588
- * **Available**: 👤 users only
599
+ * **Available**: both users and bots
589
600
  *
590
601
  */
591
602
  getBotInfo(params: {
@@ -602,7 +613,7 @@ export interface TelegramClient extends ITelegramClient {
602
613
  }): Promise<tl.bots.RawBotInfo>;
603
614
  /**
604
615
  * Fetches the menu button set for the given user.
605
- * **Available**: 👤 users only
616
+ * **Available**: 🤖 bots only
606
617
  *
607
618
  */
608
619
  getBotMenuButton(user: InputPeerLike): Promise<tl.TypeBotMenuButton>;
@@ -648,7 +659,7 @@ export interface TelegramClient extends ITelegramClient {
648
659
  }): Promise<tl.messages.TypeBotCallbackAnswer>;
649
660
  /**
650
661
  * Get high scores of a game
651
- * **Available**: 👤 users only
662
+ * **Available**: 🤖 bots only
652
663
  *
653
664
  */
654
665
  getGameHighScores(params: InputMessageId & {
@@ -658,7 +669,7 @@ export interface TelegramClient extends ITelegramClient {
658
669
  /**
659
670
  * Get high scores of a game from an inline message
660
671
  *
661
- * **Available**: 👤 users only
672
+ * **Available**: 🤖 bots only
662
673
  *
663
674
  * @param messageId ID of the inline message containing the game
664
675
  * @param userId ID of the user to find high scores for
@@ -669,7 +680,7 @@ export interface TelegramClient extends ITelegramClient {
669
680
  * and user language. If they are not set, empty set is returned.
670
681
  *
671
682
  * Learn more about scopes in the [Bot API docs](https://core.telegram.org/bots/api#botcommandscope)
672
- * **Available**: 👤 users only
683
+ * **Available**: 🤖 bots only
673
684
  *
674
685
  */
675
686
  getMyCommands(params?: {
@@ -760,7 +771,7 @@ export interface TelegramClient extends ITelegramClient {
760
771
  /**
761
772
  * Prepare an inline message result to be sent later via the
762
773
  * `shareMessage` [mini-app api method](https://core.telegram.org/bots/webapps#initializing-mini-apps).
763
- * **Available**: 👤 users only
774
+ * **Available**: 🤖 bots only
764
775
  *
765
776
  */
766
777
  prepareInlineMessage(params: {
@@ -789,7 +800,7 @@ export interface TelegramClient extends ITelegramClient {
789
800
  }): Promise<tl.messages.TypeBotPreparedInlineMessage>;
790
801
  /**
791
802
  * Sets information about a bot the current uzer owns (or the current bot)
792
- * **Available**: 👤 users only
803
+ * **Available**: both users and bots
793
804
  *
794
805
  */
795
806
  setBotInfo(params: {
@@ -812,14 +823,14 @@ export interface TelegramClient extends ITelegramClient {
812
823
  }): Promise<void>;
813
824
  /**
814
825
  * Sets a menu button for the given user.
815
- * **Available**: 👤 users only
826
+ * **Available**: 🤖 bots only
816
827
  *
817
828
  */
818
829
  setBotMenuButton(user: InputPeerLike, button: tl.TypeBotMenuButton): Promise<void>;
819
830
  /**
820
831
  * Set a score of a user in a game
821
832
  *
822
- * **Available**: 👤 users only
833
+ * **Available**: 🤖 bots only
823
834
  *
824
835
  * @param params
825
836
  * @returns The modified message
@@ -849,7 +860,7 @@ export interface TelegramClient extends ITelegramClient {
849
860
  * Set a score of a user in a game contained in
850
861
  * an inline message
851
862
  *
852
- * **Available**: 👤 users only
863
+ * **Available**: 🤖 bots only
853
864
  *
854
865
  * @param params
855
866
  */
@@ -875,7 +886,7 @@ export interface TelegramClient extends ITelegramClient {
875
886
  * Set or delete commands for the current bot and the given scope
876
887
  *
877
888
  * Learn more about scopes in the [Bot API docs](https://core.telegram.org/bots/api#botcommandscope)
878
- * **Available**: 👤 users only
889
+ * **Available**: 🤖 bots only
879
890
  *
880
891
  */
881
892
  setMyCommands(params: {
@@ -898,7 +909,7 @@ export interface TelegramClient extends ITelegramClient {
898
909
  }): Promise<void>;
899
910
  /**
900
911
  * Sets the default chat permissions for the bot in the supergroup or channel.
901
- * **Available**: 👤 users only
912
+ * **Available**: 🤖 bots only
902
913
  *
903
914
  */
904
915
  setMyDefaultRights(params: {
@@ -952,7 +963,7 @@ export interface TelegramClient extends ITelegramClient {
952
963
  * When banning a channel, the user won't be able to use
953
964
  * any of their channels to post until the ban is lifted.
954
965
  *
955
- * **Available**: 👤 users only
966
+ * **Available**: both users and bots
956
967
  *
957
968
  * @returns Service message about removed user, if one was generated.
958
969
  */
@@ -1058,7 +1069,7 @@ export interface TelegramClient extends ITelegramClient {
1058
1069
  *
1059
1070
  * You must be an administrator and have the appropriate permissions.
1060
1071
  *
1061
- * **Available**: 👤 users only
1072
+ * **Available**: both users and bots
1062
1073
  *
1063
1074
  * @param chatId Chat ID or username
1064
1075
  */
@@ -1111,7 +1122,7 @@ export interface TelegramClient extends ITelegramClient {
1111
1122
  }): Promise<void>;
1112
1123
  /**
1113
1124
  * Edit supergroup/channel admin rights of a user.
1114
- * **Available**: 👤 users only
1125
+ * **Available**: both users and bots
1115
1126
  *
1116
1127
  */
1117
1128
  editAdminRights(params: {
@@ -1126,7 +1137,7 @@ export interface TelegramClient extends ITelegramClient {
1126
1137
  }): Promise<void>;
1127
1138
  /**
1128
1139
  * Edit the custom rank (title) of a group chat participant.
1129
- * **Available**: 👤 users only
1140
+ * **Available**: both users and bots
1130
1141
  *
1131
1142
  */
1132
1143
  editChatMemberRank(params: {
@@ -1199,7 +1210,7 @@ export interface TelegramClient extends ITelegramClient {
1199
1210
  /**
1200
1211
  * Get information about a single chat member
1201
1212
  *
1202
- * **Available**: 👤 users only
1213
+ * **Available**: both users and bots
1203
1214
  *
1204
1215
  * @param chatId Chat ID or username
1205
1216
  * @param userId User ID, username, phone number, `"me"` or `"self"`
@@ -1216,7 +1227,7 @@ export interface TelegramClient extends ITelegramClient {
1216
1227
  *
1217
1228
  * You can retrieve up to 200 members at once
1218
1229
  *
1219
- * **Available**: 👤 users only
1230
+ * **Available**: both users and bots
1220
1231
  *
1221
1232
  * @param chatId Chat ID or username
1222
1233
  * @param params Additional parameters
@@ -1358,7 +1369,7 @@ export interface TelegramClient extends ITelegramClient {
1358
1369
  *
1359
1370
  * Small wrapper over {@link getChatEventLog}
1360
1371
  *
1361
- * **Available**: both users and bots
1372
+ * **Available**: 👤 users only
1362
1373
  *
1363
1374
  * @param chatId Chat ID
1364
1375
  * @param params
@@ -1456,7 +1467,7 @@ export interface TelegramClient extends ITelegramClient {
1456
1467
  * > as it will probably trigger server-side limits and you might start getting transport errors
1457
1468
  * > or even get banned.
1458
1469
  *
1459
- * **Available**: both users and bots
1470
+ * **Available**: 👤 users only
1460
1471
  *
1461
1472
  * @param chat Chat to open
1462
1473
  */
@@ -1483,7 +1494,7 @@ export interface TelegramClient extends ITelegramClient {
1483
1494
  reorderUsernames(peerId: InputPeerLike, order: string[]): Promise<void>;
1484
1495
  /**
1485
1496
  * Restrict a user in a supergroup.
1486
- * **Available**: 👤 users only
1497
+ * **Available**: both users and bots
1487
1498
  *
1488
1499
  */
1489
1500
  restrictChatMember(params: {
@@ -1557,7 +1568,7 @@ export interface TelegramClient extends ITelegramClient {
1557
1568
  *
1558
1569
  * You must be an administrator in the chat and have appropriate permissions.
1559
1570
  *
1560
- * **Available**: 👤 users only
1571
+ * **Available**: both users and bots
1561
1572
  *
1562
1573
  * @param chatId Chat ID or username
1563
1574
  * @param restrictions
@@ -1572,7 +1583,7 @@ export interface TelegramClient extends ITelegramClient {
1572
1583
  *
1573
1584
  * You must be an administrator and have the appropriate permissions.
1574
1585
  *
1575
- * **Available**: 👤 users only
1586
+ * **Available**: both users and bots
1576
1587
  *
1577
1588
  * @param chatId Chat ID or username
1578
1589
  * @param description New chat description, 0-255 characters
@@ -1582,7 +1593,7 @@ export interface TelegramClient extends ITelegramClient {
1582
1593
  * Set a new chat photo or video.
1583
1594
  *
1584
1595
  * You must be an administrator and have the appropriate permissions.
1585
- * **Available**: 👤 users only
1596
+ * **Available**: both users and bots
1586
1597
  *
1587
1598
  */
1588
1599
  setChatPhoto(params: {
@@ -1603,7 +1614,7 @@ export interface TelegramClient extends ITelegramClient {
1603
1614
  *
1604
1615
  * You must be an administrator and have the appropriate permissions.
1605
1616
  *
1606
- * **Available**: 👤 users only
1617
+ * **Available**: both users and bots
1607
1618
  *
1608
1619
  * @param chatId Chat ID or username
1609
1620
  * @param title New chat title, 1-255 characters
@@ -1728,7 +1739,7 @@ export interface TelegramClient extends ITelegramClient {
1728
1739
  * just allows the user to join the chat again, if they want.
1729
1740
  *
1730
1741
  * This method acts as a no-op in case a legacy group is passed.
1731
- * **Available**: 👤 users only
1742
+ * **Available**: both users and bots
1732
1743
  *
1733
1744
  */
1734
1745
  unbanChatMember(params: {
@@ -1744,7 +1755,7 @@ export interface TelegramClient extends ITelegramClient {
1744
1755
  * just allows the user to join the chat again, if they want.
1745
1756
  *
1746
1757
  * This method acts as a no-op in case a legacy group is passed.
1747
- * **Available**: 👤 users only
1758
+ * **Available**: both users and bots
1748
1759
  *
1749
1760
  */
1750
1761
  unrestrictChatMember(params: {
@@ -1753,6 +1764,126 @@ export interface TelegramClient extends ITelegramClient {
1753
1764
  /** User/channel ID who should be unbanned */
1754
1765
  participantId: InputPeerLike;
1755
1766
  }): Promise<void>;
1767
+ /**
1768
+ * Ban a participant from a community
1769
+ */
1770
+ banCommunityParticipant(params: {
1771
+ /** Community ID */
1772
+ communityId: InputPeerLike;
1773
+ /** Participant to ban */
1774
+ participantId: InputPeerLike;
1775
+ }): Promise<void>;
1776
+ /**
1777
+ * Unban a participant from a community
1778
+ */
1779
+ unbanCommunityParticipant(params: {
1780
+ /** Community ID */
1781
+ communityId: InputPeerLike;
1782
+ /** Participant to unban */
1783
+ participantId: InputPeerLike;
1784
+ }): Promise<void>;
1785
+ /**
1786
+ * Create a new community
1787
+ *
1788
+ * @returns Newly created community
1789
+ */
1790
+ createCommunity(params: {
1791
+ /** Community title */
1792
+ title: string;
1793
+ /** Chat to link to the community */
1794
+ chatId: InputPeerLike;
1795
+ /** Community description */
1796
+ about?: string;
1797
+ /** Whether the community should be hidden */
1798
+ hidden?: boolean;
1799
+ /**
1800
+ * Whether to dispatch the returned updates
1801
+ * to the client's update handler.
1802
+ */
1803
+ shouldDispatch?: true;
1804
+ }): Promise<Chat>;
1805
+ /**
1806
+ * Get pending peer link requests for a community
1807
+ *
1808
+ * @param communityId Community ID
1809
+ */
1810
+ getCommunityLinkRequests(communityId: InputPeerLike, params?: {
1811
+ /** Offset for pagination */
1812
+ offset?: string;
1813
+ /**
1814
+ * Maximum number of requests to fetch
1815
+ *
1816
+ * @default 100
1817
+ */
1818
+ limit?: number;
1819
+ }): Promise<ArrayPaginated<CommunityPeerRequest, string>>;
1820
+ /**
1821
+ * Get chats linked to a community that the given participant has joined or created
1822
+ */
1823
+ getCommunityParticipantChats(params: {
1824
+ /** Community ID */
1825
+ communityId: InputPeerLike;
1826
+ /** Participant to fetch the chats for */
1827
+ participantId: InputPeerLike;
1828
+ }): Promise<CommunityParticipantChats>;
1829
+ /**
1830
+ * Get a list of communities the current user has joined
1831
+ */
1832
+ getJoinedCommunities(): Promise<Chat[]>;
1833
+ /**
1834
+ * Approve or decline a peer link request to a community
1835
+ */
1836
+ hideCommunityLinkRequest(params: {
1837
+ /** Community ID */
1838
+ communityId: InputPeerLike;
1839
+ /** Peer whose link request should be approved/declined */
1840
+ peerId: InputPeerLike;
1841
+ /** Whether to approve or decline the request */
1842
+ action: 'approve' | 'decline';
1843
+ }): Promise<void>;
1844
+ /**
1845
+ * Approve or decline all pending peer link requests to a community
1846
+ */
1847
+ hideAllCommunityLinkRequests(params: {
1848
+ /** Community ID */
1849
+ communityId: InputPeerLike;
1850
+ /** Whether to approve or decline the requests */
1851
+ action: 'approve' | 'decline';
1852
+ }): Promise<void>;
1853
+ /**
1854
+ * Link a chat to a community, or update the visibility of an existing link
1855
+ */
1856
+ linkCommunityPeer(params: {
1857
+ /** Community ID */
1858
+ communityId: InputPeerLike;
1859
+ /** Chat to link to the community */
1860
+ peerId: InputPeerLike;
1861
+ /** Whether the chat should be hidden in the community's peer list */
1862
+ hidden?: boolean;
1863
+ }): Promise<void>;
1864
+ /**
1865
+ * Unlink a chat from a community
1866
+ */
1867
+ unlinkCommunityPeer(params: {
1868
+ /** Community ID */
1869
+ communityId: InputPeerLike;
1870
+ /** Chat to unlink from the community */
1871
+ peerId: InputPeerLike;
1872
+ }): Promise<void>;
1873
+ /**
1874
+ * Toggle whether a community is collapsed in the dialogs list
1875
+ */
1876
+ toggleCommunityCollapsed(params: {
1877
+ /** Community ID */
1878
+ communityId: InputPeerLike;
1879
+ /** Whether the community should be collapsed */
1880
+ collapsed: boolean;
1881
+ /**
1882
+ * Whether to dispatch the returned updates
1883
+ * to the client's update handler.
1884
+ */
1885
+ shouldDispatch?: true;
1886
+ }): Promise<void>;
1756
1887
  /**
1757
1888
  * Add an existing Telegram user as a contact
1758
1889
  * **Available**: 👤 users only
@@ -1875,7 +2006,7 @@ export interface TelegramClient extends ITelegramClient {
1875
2006
  * > accurate since you can set the same title and/or emoji
1876
2007
  * > to multiple folders.
1877
2008
  *
1878
- * **Available**: both users and bots
2009
+ * **Available**: 👤 users only
1879
2010
  *
1880
2011
  * @param params Search parameters. At least one must be set.
1881
2012
  */
@@ -2032,6 +2163,90 @@ export interface TelegramClient extends ITelegramClient {
2032
2163
  * @param order New order of folders (folder IDs, where default = 0)
2033
2164
  */
2034
2165
  setFoldersOrder(order: number[]): Promise<void>;
2166
+ /**
2167
+ * Delete a previously sent ephemeral message
2168
+ */
2169
+ deleteEphemeralMessage(params: {
2170
+ /** Chat where the message was sent */
2171
+ chatId: InputPeerLike;
2172
+ /** User the message is visible to */
2173
+ receiverId: InputPeerLike;
2174
+ /** ID of the message to delete */
2175
+ messageId: number;
2176
+ }): Promise<void>;
2177
+ /**
2178
+ * Edit a previously sent ephemeral message
2179
+ */
2180
+ editEphemeralMessage(params: {
2181
+ /** Chat where the message was sent */
2182
+ chatId: InputPeerLike;
2183
+ /** User the message is visible to */
2184
+ receiverId: InputPeerLike;
2185
+ /** ID of the message to edit */
2186
+ messageId: number;
2187
+ /** New text of the message */
2188
+ text?: InputText;
2189
+ /** New media of the message */
2190
+ media?: InputMediaLike;
2191
+ /** New reply markup of the message */
2192
+ replyMarkup?: ReplyMarkup;
2193
+ /**
2194
+ * Whether to dispatch the returned updates
2195
+ * to the client's update handler.
2196
+ */
2197
+ shouldDispatch?: true;
2198
+ }): Promise<EphemeralMessage>;
2199
+ /**
2200
+ * Request a callback answer from a bot for an ephemeral message,
2201
+ * i.e. click an inline button that contains data.
2202
+ */
2203
+ getEphemeralCallbackAnswer(params: {
2204
+ /** Chat where the ephemeral message was sent */
2205
+ chatId: InputPeerLike;
2206
+ /** ID of the ephemeral message containing the button */
2207
+ messageId: number;
2208
+ /** Data contained in the button */
2209
+ data?: string | Uint8Array;
2210
+ /**
2211
+ * Timeout for the query in ms.
2212
+ *
2213
+ * @default `10000` (10 sec)
2214
+ */
2215
+ timeout?: number;
2216
+ /**
2217
+ * Whether to "fire and forget" this request,
2218
+ * in which case the promise will resolve as soon
2219
+ * as the request is sent with an empty response.
2220
+ *
2221
+ * **Note**: any errors will be silently ignored.
2222
+ */
2223
+ fireAndForget?: boolean;
2224
+ }): Promise<tl.messages.TypeBotCallbackAnswer>;
2225
+ /**
2226
+ * Send an ephemeral message — a message that is only visible
2227
+ * to a single user in a chat and is not persisted in the chat history.
2228
+ *
2229
+ * @param chatId ID of the chat to send the message to
2230
+ * @param receiverId ID of the user the message should be visible to
2231
+ * @param text Text of the message
2232
+ */
2233
+ sendEphemeralMessage(chatId: InputPeerLike, receiverId: InputPeerLike, text: InputText, params?: {
2234
+ /** Media to be attached to the message */
2235
+ media?: InputMediaLike;
2236
+ /** Message to reply to */
2237
+ replyTo?: number;
2238
+ /** Ephemeral message to reply to */
2239
+ replyToEphemeral?: number;
2240
+ /** Reply markup to be attached to the message */
2241
+ replyMarkup?: ReplyMarkup;
2242
+ /** For guest chat bots, ID of the query that this message is sent in response to */
2243
+ queryId?: tl.Long;
2244
+ /**
2245
+ * Whether to dispatch the returned updates
2246
+ * to the client's update handler.
2247
+ */
2248
+ shouldDispatch?: true;
2249
+ }): Promise<EphemeralMessage>;
2035
2250
  /**
2036
2251
  * Download a file and return its contents as a Buffer.
2037
2252
  *
@@ -2046,7 +2261,7 @@ export interface TelegramClient extends ITelegramClient {
2046
2261
  /**
2047
2262
  * Download a single chunk of a file, using [`precise`](https://core.telegram.org/api/files#downloading-files) download mode
2048
2263
  *
2049
- * **Available**: 👤 users only
2264
+ * **Available**: both users and bots
2050
2265
  *
2051
2266
  * @param params Download parameters
2052
2267
  */
@@ -2092,7 +2307,7 @@ export interface TelegramClient extends ITelegramClient {
2092
2307
  * in chunks of a given size. Order of the chunks is guaranteed to be
2093
2308
  * consecutive.
2094
2309
  *
2095
- * **Available**: 👤 users only
2310
+ * **Available**: both users and bots
2096
2311
  *
2097
2312
  * @param params Download parameters
2098
2313
  */
@@ -2150,7 +2365,7 @@ export interface TelegramClient extends ITelegramClient {
2150
2365
  /**
2151
2366
  * Normalize an {@link InputMediaLike} to `InputMedia`,
2152
2367
  * uploading the file if needed.
2153
- * **Available**: 👤 users only
2368
+ * **Available**: both users and bots
2154
2369
  *
2155
2370
  */
2156
2371
  _normalizeInputMedia(media: InputMediaLike, params?: {
@@ -2240,7 +2455,7 @@ export interface TelegramClient extends ITelegramClient {
2240
2455
  * the returned object will act like a message media
2241
2456
  * and contain fields like File ID.
2242
2457
  *
2243
- * **Available**: 👤 users only
2458
+ * **Available**: both users and bots
2244
2459
  *
2245
2460
  * @param media Media to upload
2246
2461
  * @param [params={}] Upload parameters
@@ -2254,7 +2469,14 @@ export interface TelegramClient extends ITelegramClient {
2254
2469
  *
2255
2470
  * Only admins with `manageTopics` permission can do this.
2256
2471
  *
2257
- * **Available**: 👤 users only
2472
+ * > **Note**: for bots in private chats with "threaded mode" enabled,
2473
+ * > message IDs are separate for each side of the chat, while the
2474
+ * > canonical topic ID is always issued in the *user's* ID space.
2475
+ * > The `.id` of the returned service message is in the *bot's* ID space,
2476
+ * > and is **not** a valid topic ID — use `.replyToMessage.threadId` instead,
2477
+ * > which is what all other methods (as well as Bot API's `message_thread_id`) expect.
2478
+ *
2479
+ * **Available**: ✅ both users and bots
2258
2480
  *
2259
2481
  * @returns Service message for the created topic
2260
2482
  */
@@ -2287,10 +2509,10 @@ export interface TelegramClient extends ITelegramClient {
2287
2509
  /**
2288
2510
  * Delete a forum topic and all its history
2289
2511
  *
2290
- * **Available**: 👤 users only
2512
+ * **Available**: both users and bots
2291
2513
  *
2292
2514
  * @param chat Chat or user ID, username, phone number, `"me"` or `"self"`
2293
- * @param topicId ID of the topic (i.e. its top message ID)
2515
+ * @param topicId ID of the topic (i.e. its top message ID, see note at {@link createForumTopic})
2294
2516
  */
2295
2517
  deleteForumTopicHistory(chat: InputPeerLike, topicId: number | ForumTopic, params?: {
2296
2518
  /**
@@ -2304,16 +2526,16 @@ export interface TelegramClient extends ITelegramClient {
2304
2526
  *
2305
2527
  * Only admins with `manageTopics` permission can do this.
2306
2528
  *
2307
- * **Available**: 👤 users only
2529
+ * **Available**: both users and bots
2308
2530
  *
2309
2531
  * @param chatId Chat ID or username
2310
- * @param topicId ID of the topic (i.e. its top message ID)
2532
+ * @param topicId ID of the topic (i.e. its top message ID, see note at {@link createForumTopic})
2311
2533
  * @returns Service message about the modification
2312
2534
  */
2313
2535
  editForumTopic(params: {
2314
2536
  /** Chat ID or username */
2315
2537
  chatId: InputPeerLike;
2316
- /** ID of the topic (i.e. its top message ID) */
2538
+ /** ID of the topic (i.e. its top message ID, see note at {@link createForumTopic}) */
2317
2539
  topicId: number | ForumTopic;
2318
2540
  /**
2319
2541
  * New topic title
@@ -2339,11 +2561,19 @@ export interface TelegramClient extends ITelegramClient {
2339
2561
  /**
2340
2562
  * Get forum topics by their IDs
2341
2563
  *
2342
- * **Available**: 👤 users only
2564
+ * The returned array is aligned with the input IDs.
2565
+ * For topics that were deleted (or never existed),
2566
+ * `null` will be returned at that position.
2567
+ *
2568
+ * > **Note**: for bots in private chats with "threaded mode" enabled,
2569
+ * > only canonical (user-space) topic IDs are accepted —
2570
+ * > see the note at {@link createForumTopic}
2571
+ *
2572
+ * **Available**: ✅ both users and bots
2343
2573
  *
2344
2574
  * @param chatId Chat ID or username
2345
2575
  */
2346
- getForumTopicsById(chatId: InputPeerLike, ids: MaybeArray<number>): Promise<ForumTopic[]>;
2576
+ getForumTopicsById(chatId: InputPeerLike, ids: MaybeArray<number>): Promise<(ForumTopic | null)[]>;
2347
2577
  /**
2348
2578
  * Get forum topics
2349
2579
  *
@@ -2370,7 +2600,7 @@ export interface TelegramClient extends ITelegramClient {
2370
2600
  /**
2371
2601
  * Iterate over forum topics. Wrapper over {@link getForumTopics}.
2372
2602
  *
2373
- * **Available**: both users and bots
2603
+ * **Available**: 👤 users only
2374
2604
  *
2375
2605
  * @param chatId Chat ID or username
2376
2606
  */
@@ -2410,14 +2640,14 @@ export interface TelegramClient extends ITelegramClient {
2410
2640
  *
2411
2641
  * Only admins with `manageTopics` permission can do this.
2412
2642
  *
2413
- * **Available**: 👤 users only
2643
+ * **Available**: both users and bots
2414
2644
  *
2415
2645
  * @returns Service message about the modification
2416
2646
  */
2417
2647
  toggleForumTopicClosed(parmas: {
2418
2648
  /** Chat ID or username */
2419
2649
  chatId: InputPeerLike;
2420
- /** ID of the topic (i.e. its top message ID) */
2650
+ /** ID of the topic (i.e. its top message ID, see note at {@link createForumTopic}) */
2421
2651
  topicId: number | ForumTopic;
2422
2652
  /** Whether the topic should be closed */
2423
2653
  closed: boolean;
@@ -2437,7 +2667,7 @@ export interface TelegramClient extends ITelegramClient {
2437
2667
  toggleForumTopicPinned(params: {
2438
2668
  /** Chat ID or username */
2439
2669
  chatId: InputPeerLike;
2440
- /** ID of the topic (i.e. its top message ID) */
2670
+ /** ID of the topic (i.e. its top message ID, see note at {@link createForumTopic}) */
2441
2671
  topicId: number | ForumTopic;
2442
2672
  /** Whether the topic should be pinned */
2443
2673
  pinned: boolean;
@@ -2462,7 +2692,7 @@ export interface TelegramClient extends ITelegramClient {
2462
2692
  *
2463
2693
  * Only admins with `manageTopics` permission can do this.
2464
2694
  *
2465
- * **Available**: 👤 users only
2695
+ * **Available**: both users and bots
2466
2696
  *
2467
2697
  * @returns Service message about the modification
2468
2698
  */
@@ -2543,7 +2773,7 @@ export interface TelegramClient extends ITelegramClient {
2543
2773
  * Get a list of saved star gifts of a user/channel
2544
2774
  *
2545
2775
  * Note that filters currently only work for channels
2546
- * **Available**: 👤 users only
2776
+ * **Available**: both users and bots
2547
2777
  *
2548
2778
  */
2549
2779
  getSavedStarGifts(params: {
@@ -2610,7 +2840,7 @@ export interface TelegramClient extends ITelegramClient {
2610
2840
  /**
2611
2841
  * Iterate over saved star gifts of a user,
2612
2842
  * wrapper over {@link getSavedStarGifts}
2613
- * **Available**: 👤 users only
2843
+ * **Available**: both users and bots
2614
2844
  *
2615
2845
  */
2616
2846
  iterSavedStarGifts(params: Parameters<typeof getSavedStarGifts>[1] & {
@@ -2646,7 +2876,7 @@ export interface TelegramClient extends ITelegramClient {
2646
2876
  * > For GUI clients, you should refer to the method's source code and
2647
2877
  * > present the payment form to the user.
2648
2878
  *
2649
- * **Available**: 👤 users only
2879
+ * **Available**: both users and bots
2650
2880
  *
2651
2881
  * @returns Service message about the payment for the upgrade, if one was generated.
2652
2882
  */
@@ -2663,7 +2893,7 @@ export interface TelegramClient extends ITelegramClient {
2663
2893
  /**
2664
2894
  * Accept or decline a purchase offer for a star gift
2665
2895
  *
2666
- * **Available**: 👤 users only
2896
+ * **Available**: both users and bots
2667
2897
  *
2668
2898
  * @returns The generated service message
2669
2899
  */
@@ -2710,7 +2940,7 @@ export interface TelegramClient extends ITelegramClient {
2710
2940
  * > For GUI clients, you should refer to the method's source code and
2711
2941
  * > present the payment form to the user.
2712
2942
  *
2713
- * **Available**: 👤 users only
2943
+ * **Available**: both users and bots
2714
2944
  *
2715
2945
  * @returns Service message about the sent gift, if one was generated.
2716
2946
  */
@@ -2797,7 +3027,7 @@ export interface TelegramClient extends ITelegramClient {
2797
3027
  *
2798
3028
  * You must be an administrator and have appropriate rights.
2799
3029
  *
2800
- * **Available**: 👤 users only
3030
+ * **Available**: both users and bots
2801
3031
  *
2802
3032
  * @param chatId Chat ID
2803
3033
  * @param params
@@ -2835,7 +3065,7 @@ export interface TelegramClient extends ITelegramClient {
2835
3065
  *
2836
3066
  * Only pass the fields that you want to modify.
2837
3067
  *
2838
- * **Available**: 👤 users only
3068
+ * **Available**: both users and bots
2839
3069
  *
2840
3070
  * @param chatId Chat ID
2841
3071
  * @param link Invite link to edit
@@ -2872,7 +3102,7 @@ export interface TelegramClient extends ITelegramClient {
2872
3102
  * > **Note**: each administrator has their own primary invite link,
2873
3103
  * > and bots by default don't have one.
2874
3104
  *
2875
- * **Available**: 👤 users only
3105
+ * **Available**: both users and bots
2876
3106
  *
2877
3107
  * @param chatId Chat IDs
2878
3108
  */
@@ -2988,7 +3218,7 @@ export interface TelegramClient extends ITelegramClient {
2988
3218
  }): Promise<void>;
2989
3219
  /**
2990
3220
  * Approve or decline join request to a chat.
2991
- * **Available**: 👤 users only
3221
+ * **Available**: both users and bots
2992
3222
  *
2993
3223
  */
2994
3224
  hideJoinRequest(params: {
@@ -3003,7 +3233,7 @@ export interface TelegramClient extends ITelegramClient {
3003
3233
  * Iterate over users who have joined
3004
3234
  * the chat with the given invite link.
3005
3235
  *
3006
- * **Available**: both users and bots
3236
+ * **Available**: 👤 users only
3007
3237
  *
3008
3238
  * @param chatId Chat ID
3009
3239
  * @param params Additional params
@@ -3030,7 +3260,7 @@ export interface TelegramClient extends ITelegramClient {
3030
3260
  * (i.e. `adminId = "self"`), as a creator you can get
3031
3261
  * any other admin's links.
3032
3262
  *
3033
- * **Available**: both users and bots
3263
+ * **Available**: 👤 users only
3034
3264
  *
3035
3265
  * @param chatId Chat ID
3036
3266
  * @param adminId Admin who created the links
@@ -3055,7 +3285,7 @@ export interface TelegramClient extends ITelegramClient {
3055
3285
  * If `link` is a primary invite link, a new invite link will be
3056
3286
  * generated automatically by Telegram
3057
3287
  *
3058
- * **Available**: 👤 users only
3288
+ * **Available**: both users and bots
3059
3289
  *
3060
3290
  * @param chatId Chat ID
3061
3291
  * @param link Invite link to revoke
@@ -3083,7 +3313,7 @@ export interface TelegramClient extends ITelegramClient {
3083
3313
  *
3084
3314
  * Once closed, poll can't be re-opened, and nobody
3085
3315
  * will be able to vote in it
3086
- * **Available**: 👤 users only
3316
+ * **Available**: both users and bots
3087
3317
  *
3088
3318
  */
3089
3319
  closePoll(params: InputMessageId & {
@@ -3096,7 +3326,7 @@ export interface TelegramClient extends ITelegramClient {
3096
3326
  /**
3097
3327
  * Create a streaming rich message draft
3098
3328
  *
3099
- * **Available**: 👤 users only
3329
+ * **Available**: both users and bots
3100
3330
  *
3101
3331
  * @param chatId Chat ID
3102
3332
  * @param params
@@ -3124,7 +3354,7 @@ export interface TelegramClient extends ITelegramClient {
3124
3354
  /**
3125
3355
  * Create a streaming text message draft
3126
3356
  *
3127
- * **Available**: 👤 users only
3357
+ * **Available**: both users and bots
3128
3358
  *
3129
3359
  * @param chatId Chat ID
3130
3360
  * @param params
@@ -3151,7 +3381,7 @@ export interface TelegramClient extends ITelegramClient {
3151
3381
  /**
3152
3382
  * Delete messages by their IDs
3153
3383
  *
3154
- * **Available**: 👤 users only
3384
+ * **Available**: both users and bots
3155
3385
  *
3156
3386
  * @param chatId Chat's marked ID, its username, phone or `"me"` or `"self"`.
3157
3387
  * @param ids Message(s) ID(s) to delete.
@@ -3177,7 +3407,7 @@ export interface TelegramClient extends ITelegramClient {
3177
3407
  /**
3178
3408
  * Edit sent inline message text, media and reply markup.
3179
3409
  *
3180
- * **Available**: 👤 users only
3410
+ * **Available**: both users and bots
3181
3411
  *
3182
3412
  * @param messageId
3183
3413
  * Inline message ID, either as a TL object, or as a
@@ -3227,7 +3457,7 @@ export interface TelegramClient extends ITelegramClient {
3227
3457
  /**
3228
3458
  * Edit message text, media, reply markup and schedule date.
3229
3459
  *
3230
- * **Available**: 👤 users only
3460
+ * **Available**: both users and bots
3231
3461
  *
3232
3462
  * @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
3233
3463
  * @param message Message or its ID
@@ -3283,7 +3513,7 @@ export interface TelegramClient extends ITelegramClient {
3283
3513
  * Forward one or more messages by their IDs.
3284
3514
  * You can forward no more than 100 messages at once.
3285
3515
  *
3286
- * **Available**: 👤 users only
3516
+ * **Available**: both users and bots
3287
3517
  *
3288
3518
  * @param toChatId Destination chat ID, username, phone, `"me"` or `"self"`
3289
3519
  * @param fromChatId Source chat ID, username, phone, `"me"` or `"self"`
@@ -3451,7 +3681,7 @@ export interface TelegramClient extends ITelegramClient {
3451
3681
  * > (that weren't sent by the user) once every 15-30 seconds,
3452
3682
  * > but only if `message.reactions` is set
3453
3683
  *
3454
- * **Available**: both users and bots
3684
+ * **Available**: 👤 users only
3455
3685
  *
3456
3686
  * @param chatId ID of the chat with messages
3457
3687
  * @param messages Message IDs
@@ -3468,7 +3698,7 @@ export interface TelegramClient extends ITelegramClient {
3468
3698
  * For messages that were not found, `null` will be
3469
3699
  * returned at that position.
3470
3700
  *
3471
- * **Available**: 👤 users only
3701
+ * **Available**: both users and bots
3472
3702
  *
3473
3703
  * @param messageIds Messages IDs
3474
3704
  * @param [fromReply]
@@ -3547,7 +3777,7 @@ export interface TelegramClient extends ITelegramClient {
3547
3777
  /**
3548
3778
  * Iterate over chat history. Wrapper over {@link getHistory}
3549
3779
  *
3550
- * **Available**: both users and bots
3780
+ * **Available**: 👤 users only
3551
3781
  *
3552
3782
  * @param chatId Chat's marked ID, its username, phone or `"me"` or `"self"`.
3553
3783
  * @param params Additional fetch parameters
@@ -3571,7 +3801,7 @@ export interface TelegramClient extends ITelegramClient {
3571
3801
  *
3572
3802
  * Wrapper over {@link getReactionUsers}.
3573
3803
  *
3574
- * **Available**: both users and bots
3804
+ * **Available**: 👤 users only
3575
3805
  *
3576
3806
  * @param chatId Chat ID
3577
3807
  * @param messageId Message ID
@@ -3598,7 +3828,7 @@ export interface TelegramClient extends ITelegramClient {
3598
3828
  *
3599
3829
  * **Note**: Due to Telegram limitations, you can only get up to ~10000 messages
3600
3830
  *
3601
- * **Available**: both users and bots
3831
+ * **Available**: 👤 users only
3602
3832
  *
3603
3833
  * @param params Search parameters
3604
3834
  */
@@ -3622,7 +3852,7 @@ export interface TelegramClient extends ITelegramClient {
3622
3852
  *
3623
3853
  * Iterable version of {@link searchMessages}
3624
3854
  *
3625
- * **Available**: both users and bots
3855
+ * **Available**: 👤 users only
3626
3856
  *
3627
3857
  * @param chatId Chat's marked ID, its username, phone or `"me"` or `"self"`.
3628
3858
  * @param params Additional search parameters
@@ -3648,7 +3878,7 @@ export interface TelegramClient extends ITelegramClient {
3648
3878
  * For supergroups/channels, you must have appropriate permissions,
3649
3879
  * either as an admin, or as default permissions
3650
3880
  *
3651
- * **Available**: 👤 users only
3881
+ * **Available**: both users and bots
3652
3882
  *
3653
3883
  * @returns Service message about pinned message, if one was generated.
3654
3884
  */
@@ -3765,7 +3995,7 @@ export interface TelegramClient extends ITelegramClient {
3765
3995
  *
3766
3996
  * Iterable version of {@link searchHashtag}
3767
3997
  *
3768
- * **Available**: both users and bots
3998
+ * **Available**: 👤 users only
3769
3999
  *
3770
4000
  * @param hashtag Hashtag to search for
3771
4001
  * @param params Additional parameters
@@ -3908,7 +4138,7 @@ export interface TelegramClient extends ITelegramClient {
3908
4138
  * If this is a normal message (not a channel post),
3909
4139
  * a simple reply will be sent.
3910
4140
  *
3911
- * **Available**: both users and bots
4141
+ * **Available**: 👤 users only
3912
4142
  *
3913
4143
  * @throws MtArgumentError
3914
4144
  * If this is a channel post which does not have comments section.
@@ -3921,7 +4151,7 @@ export interface TelegramClient extends ITelegramClient {
3921
4151
  * If this is a normal message (not a channel post),
3922
4152
  * a simple reply will be sent.
3923
4153
  *
3924
- * **Available**: both users and bots
4154
+ * **Available**: 👤 users only
3925
4155
  *
3926
4156
  * @throws MtArgumentError
3927
4157
  * If this is a channel post which does not have comments section.
@@ -3934,7 +4164,7 @@ export interface TelegramClient extends ITelegramClient {
3934
4164
  * If this is a normal message (not a channel post),
3935
4165
  * a simple reply will be sent.
3936
4166
  *
3937
- * **Available**: both users and bots
4167
+ * **Available**: 👤 users only
3938
4168
  *
3939
4169
  * @throws MtArgumentError
3940
4170
  * If this is a channel post which does not have comments section.
@@ -3980,7 +4210,7 @@ export interface TelegramClient extends ITelegramClient {
3980
4210
  * To add a caption to the group, add caption to the first
3981
4211
  * media in the group and don't add caption for any other.
3982
4212
  *
3983
- * **Available**: 👤 users only
4213
+ * **Available**: both users and bots
3984
4214
  *
3985
4215
  * @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
3986
4216
  * @param medias Medias contained in the message.
@@ -4009,7 +4239,7 @@ export interface TelegramClient extends ITelegramClient {
4009
4239
  /**
4010
4240
  * Send a single media (a photo or a document-based media)
4011
4241
  *
4012
- * **Available**: 👤 users only
4242
+ * **Available**: both users and bots
4013
4243
  *
4014
4244
  * @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
4015
4245
  * @param media
@@ -4099,7 +4329,7 @@ export interface TelegramClient extends ITelegramClient {
4099
4329
  /**
4100
4330
  * Send or remove a reaction.
4101
4331
  *
4102
- * **Available**: 👤 users only
4332
+ * **Available**: both users and bots
4103
4333
  *
4104
4334
  * @returns
4105
4335
  * Message to which the reaction was sent, if available.
@@ -4125,7 +4355,7 @@ export interface TelegramClient extends ITelegramClient {
4125
4355
  /**
4126
4356
  * Send a rich message
4127
4357
  *
4128
- * **Available**: 👤 users only
4358
+ * **Available**: both users and bots
4129
4359
  *
4130
4360
  * @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
4131
4361
  * @param params Rich message contents and additional sending parameters
@@ -4171,7 +4401,7 @@ export interface TelegramClient extends ITelegramClient {
4171
4401
  /**
4172
4402
  * Send a text message
4173
4403
  *
4174
- * **Available**: 👤 users only
4404
+ * **Available**: both users and bots
4175
4405
  *
4176
4406
  * @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
4177
4407
  * @param text Text of the message
@@ -4207,7 +4437,7 @@ export interface TelegramClient extends ITelegramClient {
4207
4437
  *
4208
4438
  * If you need a continuous typing status, use {@link setTyping} instead.
4209
4439
  *
4210
- * **Available**: 👤 users only
4440
+ * **Available**: both users and bots
4211
4441
  *
4212
4442
  * @param chatId Chat ID
4213
4443
  * @param [status='typing'] Typing status
@@ -4246,7 +4476,7 @@ export interface TelegramClient extends ITelegramClient {
4246
4476
  *
4247
4477
  * This status is automatically renewed by mtcute until a further
4248
4478
  * call with `cancel` is made, or a message is sent to the chat.
4249
- * **Available**: 👤 users only
4479
+ * **Available**: both users and bots
4250
4480
  *
4251
4481
  */
4252
4482
  setTyping(params: {
@@ -4312,7 +4542,7 @@ export interface TelegramClient extends ITelegramClient {
4312
4542
  /**
4313
4543
  * Unpin all pinned messages in a chat.
4314
4544
  *
4315
- * **Available**: 👤 users only
4545
+ * **Available**: both users and bots
4316
4546
  *
4317
4547
  * @param chatId Chat or user ID
4318
4548
  */
@@ -4333,7 +4563,7 @@ export interface TelegramClient extends ITelegramClient {
4333
4563
  * For supergroups/channels, you must have appropriate permissions,
4334
4564
  * either as an admin, or as default permissions
4335
4565
  *
4336
- * **Available**: 👤 users only
4566
+ * **Available**: both users and bots
4337
4567
  *
4338
4568
  * @param chatId Chat ID, username, phone number, `"self"` or `"me"`
4339
4569
  * @param messageId Message ID
@@ -4430,7 +4660,7 @@ export interface TelegramClient extends ITelegramClient {
4430
4660
  /**
4431
4661
  * Check if the current user can apply boost to some channel
4432
4662
  *
4433
- * **Available**: both users and bots
4663
+ * **Available**: 👤 users only
4434
4664
  *
4435
4665
  * @returns
4436
4666
  * - `{ can: true }` if the user can apply boost
@@ -4528,7 +4758,7 @@ export interface TelegramClient extends ITelegramClient {
4528
4758
  * You can either pass `self` to get your own transactions,
4529
4759
  * or a chat/bot ID to get transactions of that peer.
4530
4760
  *
4531
- * **Available**: 👤 users only
4761
+ * **Available**: both users and bots
4532
4762
  *
4533
4763
  * @param peerId Peer ID
4534
4764
  * @param params Additional parameters
@@ -4561,7 +4791,7 @@ export interface TelegramClient extends ITelegramClient {
4561
4791
  * Iterate over boosters of a channel.
4562
4792
  *
4563
4793
  * Wrapper over {@link getBoosters}
4564
- * **Available**: both users and bots
4794
+ * **Available**: 👤 users only
4565
4795
  *
4566
4796
  */
4567
4797
  iterBoosters(peerId: InputPeerLike, params?: Parameters<typeof getBoosts>[2] & {
@@ -4650,7 +4880,7 @@ export interface TelegramClient extends ITelegramClient {
4650
4880
  *
4651
4881
  * For bots the sticker set must have been created by this bot.
4652
4882
  *
4653
- * **Available**: 👤 users only
4883
+ * **Available**: both users and bots
4654
4884
  *
4655
4885
  * @param setId Sticker set short name or TL object with input sticker set
4656
4886
  * @param sticker Sticker to be added
@@ -4669,7 +4899,7 @@ export interface TelegramClient extends ITelegramClient {
4669
4899
  /**
4670
4900
  * Create a new sticker set.
4671
4901
  *
4672
- * **Available**: 👤 users only
4902
+ * **Available**: both users and bots
4673
4903
  *
4674
4904
  * @param params
4675
4905
  * @returns Newly created sticker set
@@ -4737,7 +4967,7 @@ export interface TelegramClient extends ITelegramClient {
4737
4967
  *
4738
4968
  * For bots the sticker set must have been created by this bot.
4739
4969
  *
4740
- * **Available**: 👤 users only
4970
+ * **Available**: both users and bots
4741
4971
  *
4742
4972
  * @param sticker
4743
4973
  * TDLib and Bot API compatible File ID, or a
@@ -4748,7 +4978,7 @@ export interface TelegramClient extends ITelegramClient {
4748
4978
  /**
4749
4979
  * Get custom emoji stickers by their IDs, or `null` if not available/found.
4750
4980
  *
4751
- * **Available**: 👤 users only
4981
+ * **Available**: both users and bots
4752
4982
  *
4753
4983
  * @param ids IDs of the stickers (as defined in {@link MessageEntity.emojiId})
4754
4984
  */
@@ -4783,7 +5013,7 @@ export interface TelegramClient extends ITelegramClient {
4783
5013
  /**
4784
5014
  * Get a sticker set and stickers inside of it.
4785
5015
  *
4786
- * **Available**: 👤 users only
5016
+ * **Available**: both users and bots
4787
5017
  *
4788
5018
  * @param setId Sticker set identifier
4789
5019
  */
@@ -4794,7 +5024,7 @@ export interface TelegramClient extends ITelegramClient {
4794
5024
  *
4795
5025
  * For bots the sticker set must have been created by this bot.
4796
5026
  *
4797
- * **Available**: 👤 users only
5027
+ * **Available**: both users and bots
4798
5028
  *
4799
5029
  * @param sticker
4800
5030
  * TDLib and Bot API compatible File ID, or a
@@ -4828,7 +5058,7 @@ export interface TelegramClient extends ITelegramClient {
4828
5058
  /**
4829
5059
  * Set group sticker set for a supergroup
4830
5060
  *
4831
- * **Available**: 👤 users only
5061
+ * **Available**: both users and bots
4832
5062
  *
4833
5063
  * @param setId Sticker set short name or a TL object with input sticker set
4834
5064
  * @param thumb Sticker set thumbnail
@@ -4839,7 +5069,7 @@ export interface TelegramClient extends ITelegramClient {
4839
5069
  /**
4840
5070
  * Set sticker set thumbnail
4841
5071
  *
4842
- * **Available**: 👤 users only
5072
+ * **Available**: both users and bots
4843
5073
  *
4844
5074
  * @param id Sticker set short name or a TL object with input sticker set
4845
5075
  * @param thumb Sticker set thumbnail
@@ -4889,7 +5119,7 @@ export interface TelegramClient extends ITelegramClient {
4889
5119
  /**
4890
5120
  * Edit a sent story
4891
5121
  *
4892
- * **Available**: 👤 users only
5122
+ * **Available**: both users and bots
4893
5123
  *
4894
5124
  * @returns Edited story
4895
5125
  */
@@ -5069,7 +5299,7 @@ export interface TelegramClient extends ITelegramClient {
5069
5299
  * Iterate over all stories (e.g. to load the top bar)
5070
5300
  *
5071
5301
  * Wrapper over {@link getAllStories}
5072
- * **Available**: both users and bots
5302
+ * **Available**: 👤 users only
5073
5303
  *
5074
5304
  */
5075
5305
  iterAllStories(params?: Parameters<typeof getAllStories>[1] & {
@@ -5082,7 +5312,7 @@ export interface TelegramClient extends ITelegramClient {
5082
5312
  }): AsyncIterableIterator<PeerStories>;
5083
5313
  /**
5084
5314
  * Iterate over profile stories. Wrapper over {@link getProfileStories}
5085
- * **Available**: both users and bots
5315
+ * **Available**: 👤 users only
5086
5316
  *
5087
5317
  */
5088
5318
  iterProfileStories(peerId: InputPeerLike, params?: Parameters<typeof getProfileStories>[2] & {
@@ -5103,7 +5333,7 @@ export interface TelegramClient extends ITelegramClient {
5103
5333
  /**
5104
5334
  * Iterate over viewers list of a story.
5105
5335
  * Wrapper over {@link getStoryViewers}
5106
- * **Available**: both users and bots
5336
+ * **Available**: 👤 users only
5107
5337
  *
5108
5338
  */
5109
5339
  iterStoryViewers(peerId: InputPeerLike, storyId: number, params?: Parameters<typeof getStoryViewers>[3] & {
@@ -5149,7 +5379,7 @@ export interface TelegramClient extends ITelegramClient {
5149
5379
  /**
5150
5380
  * Send a story
5151
5381
  *
5152
- * **Available**: 👤 users only
5382
+ * **Available**: both users and bots
5153
5383
  *
5154
5384
  * @returns Created story
5155
5385
  */
@@ -5280,7 +5510,7 @@ export interface TelegramClient extends ITelegramClient {
5280
5510
  getGlobalTtl(): Promise<number>;
5281
5511
  /**
5282
5512
  * Get currently authorized user's full information
5283
- * **Available**: 👤 users only
5513
+ * **Available**: both users and bots
5284
5514
  *
5285
5515
  */
5286
5516
  getMe(): Promise<User>;
@@ -5298,7 +5528,7 @@ export interface TelegramClient extends ITelegramClient {
5298
5528
  /**
5299
5529
  * Get a single profile picture of a user by its ID
5300
5530
  *
5301
- * **Available**: 👤 users only
5531
+ * **Available**: both users and bots
5302
5532
  *
5303
5533
  * @param userId User ID, username, phone number, `"me"` or `"self"`
5304
5534
  * @param photoId ID of the photo to fetch
@@ -5308,7 +5538,7 @@ export interface TelegramClient extends ITelegramClient {
5308
5538
  /**
5309
5539
  * Get a list of profile pictures of a user
5310
5540
  *
5311
- * **Available**: 👤 users only
5541
+ * **Available**: both users and bots
5312
5542
  *
5313
5543
  * @param userId User ID, username, phone number, `"me"` or `"self"`
5314
5544
  * @param params
@@ -5329,7 +5559,7 @@ export interface TelegramClient extends ITelegramClient {
5329
5559
  }): Promise<ArrayPaginated<Photo, number>>;
5330
5560
  /**
5331
5561
  * Get music files saved to the user's profile
5332
- * **Available**: 👤 users only
5562
+ * **Available**: both users and bots
5333
5563
  *
5334
5564
  */
5335
5565
  getSavedMusic(params: {
@@ -5471,7 +5701,7 @@ export interface TelegramClient extends ITelegramClient {
5471
5701
  * - yourself (`self`)
5472
5702
  * - supergroups or channels with enough boosts which you are an admin of
5473
5703
  * - for bots – users who gave you the appropriate permissions
5474
- * **Available**: 👤 users only
5704
+ * **Available**: both users and bots
5475
5705
  *
5476
5706
  */
5477
5707
  setEmojiStatus(params: {
@@ -5512,7 +5742,7 @@ export interface TelegramClient extends ITelegramClient {
5512
5742
  * Set a new profile photo or video for the current user.
5513
5743
  *
5514
5744
  * You can also pass a file ID or an InputPhoto to re-use existing photo.
5515
- * **Available**: 👤 users only
5745
+ * **Available**: both users and bots
5516
5746
  *
5517
5747
  */
5518
5748
  setMyProfilePhoto(params: {