@mtcute/core 0.30.3 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.cjs +85 -0
- package/client.js +85 -0
- package/highlevel/client.d.cts +411 -116
- package/highlevel/client.d.ts +411 -116
- package/highlevel/methods/auth/sign-in-qr.cjs +2 -0
- package/highlevel/methods/auth/sign-in-qr.js +2 -0
- package/highlevel/methods/auth/sign-in-qr.test.d.cts +1 -0
- package/highlevel/methods/auth/sign-in-qr.test.d.ts +1 -0
- package/highlevel/methods/chats/build-peers-index.cjs +45 -0
- package/highlevel/methods/chats/build-peers-index.d.cts +13 -0
- package/highlevel/methods/chats/build-peers-index.d.ts +13 -0
- package/highlevel/methods/chats/build-peers-index.js +40 -0
- package/highlevel/methods/chats/join-chat.cjs +1 -1
- package/highlevel/methods/chats/join-chat.d.cts +2 -1
- package/highlevel/methods/chats/join-chat.d.ts +2 -1
- package/highlevel/methods/chats/join-chat.js +1 -1
- package/highlevel/methods/chats/transfer-chat-ownership.cjs +6 -17
- package/highlevel/methods/chats/transfer-chat-ownership.js +6 -17
- package/highlevel/methods/communities/ban-community-participant.cjs +30 -0
- package/highlevel/methods/communities/ban-community-participant.d.cts +20 -0
- package/highlevel/methods/communities/ban-community-participant.d.ts +20 -0
- package/highlevel/methods/communities/ban-community-participant.js +25 -0
- package/highlevel/methods/communities/create-community.cjs +29 -0
- package/highlevel/methods/communities/create-community.d.cts +22 -0
- package/highlevel/methods/communities/create-community.d.ts +22 -0
- package/highlevel/methods/communities/create-community.js +24 -0
- package/highlevel/methods/communities/get-community-link-requests.cjs +27 -0
- package/highlevel/methods/communities/get-community-link-requests.d.cts +17 -0
- package/highlevel/methods/communities/get-community-link-requests.d.ts +17 -0
- package/highlevel/methods/communities/get-community-link-requests.js +22 -0
- package/highlevel/methods/communities/get-community-participant-chats.cjs +24 -0
- package/highlevel/methods/communities/get-community-participant-chats.d.cts +17 -0
- package/highlevel/methods/communities/get-community-participant-chats.d.ts +17 -0
- package/highlevel/methods/communities/get-community-participant-chats.js +19 -0
- package/highlevel/methods/communities/get-joined-communities.cjs +21 -0
- package/highlevel/methods/communities/get-joined-communities.d.cts +6 -0
- package/highlevel/methods/communities/get-joined-communities.d.ts +6 -0
- package/highlevel/methods/communities/get-joined-communities.js +16 -0
- package/highlevel/methods/communities/hide-community-link-request.cjs +30 -0
- package/highlevel/methods/communities/hide-community-link-request.d.cts +22 -0
- package/highlevel/methods/communities/hide-community-link-request.d.ts +22 -0
- package/highlevel/methods/communities/hide-community-link-request.js +25 -0
- package/highlevel/methods/communities/link-community-peer.cjs +32 -0
- package/highlevel/methods/communities/link-community-peer.d.cts +22 -0
- package/highlevel/methods/communities/link-community-peer.d.ts +22 -0
- package/highlevel/methods/communities/link-community-peer.js +27 -0
- package/highlevel/methods/communities/toggle-community-collapsed.cjs +18 -0
- package/highlevel/methods/communities/toggle-community-collapsed.d.cts +16 -0
- package/highlevel/methods/communities/toggle-community-collapsed.d.ts +16 -0
- package/highlevel/methods/communities/toggle-community-collapsed.js +13 -0
- package/highlevel/methods/ephemeral/delete-all-welcome-messages.cjs +17 -0
- package/highlevel/methods/ephemeral/delete-all-welcome-messages.d.cts +8 -0
- package/highlevel/methods/ephemeral/delete-all-welcome-messages.d.ts +8 -0
- package/highlevel/methods/ephemeral/delete-all-welcome-messages.js +12 -0
- package/highlevel/methods/ephemeral/delete-ephemeral-message.cjs +20 -0
- package/highlevel/methods/ephemeral/delete-ephemeral-message.d.cts +13 -0
- package/highlevel/methods/ephemeral/delete-ephemeral-message.d.ts +13 -0
- package/highlevel/methods/ephemeral/delete-ephemeral-message.js +15 -0
- package/highlevel/methods/ephemeral/delete-welcome-message.cjs +18 -0
- package/highlevel/methods/ephemeral/delete-welcome-message.d.cts +9 -0
- package/highlevel/methods/ephemeral/delete-welcome-message.d.ts +9 -0
- package/highlevel/methods/ephemeral/delete-welcome-message.js +13 -0
- package/highlevel/methods/ephemeral/edit-ephemeral-message.cjs +41 -0
- package/highlevel/methods/ephemeral/edit-ephemeral-message.d.cts +39 -0
- package/highlevel/methods/ephemeral/edit-ephemeral-message.d.ts +39 -0
- package/highlevel/methods/ephemeral/edit-ephemeral-message.js +36 -0
- package/highlevel/methods/ephemeral/find-in-update.cjs +27 -0
- package/highlevel/methods/ephemeral/find-in-update.d.cts +8 -0
- package/highlevel/methods/ephemeral/find-in-update.d.ts +8 -0
- package/highlevel/methods/ephemeral/find-in-update.js +22 -0
- package/highlevel/methods/ephemeral/get-ephemeral-callback-answer.cjs +31 -0
- package/highlevel/methods/ephemeral/get-ephemeral-callback-answer.d.cts +29 -0
- package/highlevel/methods/ephemeral/get-ephemeral-callback-answer.d.ts +29 -0
- package/highlevel/methods/ephemeral/get-ephemeral-callback-answer.js +26 -0
- package/highlevel/methods/ephemeral/get-welcome-messages.cjs +29 -0
- package/highlevel/methods/ephemeral/get-welcome-messages.d.cts +8 -0
- package/highlevel/methods/ephemeral/get-welcome-messages.d.ts +8 -0
- package/highlevel/methods/ephemeral/get-welcome-messages.js +24 -0
- package/highlevel/methods/ephemeral/send-ephemeral-message.cjs +48 -0
- package/highlevel/methods/ephemeral/send-ephemeral-message.d.cts +47 -0
- package/highlevel/methods/ephemeral/send-ephemeral-message.d.ts +47 -0
- package/highlevel/methods/ephemeral/send-ephemeral-message.js +43 -0
- package/highlevel/methods/files/download-iterable.cjs +7 -2
- package/highlevel/methods/files/download-iterable.js +7 -2
- package/highlevel/methods/files/download-iterable.test.d.cts +1 -0
- package/highlevel/methods/files/download-iterable.test.d.ts +1 -0
- package/highlevel/methods/files/download-stream.cjs +5 -6
- package/highlevel/methods/files/download-stream.js +5 -6
- package/highlevel/methods/files/normalize-input-media.cjs +25 -4
- package/highlevel/methods/files/normalize-input-media.js +25 -4
- package/highlevel/methods/forums/create-forum-topic.d.cts +7 -0
- package/highlevel/methods/forums/create-forum-topic.d.ts +7 -0
- package/highlevel/methods/forums/delete-forum-topic-history.d.cts +1 -1
- package/highlevel/methods/forums/delete-forum-topic-history.d.ts +1 -1
- package/highlevel/methods/forums/edit-forum-topic.cjs +2 -2
- package/highlevel/methods/forums/edit-forum-topic.d.cts +2 -2
- package/highlevel/methods/forums/edit-forum-topic.d.ts +2 -2
- package/highlevel/methods/forums/edit-forum-topic.js +2 -2
- package/highlevel/methods/forums/get-forum-topics-by-id.cjs +5 -1
- package/highlevel/methods/forums/get-forum-topics-by-id.d.cts +9 -1
- package/highlevel/methods/forums/get-forum-topics-by-id.d.ts +9 -1
- package/highlevel/methods/forums/get-forum-topics-by-id.js +5 -1
- package/highlevel/methods/forums/get-forum-topics-by-id.test.d.cts +1 -0
- package/highlevel/methods/forums/get-forum-topics-by-id.test.d.ts +1 -0
- package/highlevel/methods/forums/get-forum-topics.cjs +1 -1
- package/highlevel/methods/forums/get-forum-topics.js +1 -1
- package/highlevel/methods/forums/toggle-forum-topic-closed.cjs +1 -1
- package/highlevel/methods/forums/toggle-forum-topic-closed.d.cts +1 -1
- package/highlevel/methods/forums/toggle-forum-topic-closed.d.ts +1 -1
- package/highlevel/methods/forums/toggle-forum-topic-closed.js +1 -1
- package/highlevel/methods/forums/toggle-forum-topic-pinned.d.cts +1 -1
- package/highlevel/methods/forums/toggle-forum-topic-pinned.d.ts +1 -1
- package/highlevel/methods/forums/toggle-general-topic-hidden.cjs +3 -3
- package/highlevel/methods/forums/toggle-general-topic-hidden.js +4 -4
- package/highlevel/methods/gifts/buy-resale-gift.cjs +5 -2
- package/highlevel/methods/gifts/buy-resale-gift.d.cts +11 -1
- package/highlevel/methods/gifts/buy-resale-gift.d.ts +11 -1
- package/highlevel/methods/gifts/buy-resale-gift.js +5 -2
- package/highlevel/methods/messages/forward-messages.cjs +1 -0
- package/highlevel/methods/messages/forward-messages.d.cts +2 -0
- package/highlevel/methods/messages/forward-messages.d.ts +2 -0
- package/highlevel/methods/messages/forward-messages.js +1 -0
- package/highlevel/methods/messages/normalize-rich-message.cjs +3 -0
- package/highlevel/methods/messages/normalize-rich-message.js +3 -0
- package/highlevel/methods/messages/send-common.d.cts +7 -1
- package/highlevel/methods/messages/send-common.d.ts +7 -1
- package/highlevel/methods/messages/send-text.cjs +70 -35
- package/highlevel/methods/messages/send-text.js +70 -35
- package/highlevel/methods/messages/send-typing.d.cts +3 -3
- package/highlevel/methods/messages/send-typing.d.ts +3 -3
- package/highlevel/methods/messages/set-typing.cjs +1 -1
- package/highlevel/methods/messages/set-typing.d.cts +2 -2
- package/highlevel/methods/messages/set-typing.d.ts +2 -2
- package/highlevel/methods/messages/set-typing.js +1 -1
- package/highlevel/methods/users/resolve-peer.cjs +11 -1
- package/highlevel/methods/users/resolve-peer.js +11 -1
- package/highlevel/methods.d.cts +19 -0
- package/highlevel/methods.d.ts +19 -0
- package/highlevel/storage/service/peers.cjs +25 -0
- package/highlevel/storage/service/peers.js +25 -0
- package/highlevel/storage/service/peers.test.d.cts +1 -0
- package/highlevel/storage/service/peers.test.d.ts +1 -0
- package/highlevel/types/bots/keyboards/builder.cjs +5 -5
- package/highlevel/types/bots/keyboards/builder.d.cts +8 -9
- package/highlevel/types/bots/keyboards/builder.d.ts +8 -9
- package/highlevel/types/bots/keyboards/builder.js +5 -5
- package/highlevel/types/bots/keyboards/factories.cjs +51 -103
- package/highlevel/types/bots/keyboards/factories.d.cts +58 -89
- package/highlevel/types/bots/keyboards/factories.d.ts +58 -89
- package/highlevel/types/bots/keyboards/factories.js +51 -103
- package/highlevel/types/bots/keyboards/index.d.cts +3 -3
- package/highlevel/types/bots/keyboards/index.d.ts +3 -3
- package/highlevel/types/bots/keyboards/normalize.cjs +131 -0
- package/highlevel/types/bots/keyboards/normalize.d.cts +10 -0
- package/highlevel/types/bots/keyboards/normalize.d.ts +10 -0
- package/highlevel/types/bots/keyboards/normalize.js +126 -0
- package/highlevel/types/bots/keyboards/types.d.cts +160 -4
- package/highlevel/types/bots/keyboards/types.d.ts +160 -4
- package/highlevel/types/conversation.cjs +8 -0
- package/highlevel/types/conversation.d.cts +1 -0
- package/highlevel/types/conversation.d.ts +1 -0
- package/highlevel/types/conversation.js +10 -2
- package/highlevel/types/conversation.test.d.cts +1 -0
- package/highlevel/types/conversation.test.d.ts +1 -0
- package/highlevel/types/messages/dialog.cjs +8 -1
- package/highlevel/types/messages/dialog.d.cts +3 -0
- package/highlevel/types/messages/dialog.d.ts +3 -0
- package/highlevel/types/messages/dialog.js +8 -1
- package/highlevel/types/messages/dialog.test.d.cts +1 -0
- package/highlevel/types/messages/dialog.test.d.ts +1 -0
- package/highlevel/types/messages/ephemeral-message.cjs +135 -0
- package/highlevel/types/messages/ephemeral-message.d.cts +75 -0
- package/highlevel/types/messages/ephemeral-message.d.ts +75 -0
- package/highlevel/types/messages/ephemeral-message.js +130 -0
- package/highlevel/types/messages/index.d.cts +1 -0
- package/highlevel/types/messages/index.d.ts +1 -0
- package/highlevel/types/messages/message-action.cjs +14 -1
- package/highlevel/types/messages/message-action.d.cts +18 -1
- package/highlevel/types/messages/message-action.d.ts +18 -1
- package/highlevel/types/messages/message-action.js +14 -1
- package/highlevel/types/messages/message.cjs +7 -2
- package/highlevel/types/messages/message.d.cts +2 -2
- package/highlevel/types/messages/message.d.ts +2 -2
- package/highlevel/types/messages/message.js +8 -3
- package/highlevel/types/messages/replied-message.cjs +5 -1
- package/highlevel/types/messages/replied-message.d.cts +5 -1
- package/highlevel/types/messages/replied-message.d.ts +5 -1
- package/highlevel/types/messages/replied-message.js +5 -1
- package/highlevel/types/messages/rich/inner.cjs +37 -0
- package/highlevel/types/messages/rich/inner.d.cts +19 -0
- package/highlevel/types/messages/rich/inner.d.ts +19 -0
- package/highlevel/types/messages/rich/inner.js +37 -0
- package/highlevel/types/peers/chat.cjs +23 -3
- package/highlevel/types/peers/chat.d.cts +8 -3
- package/highlevel/types/peers/chat.d.ts +8 -3
- package/highlevel/types/peers/chat.js +24 -4
- package/highlevel/types/peers/community-peer.cjs +60 -0
- package/highlevel/types/peers/community-peer.d.cts +37 -0
- package/highlevel/types/peers/community-peer.d.ts +37 -0
- package/highlevel/types/peers/community-peer.js +55 -0
- package/highlevel/types/peers/full-chat.cjs +24 -5
- package/highlevel/types/peers/full-chat.d.cts +7 -0
- package/highlevel/types/peers/full-chat.d.ts +7 -0
- package/highlevel/types/peers/full-chat.js +24 -5
- package/highlevel/types/peers/index.d.cts +1 -0
- package/highlevel/types/peers/index.d.ts +1 -0
- package/highlevel/types/peers/peer.cjs +2 -0
- package/highlevel/types/peers/peer.js +2 -0
- package/highlevel/types/peers/typing-status.d.cts +4 -1
- package/highlevel/types/peers/typing-status.d.ts +4 -1
- package/highlevel/types/peers/user.cjs +6 -0
- package/highlevel/types/peers/user.d.cts +2 -0
- package/highlevel/types/peers/user.d.ts +2 -0
- package/highlevel/types/peers/user.js +6 -0
- package/highlevel/types/updates/delete-ephemeral-messages-update.cjs +27 -0
- package/highlevel/types/updates/delete-ephemeral-messages-update.d.cts +15 -0
- package/highlevel/types/updates/delete-ephemeral-messages-update.d.ts +15 -0
- package/highlevel/types/updates/delete-ephemeral-messages-update.js +22 -0
- package/highlevel/types/updates/ephemeral-callback-query.cjs +69 -0
- package/highlevel/types/updates/ephemeral-callback-query.d.cts +44 -0
- package/highlevel/types/updates/ephemeral-callback-query.d.ts +44 -0
- package/highlevel/types/updates/ephemeral-callback-query.js +64 -0
- package/highlevel/types/updates/index.d.cts +16 -2
- package/highlevel/types/updates/index.d.ts +16 -2
- package/highlevel/types/updates/parse-update.cjs +12 -1
- package/highlevel/types/updates/parse-update.js +12 -1
- package/highlevel/types/updates/user-typing-update.cjs +18 -0
- package/highlevel/types/updates/user-typing-update.d.cts +9 -0
- package/highlevel/types/updates/user-typing-update.d.ts +9 -0
- package/highlevel/types/updates/user-typing-update.js +18 -0
- package/highlevel/updates/manager.cjs +71 -41
- package/highlevel/updates/manager.d.cts +1 -0
- package/highlevel/updates/manager.d.ts +1 -0
- package/highlevel/updates/manager.js +71 -41
- package/highlevel/updates/manager.test.d.cts +1 -0
- package/highlevel/updates/manager.test.d.ts +1 -0
- package/highlevel/utils/stream-utils.cjs +8 -4
- package/highlevel/utils/stream-utils.js +8 -4
- package/highlevel/utils/stream-utils.test.d.cts +1 -0
- package/highlevel/utils/stream-utils.test.d.ts +1 -0
- package/highlevel/utils/walk-page-blocks.cjs +9 -0
- package/highlevel/utils/walk-page-blocks.js +9 -0
- package/index.cjs +10 -0
- package/index.js +11 -1
- package/methods.cjs +33 -0
- package/methods.js +33 -0
- package/network/client.cjs +4 -3
- package/network/client.d.cts +1 -0
- package/network/client.d.ts +1 -0
- package/network/client.js +4 -3
- package/network/middlewares/flood-waiter.cjs +2 -2
- package/network/middlewares/flood-waiter.js +2 -2
- package/network/middlewares/internal-errors.cjs +1 -1
- package/network/middlewares/internal-errors.js +1 -1
- package/network/middlewares/media-throttle.cjs +1 -1
- package/network/middlewares/media-throttle.js +1 -1
- package/network/mtproto-session.cjs +9 -2
- package/network/mtproto-session.d.cts +3 -1
- package/network/mtproto-session.d.ts +3 -1
- package/network/mtproto-session.js +9 -2
- package/network/mtproxy/index.cjs +4 -3
- package/network/mtproxy/index.d.cts +2 -2
- package/network/mtproxy/index.d.ts +2 -2
- package/network/mtproxy/index.js +4 -3
- package/network/network-manager.cjs +44 -16
- package/network/network-manager.d.cts +10 -3
- package/network/network-manager.d.ts +10 -3
- package/network/network-manager.js +45 -17
- package/network/network-manager.test.d.cts +1 -0
- package/network/network-manager.test.d.ts +1 -0
- package/network/persistent-connection.cjs +10 -2
- package/network/persistent-connection.js +10 -2
- package/network/session-connection.cjs +15 -6
- package/network/session-connection.js +15 -6
- package/network/session-connection.test.d.cts +1 -0
- package/network/session-connection.test.d.ts +1 -0
- package/network/transports/abstract.cjs +16 -0
- package/network/transports/abstract.d.cts +8 -2
- package/network/transports/abstract.d.ts +8 -2
- package/network/transports/abstract.js +17 -1
- package/network/transports/obfuscated.cjs +3 -1
- package/network/transports/obfuscated.js +3 -1
- package/package.json +6 -6
- package/tl/api-schema.json +1 -1
- package/tl/binary/reader.cjs +221 -103
- package/tl/binary/reader.js +221 -103
- package/tl/binary/writer.cjs +693 -277
- package/tl/binary/writer.js +693 -277
- package/tl/compat/reader.cjs +93 -0
- package/tl/compat/reader.js +93 -0
- package/tl/index.d.cts +12529 -4762
- package/tl/index.d.ts +12529 -4762
- package/tl/inner-tl.cjs +90 -24
- package/tl/inner-tl.js +90 -24
- package/tl/raw-errors.json +1 -1
- package/tl/rpc-error.test.d.cts +1 -0
- package/tl/rpc-error.test.d.ts +1 -0
- package/utils/abort-signal.cjs +1 -12
- package/utils/abort-signal.js +1 -12
- package/utils/abort-signal.test.d.cts +1 -0
- package/utils/abort-signal.test.d.ts +1 -0
- package/utils/binary/compat.cjs +189 -29
- package/utils/binary/compat.js +189 -29
- package/utils/early-timer.cjs +3 -11
- package/utils/early-timer.js +3 -11
- package/utils/early-timer.test.d.cts +1 -0
- package/utils/early-timer.test.d.ts +1 -0
- package/utils/function-utils.cjs +9 -4
- package/utils/function-utils.js +9 -4
- package/utils/links/bots.cjs +10 -2
- package/utils/links/bots.js +10 -2
- package/utils/peer-utils.cjs +8 -0
- package/utils/peer-utils.js +8 -0
package/highlevel/client.d.ts
CHANGED
|
@@ -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,
|
|
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, SendableTypingStatus, SentCode, StarGift, StarGiftUnique, StarGiftValue, StarsStatus, StarsTransaction, Sticker, StickerSet, StickerType, StoriesStealthMode, Story, StoryInteractions, StoryUpdate, StoryViewer, StoryViewersList, TakeoutSession, TextWithEntities, 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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
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**:
|
|
2009
|
+
* **Available**: 👤 users only
|
|
1879
2010
|
*
|
|
1880
2011
|
* @param params Search parameters. At least one must be set.
|
|
1881
2012
|
*/
|
|
@@ -2032,6 +2163,145 @@ 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 all welcome messages configured for a chat
|
|
2168
|
+
*
|
|
2169
|
+
* **Available**: 👤 users only
|
|
2170
|
+
*
|
|
2171
|
+
* @param chatId Chat to delete the welcome messages for
|
|
2172
|
+
*/
|
|
2173
|
+
deleteAllWelcomeMessages(chatId: InputPeerLike): Promise<void>;
|
|
2174
|
+
/**
|
|
2175
|
+
* Delete a previously sent ephemeral message
|
|
2176
|
+
*/
|
|
2177
|
+
deleteEphemeralMessage(params: {
|
|
2178
|
+
/** Chat where the message was sent (`null` for guest chats) */
|
|
2179
|
+
chatId: InputPeerLike | null;
|
|
2180
|
+
/** User the message is visible to */
|
|
2181
|
+
receiverId: InputPeerLike;
|
|
2182
|
+
/** ID of the message to delete */
|
|
2183
|
+
messageId: number;
|
|
2184
|
+
}): Promise<void>;
|
|
2185
|
+
/**
|
|
2186
|
+
* Delete a welcome message configured for a chat
|
|
2187
|
+
*
|
|
2188
|
+
* **Available**: 👤 users only
|
|
2189
|
+
*
|
|
2190
|
+
* @param chatId Chat where the welcome message is configured
|
|
2191
|
+
* @param messageId ID of the welcome message to delete
|
|
2192
|
+
*/
|
|
2193
|
+
deleteWelcomeMessage(chatId: InputPeerLike, messageId: number): Promise<void>;
|
|
2194
|
+
/**
|
|
2195
|
+
* Edit a previously sent ephemeral message
|
|
2196
|
+
*/
|
|
2197
|
+
editEphemeralMessage(params: {
|
|
2198
|
+
/** Chat where the message was sent (`null` for guest chats) */
|
|
2199
|
+
chatId: InputPeerLike | null;
|
|
2200
|
+
/** User the message is visible to */
|
|
2201
|
+
receiverId: InputPeerLike;
|
|
2202
|
+
/** ID of the message to edit */
|
|
2203
|
+
messageId: number;
|
|
2204
|
+
/** New text of the message */
|
|
2205
|
+
text?: InputText;
|
|
2206
|
+
/** New media of the message */
|
|
2207
|
+
media?: InputMediaLike;
|
|
2208
|
+
/** New rich message content of the message */
|
|
2209
|
+
richMessage?: InputRichMessage;
|
|
2210
|
+
/** New reply markup of the message */
|
|
2211
|
+
replyMarkup?: ReplyMarkup;
|
|
2212
|
+
/** Whether this message is a welcome message template for the chat */
|
|
2213
|
+
welcome?: boolean;
|
|
2214
|
+
/**
|
|
2215
|
+
* Whether to invert the media position.
|
|
2216
|
+
*
|
|
2217
|
+
* Currently only supported for web previews and makes the
|
|
2218
|
+
* client render the preview above the caption and not below.
|
|
2219
|
+
*/
|
|
2220
|
+
invertMedia?: boolean;
|
|
2221
|
+
/** Cache for the uploaded rich message media, see {@link createRichStreamingDraft} */
|
|
2222
|
+
uploadCache?: RichMediaUploadCache;
|
|
2223
|
+
/**
|
|
2224
|
+
* Whether to dispatch the returned updates
|
|
2225
|
+
* to the client's update handler.
|
|
2226
|
+
*/
|
|
2227
|
+
shouldDispatch?: true;
|
|
2228
|
+
}): Promise<EphemeralMessage>;
|
|
2229
|
+
/**
|
|
2230
|
+
* Request a callback answer from a bot for an ephemeral message,
|
|
2231
|
+
* i.e. click an inline button that contains data.
|
|
2232
|
+
*/
|
|
2233
|
+
getEphemeralCallbackAnswer(params: {
|
|
2234
|
+
/** Chat where the ephemeral message was sent */
|
|
2235
|
+
chatId: InputPeerLike;
|
|
2236
|
+
/** ID of the ephemeral message containing the button */
|
|
2237
|
+
messageId: number;
|
|
2238
|
+
/** Data contained in the button */
|
|
2239
|
+
data?: string | Uint8Array;
|
|
2240
|
+
/**
|
|
2241
|
+
* Timeout for the query in ms.
|
|
2242
|
+
*
|
|
2243
|
+
* @default `10000` (10 sec)
|
|
2244
|
+
*/
|
|
2245
|
+
timeout?: number;
|
|
2246
|
+
/**
|
|
2247
|
+
* Whether to "fire and forget" this request,
|
|
2248
|
+
* in which case the promise will resolve as soon
|
|
2249
|
+
* as the request is sent with an empty response.
|
|
2250
|
+
*
|
|
2251
|
+
* **Note**: any errors will be silently ignored.
|
|
2252
|
+
*/
|
|
2253
|
+
fireAndForget?: boolean;
|
|
2254
|
+
}): Promise<tl.messages.TypeBotCallbackAnswer>;
|
|
2255
|
+
/**
|
|
2256
|
+
* Get the welcome messages configured for a chat
|
|
2257
|
+
*
|
|
2258
|
+
* **Available**: 👤 users only
|
|
2259
|
+
*
|
|
2260
|
+
* @param chatId Chat to get the welcome messages for
|
|
2261
|
+
*/
|
|
2262
|
+
getWelcomeMessages(chatId: InputPeerLike): Promise<EphemeralMessage[]>;
|
|
2263
|
+
/**
|
|
2264
|
+
* Send an ephemeral message — a message that is only visible
|
|
2265
|
+
* to a single user in a chat and is not persisted in the chat history.
|
|
2266
|
+
*
|
|
2267
|
+
* @param chatId ID of the chat to send the message to (`null` for guest chats, where `queryId` is used instead)
|
|
2268
|
+
* @param receiverId ID of the user the message should be visible to
|
|
2269
|
+
* @param text Text of the message
|
|
2270
|
+
*/
|
|
2271
|
+
sendEphemeralMessage(chatId: InputPeerLike | null, receiverId: InputPeerLike, text: InputText, params?: {
|
|
2272
|
+
/** Media to be attached to the message */
|
|
2273
|
+
media?: InputMediaLike;
|
|
2274
|
+
/** Rich message content to be sent instead of the plain text */
|
|
2275
|
+
richMessage?: InputRichMessage;
|
|
2276
|
+
/** Message to reply to */
|
|
2277
|
+
replyTo?: number;
|
|
2278
|
+
/** Ephemeral message to reply to */
|
|
2279
|
+
replyToEphemeral?: number;
|
|
2280
|
+
/** Reply markup to be attached to the message */
|
|
2281
|
+
replyMarkup?: ReplyMarkup;
|
|
2282
|
+
/** For guest chat bots, ID of the query that this message is sent in response to */
|
|
2283
|
+
queryId?: tl.Long;
|
|
2284
|
+
/** Whether to send this message as a welcome message template for the chat */
|
|
2285
|
+
welcome?: boolean;
|
|
2286
|
+
/** Whether to anchor this message to the message it replies to */
|
|
2287
|
+
anchor?: boolean;
|
|
2288
|
+
/**
|
|
2289
|
+
* Whether to invert the media position.
|
|
2290
|
+
*
|
|
2291
|
+
* Currently only supported for web previews and makes the
|
|
2292
|
+
* client render the preview above the caption and not below.
|
|
2293
|
+
*/
|
|
2294
|
+
invertMedia?: boolean;
|
|
2295
|
+
/** Whether to forbid forwarding this message */
|
|
2296
|
+
forbidForwards?: boolean;
|
|
2297
|
+
/** Cache for the uploaded rich message media, see {@link createRichStreamingDraft} */
|
|
2298
|
+
uploadCache?: RichMediaUploadCache;
|
|
2299
|
+
/**
|
|
2300
|
+
* Whether to dispatch the returned updates
|
|
2301
|
+
* to the client's update handler.
|
|
2302
|
+
*/
|
|
2303
|
+
shouldDispatch?: true;
|
|
2304
|
+
}): Promise<EphemeralMessage>;
|
|
2035
2305
|
/**
|
|
2036
2306
|
* Download a file and return its contents as a Buffer.
|
|
2037
2307
|
*
|
|
@@ -2046,7 +2316,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2046
2316
|
/**
|
|
2047
2317
|
* Download a single chunk of a file, using [`precise`](https://core.telegram.org/api/files#downloading-files) download mode
|
|
2048
2318
|
*
|
|
2049
|
-
* **Available**:
|
|
2319
|
+
* **Available**: ✅ both users and bots
|
|
2050
2320
|
*
|
|
2051
2321
|
* @param params Download parameters
|
|
2052
2322
|
*/
|
|
@@ -2092,7 +2362,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2092
2362
|
* in chunks of a given size. Order of the chunks is guaranteed to be
|
|
2093
2363
|
* consecutive.
|
|
2094
2364
|
*
|
|
2095
|
-
* **Available**:
|
|
2365
|
+
* **Available**: ✅ both users and bots
|
|
2096
2366
|
*
|
|
2097
2367
|
* @param params Download parameters
|
|
2098
2368
|
*/
|
|
@@ -2150,7 +2420,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2150
2420
|
/**
|
|
2151
2421
|
* Normalize an {@link InputMediaLike} to `InputMedia`,
|
|
2152
2422
|
* uploading the file if needed.
|
|
2153
|
-
* **Available**:
|
|
2423
|
+
* **Available**: ✅ both users and bots
|
|
2154
2424
|
*
|
|
2155
2425
|
*/
|
|
2156
2426
|
_normalizeInputMedia(media: InputMediaLike, params?: {
|
|
@@ -2240,7 +2510,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2240
2510
|
* the returned object will act like a message media
|
|
2241
2511
|
* and contain fields like File ID.
|
|
2242
2512
|
*
|
|
2243
|
-
* **Available**:
|
|
2513
|
+
* **Available**: ✅ both users and bots
|
|
2244
2514
|
*
|
|
2245
2515
|
* @param media Media to upload
|
|
2246
2516
|
* @param [params={}] Upload parameters
|
|
@@ -2254,7 +2524,14 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2254
2524
|
*
|
|
2255
2525
|
* Only admins with `manageTopics` permission can do this.
|
|
2256
2526
|
*
|
|
2257
|
-
* **
|
|
2527
|
+
* > **Note**: for bots in private chats with "threaded mode" enabled,
|
|
2528
|
+
* > message IDs are separate for each side of the chat, while the
|
|
2529
|
+
* > canonical topic ID is always issued in the *user's* ID space.
|
|
2530
|
+
* > The `.id` of the returned service message is in the *bot's* ID space,
|
|
2531
|
+
* > and is **not** a valid topic ID — use `.replyToMessage.threadId` instead,
|
|
2532
|
+
* > which is what all other methods (as well as Bot API's `message_thread_id`) expect.
|
|
2533
|
+
*
|
|
2534
|
+
* **Available**: ✅ both users and bots
|
|
2258
2535
|
*
|
|
2259
2536
|
* @returns Service message for the created topic
|
|
2260
2537
|
*/
|
|
@@ -2287,10 +2564,10 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2287
2564
|
/**
|
|
2288
2565
|
* Delete a forum topic and all its history
|
|
2289
2566
|
*
|
|
2290
|
-
* **Available**:
|
|
2567
|
+
* **Available**: ✅ both users and bots
|
|
2291
2568
|
*
|
|
2292
2569
|
* @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)
|
|
2570
|
+
* @param topicId ID of the topic (i.e. its top message ID, see note at {@link createForumTopic})
|
|
2294
2571
|
*/
|
|
2295
2572
|
deleteForumTopicHistory(chat: InputPeerLike, topicId: number | ForumTopic, params?: {
|
|
2296
2573
|
/**
|
|
@@ -2304,16 +2581,16 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2304
2581
|
*
|
|
2305
2582
|
* Only admins with `manageTopics` permission can do this.
|
|
2306
2583
|
*
|
|
2307
|
-
* **Available**:
|
|
2584
|
+
* **Available**: ✅ both users and bots
|
|
2308
2585
|
*
|
|
2309
2586
|
* @param chatId Chat ID or username
|
|
2310
|
-
* @param topicId ID of the topic (i.e. its top message ID)
|
|
2587
|
+
* @param topicId ID of the topic (i.e. its top message ID, see note at {@link createForumTopic})
|
|
2311
2588
|
* @returns Service message about the modification
|
|
2312
2589
|
*/
|
|
2313
2590
|
editForumTopic(params: {
|
|
2314
2591
|
/** Chat ID or username */
|
|
2315
2592
|
chatId: InputPeerLike;
|
|
2316
|
-
/** ID of the topic (i.e. its top message ID) */
|
|
2593
|
+
/** ID of the topic (i.e. its top message ID, see note at {@link createForumTopic}) */
|
|
2317
2594
|
topicId: number | ForumTopic;
|
|
2318
2595
|
/**
|
|
2319
2596
|
* New topic title
|
|
@@ -2339,11 +2616,19 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2339
2616
|
/**
|
|
2340
2617
|
* Get forum topics by their IDs
|
|
2341
2618
|
*
|
|
2342
|
-
*
|
|
2619
|
+
* The returned array is aligned with the input IDs.
|
|
2620
|
+
* For topics that were deleted (or never existed),
|
|
2621
|
+
* `null` will be returned at that position.
|
|
2622
|
+
*
|
|
2623
|
+
* > **Note**: for bots in private chats with "threaded mode" enabled,
|
|
2624
|
+
* > only canonical (user-space) topic IDs are accepted —
|
|
2625
|
+
* > see the note at {@link createForumTopic}
|
|
2626
|
+
*
|
|
2627
|
+
* **Available**: ✅ both users and bots
|
|
2343
2628
|
*
|
|
2344
2629
|
* @param chatId Chat ID or username
|
|
2345
2630
|
*/
|
|
2346
|
-
getForumTopicsById(chatId: InputPeerLike, ids: MaybeArray<number>): Promise<ForumTopic[]>;
|
|
2631
|
+
getForumTopicsById(chatId: InputPeerLike, ids: MaybeArray<number>): Promise<(ForumTopic | null)[]>;
|
|
2347
2632
|
/**
|
|
2348
2633
|
* Get forum topics
|
|
2349
2634
|
*
|
|
@@ -2370,7 +2655,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2370
2655
|
/**
|
|
2371
2656
|
* Iterate over forum topics. Wrapper over {@link getForumTopics}.
|
|
2372
2657
|
*
|
|
2373
|
-
* **Available**:
|
|
2658
|
+
* **Available**: 👤 users only
|
|
2374
2659
|
*
|
|
2375
2660
|
* @param chatId Chat ID or username
|
|
2376
2661
|
*/
|
|
@@ -2410,14 +2695,14 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2410
2695
|
*
|
|
2411
2696
|
* Only admins with `manageTopics` permission can do this.
|
|
2412
2697
|
*
|
|
2413
|
-
* **Available**:
|
|
2698
|
+
* **Available**: ✅ both users and bots
|
|
2414
2699
|
*
|
|
2415
2700
|
* @returns Service message about the modification
|
|
2416
2701
|
*/
|
|
2417
2702
|
toggleForumTopicClosed(parmas: {
|
|
2418
2703
|
/** Chat ID or username */
|
|
2419
2704
|
chatId: InputPeerLike;
|
|
2420
|
-
/** ID of the topic (i.e. its top message ID) */
|
|
2705
|
+
/** ID of the topic (i.e. its top message ID, see note at {@link createForumTopic}) */
|
|
2421
2706
|
topicId: number | ForumTopic;
|
|
2422
2707
|
/** Whether the topic should be closed */
|
|
2423
2708
|
closed: boolean;
|
|
@@ -2437,7 +2722,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2437
2722
|
toggleForumTopicPinned(params: {
|
|
2438
2723
|
/** Chat ID or username */
|
|
2439
2724
|
chatId: InputPeerLike;
|
|
2440
|
-
/** ID of the topic (i.e. its top message ID) */
|
|
2725
|
+
/** ID of the topic (i.e. its top message ID, see note at {@link createForumTopic}) */
|
|
2441
2726
|
topicId: number | ForumTopic;
|
|
2442
2727
|
/** Whether the topic should be pinned */
|
|
2443
2728
|
pinned: boolean;
|
|
@@ -2462,7 +2747,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2462
2747
|
*
|
|
2463
2748
|
* Only admins with `manageTopics` permission can do this.
|
|
2464
2749
|
*
|
|
2465
|
-
* **Available**:
|
|
2750
|
+
* **Available**: ✅ both users and bots
|
|
2466
2751
|
*
|
|
2467
2752
|
* @returns Service message about the modification
|
|
2468
2753
|
*/
|
|
@@ -2508,6 +2793,16 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2508
2793
|
shouldDispatch?: true;
|
|
2509
2794
|
/** Whether to use TON currency for payment */
|
|
2510
2795
|
ton?: boolean;
|
|
2796
|
+
/**
|
|
2797
|
+
* Whether to buy the gift anonymously
|
|
2798
|
+
* (i.e. if the recipient chooses to display the gift
|
|
2799
|
+
* on their profile, your name won't be visible)
|
|
2800
|
+
*
|
|
2801
|
+
* @default `true`
|
|
2802
|
+
*/
|
|
2803
|
+
anonymous?: boolean;
|
|
2804
|
+
/** Message to send along with the gift */
|
|
2805
|
+
message?: InputText;
|
|
2511
2806
|
}): Promise<Message | null>;
|
|
2512
2807
|
/**
|
|
2513
2808
|
* Get a list of star gifts up for resale
|
|
@@ -2543,7 +2838,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2543
2838
|
* Get a list of saved star gifts of a user/channel
|
|
2544
2839
|
*
|
|
2545
2840
|
* Note that filters currently only work for channels
|
|
2546
|
-
* **Available**:
|
|
2841
|
+
* **Available**: ✅ both users and bots
|
|
2547
2842
|
*
|
|
2548
2843
|
*/
|
|
2549
2844
|
getSavedStarGifts(params: {
|
|
@@ -2610,7 +2905,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2610
2905
|
/**
|
|
2611
2906
|
* Iterate over saved star gifts of a user,
|
|
2612
2907
|
* wrapper over {@link getSavedStarGifts}
|
|
2613
|
-
* **Available**:
|
|
2908
|
+
* **Available**: ✅ both users and bots
|
|
2614
2909
|
*
|
|
2615
2910
|
*/
|
|
2616
2911
|
iterSavedStarGifts(params: Parameters<typeof getSavedStarGifts>[1] & {
|
|
@@ -2646,7 +2941,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2646
2941
|
* > For GUI clients, you should refer to the method's source code and
|
|
2647
2942
|
* > present the payment form to the user.
|
|
2648
2943
|
*
|
|
2649
|
-
* **Available**:
|
|
2944
|
+
* **Available**: ✅ both users and bots
|
|
2650
2945
|
*
|
|
2651
2946
|
* @returns Service message about the payment for the upgrade, if one was generated.
|
|
2652
2947
|
*/
|
|
@@ -2663,7 +2958,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2663
2958
|
/**
|
|
2664
2959
|
* Accept or decline a purchase offer for a star gift
|
|
2665
2960
|
*
|
|
2666
|
-
* **Available**:
|
|
2961
|
+
* **Available**: ✅ both users and bots
|
|
2667
2962
|
*
|
|
2668
2963
|
* @returns The generated service message
|
|
2669
2964
|
*/
|
|
@@ -2710,7 +3005,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2710
3005
|
* > For GUI clients, you should refer to the method's source code and
|
|
2711
3006
|
* > present the payment form to the user.
|
|
2712
3007
|
*
|
|
2713
|
-
* **Available**:
|
|
3008
|
+
* **Available**: ✅ both users and bots
|
|
2714
3009
|
*
|
|
2715
3010
|
* @returns Service message about the sent gift, if one was generated.
|
|
2716
3011
|
*/
|
|
@@ -2797,7 +3092,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2797
3092
|
*
|
|
2798
3093
|
* You must be an administrator and have appropriate rights.
|
|
2799
3094
|
*
|
|
2800
|
-
* **Available**:
|
|
3095
|
+
* **Available**: ✅ both users and bots
|
|
2801
3096
|
*
|
|
2802
3097
|
* @param chatId Chat ID
|
|
2803
3098
|
* @param params
|
|
@@ -2835,7 +3130,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2835
3130
|
*
|
|
2836
3131
|
* Only pass the fields that you want to modify.
|
|
2837
3132
|
*
|
|
2838
|
-
* **Available**:
|
|
3133
|
+
* **Available**: ✅ both users and bots
|
|
2839
3134
|
*
|
|
2840
3135
|
* @param chatId Chat ID
|
|
2841
3136
|
* @param link Invite link to edit
|
|
@@ -2872,7 +3167,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2872
3167
|
* > **Note**: each administrator has their own primary invite link,
|
|
2873
3168
|
* > and bots by default don't have one.
|
|
2874
3169
|
*
|
|
2875
|
-
* **Available**:
|
|
3170
|
+
* **Available**: ✅ both users and bots
|
|
2876
3171
|
*
|
|
2877
3172
|
* @param chatId Chat IDs
|
|
2878
3173
|
*/
|
|
@@ -2988,7 +3283,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2988
3283
|
}): Promise<void>;
|
|
2989
3284
|
/**
|
|
2990
3285
|
* Approve or decline join request to a chat.
|
|
2991
|
-
* **Available**:
|
|
3286
|
+
* **Available**: ✅ both users and bots
|
|
2992
3287
|
*
|
|
2993
3288
|
*/
|
|
2994
3289
|
hideJoinRequest(params: {
|
|
@@ -3003,7 +3298,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3003
3298
|
* Iterate over users who have joined
|
|
3004
3299
|
* the chat with the given invite link.
|
|
3005
3300
|
*
|
|
3006
|
-
* **Available**:
|
|
3301
|
+
* **Available**: 👤 users only
|
|
3007
3302
|
*
|
|
3008
3303
|
* @param chatId Chat ID
|
|
3009
3304
|
* @param params Additional params
|
|
@@ -3030,7 +3325,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3030
3325
|
* (i.e. `adminId = "self"`), as a creator you can get
|
|
3031
3326
|
* any other admin's links.
|
|
3032
3327
|
*
|
|
3033
|
-
* **Available**:
|
|
3328
|
+
* **Available**: 👤 users only
|
|
3034
3329
|
*
|
|
3035
3330
|
* @param chatId Chat ID
|
|
3036
3331
|
* @param adminId Admin who created the links
|
|
@@ -3055,7 +3350,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3055
3350
|
* If `link` is a primary invite link, a new invite link will be
|
|
3056
3351
|
* generated automatically by Telegram
|
|
3057
3352
|
*
|
|
3058
|
-
* **Available**:
|
|
3353
|
+
* **Available**: ✅ both users and bots
|
|
3059
3354
|
*
|
|
3060
3355
|
* @param chatId Chat ID
|
|
3061
3356
|
* @param link Invite link to revoke
|
|
@@ -3083,7 +3378,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3083
3378
|
*
|
|
3084
3379
|
* Once closed, poll can't be re-opened, and nobody
|
|
3085
3380
|
* will be able to vote in it
|
|
3086
|
-
* **Available**:
|
|
3381
|
+
* **Available**: ✅ both users and bots
|
|
3087
3382
|
*
|
|
3088
3383
|
*/
|
|
3089
3384
|
closePoll(params: InputMessageId & {
|
|
@@ -3096,7 +3391,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3096
3391
|
/**
|
|
3097
3392
|
* Create a streaming rich message draft
|
|
3098
3393
|
*
|
|
3099
|
-
* **Available**:
|
|
3394
|
+
* **Available**: ✅ both users and bots
|
|
3100
3395
|
*
|
|
3101
3396
|
* @param chatId Chat ID
|
|
3102
3397
|
* @param params
|
|
@@ -3124,7 +3419,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3124
3419
|
/**
|
|
3125
3420
|
* Create a streaming text message draft
|
|
3126
3421
|
*
|
|
3127
|
-
* **Available**:
|
|
3422
|
+
* **Available**: ✅ both users and bots
|
|
3128
3423
|
*
|
|
3129
3424
|
* @param chatId Chat ID
|
|
3130
3425
|
* @param params
|
|
@@ -3151,7 +3446,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3151
3446
|
/**
|
|
3152
3447
|
* Delete messages by their IDs
|
|
3153
3448
|
*
|
|
3154
|
-
* **Available**:
|
|
3449
|
+
* **Available**: ✅ both users and bots
|
|
3155
3450
|
*
|
|
3156
3451
|
* @param chatId Chat's marked ID, its username, phone or `"me"` or `"self"`.
|
|
3157
3452
|
* @param ids Message(s) ID(s) to delete.
|
|
@@ -3177,7 +3472,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3177
3472
|
/**
|
|
3178
3473
|
* Edit sent inline message text, media and reply markup.
|
|
3179
3474
|
*
|
|
3180
|
-
* **Available**:
|
|
3475
|
+
* **Available**: ✅ both users and bots
|
|
3181
3476
|
*
|
|
3182
3477
|
* @param messageId
|
|
3183
3478
|
* Inline message ID, either as a TL object, or as a
|
|
@@ -3227,7 +3522,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3227
3522
|
/**
|
|
3228
3523
|
* Edit message text, media, reply markup and schedule date.
|
|
3229
3524
|
*
|
|
3230
|
-
* **Available**:
|
|
3525
|
+
* **Available**: ✅ both users and bots
|
|
3231
3526
|
*
|
|
3232
3527
|
* @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
|
|
3233
3528
|
* @param message Message or its ID
|
|
@@ -3283,7 +3578,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3283
3578
|
* Forward one or more messages by their IDs.
|
|
3284
3579
|
* You can forward no more than 100 messages at once.
|
|
3285
3580
|
*
|
|
3286
|
-
* **Available**:
|
|
3581
|
+
* **Available**: ✅ both users and bots
|
|
3287
3582
|
*
|
|
3288
3583
|
* @param toChatId Destination chat ID, username, phone, `"me"` or `"self"`
|
|
3289
3584
|
* @param fromChatId Source chat ID, username, phone, `"me"` or `"self"`
|
|
@@ -3451,7 +3746,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3451
3746
|
* > (that weren't sent by the user) once every 15-30 seconds,
|
|
3452
3747
|
* > but only if `message.reactions` is set
|
|
3453
3748
|
*
|
|
3454
|
-
* **Available**:
|
|
3749
|
+
* **Available**: 👤 users only
|
|
3455
3750
|
*
|
|
3456
3751
|
* @param chatId ID of the chat with messages
|
|
3457
3752
|
* @param messages Message IDs
|
|
@@ -3468,7 +3763,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3468
3763
|
* For messages that were not found, `null` will be
|
|
3469
3764
|
* returned at that position.
|
|
3470
3765
|
*
|
|
3471
|
-
* **Available**:
|
|
3766
|
+
* **Available**: ✅ both users and bots
|
|
3472
3767
|
*
|
|
3473
3768
|
* @param messageIds Messages IDs
|
|
3474
3769
|
* @param [fromReply]
|
|
@@ -3547,7 +3842,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3547
3842
|
/**
|
|
3548
3843
|
* Iterate over chat history. Wrapper over {@link getHistory}
|
|
3549
3844
|
*
|
|
3550
|
-
* **Available**:
|
|
3845
|
+
* **Available**: 👤 users only
|
|
3551
3846
|
*
|
|
3552
3847
|
* @param chatId Chat's marked ID, its username, phone or `"me"` or `"self"`.
|
|
3553
3848
|
* @param params Additional fetch parameters
|
|
@@ -3571,7 +3866,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3571
3866
|
*
|
|
3572
3867
|
* Wrapper over {@link getReactionUsers}.
|
|
3573
3868
|
*
|
|
3574
|
-
* **Available**:
|
|
3869
|
+
* **Available**: 👤 users only
|
|
3575
3870
|
*
|
|
3576
3871
|
* @param chatId Chat ID
|
|
3577
3872
|
* @param messageId Message ID
|
|
@@ -3598,7 +3893,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3598
3893
|
*
|
|
3599
3894
|
* **Note**: Due to Telegram limitations, you can only get up to ~10000 messages
|
|
3600
3895
|
*
|
|
3601
|
-
* **Available**:
|
|
3896
|
+
* **Available**: 👤 users only
|
|
3602
3897
|
*
|
|
3603
3898
|
* @param params Search parameters
|
|
3604
3899
|
*/
|
|
@@ -3622,7 +3917,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3622
3917
|
*
|
|
3623
3918
|
* Iterable version of {@link searchMessages}
|
|
3624
3919
|
*
|
|
3625
|
-
* **Available**:
|
|
3920
|
+
* **Available**: 👤 users only
|
|
3626
3921
|
*
|
|
3627
3922
|
* @param chatId Chat's marked ID, its username, phone or `"me"` or `"self"`.
|
|
3628
3923
|
* @param params Additional search parameters
|
|
@@ -3648,7 +3943,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3648
3943
|
* For supergroups/channels, you must have appropriate permissions,
|
|
3649
3944
|
* either as an admin, or as default permissions
|
|
3650
3945
|
*
|
|
3651
|
-
* **Available**:
|
|
3946
|
+
* **Available**: ✅ both users and bots
|
|
3652
3947
|
*
|
|
3653
3948
|
* @returns Service message about pinned message, if one was generated.
|
|
3654
3949
|
*/
|
|
@@ -3765,7 +4060,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3765
4060
|
*
|
|
3766
4061
|
* Iterable version of {@link searchHashtag}
|
|
3767
4062
|
*
|
|
3768
|
-
* **Available**:
|
|
4063
|
+
* **Available**: 👤 users only
|
|
3769
4064
|
*
|
|
3770
4065
|
* @param hashtag Hashtag to search for
|
|
3771
4066
|
* @param params Additional parameters
|
|
@@ -3908,7 +4203,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3908
4203
|
* If this is a normal message (not a channel post),
|
|
3909
4204
|
* a simple reply will be sent.
|
|
3910
4205
|
*
|
|
3911
|
-
* **Available**:
|
|
4206
|
+
* **Available**: 👤 users only
|
|
3912
4207
|
*
|
|
3913
4208
|
* @throws MtArgumentError
|
|
3914
4209
|
* If this is a channel post which does not have comments section.
|
|
@@ -3921,7 +4216,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3921
4216
|
* If this is a normal message (not a channel post),
|
|
3922
4217
|
* a simple reply will be sent.
|
|
3923
4218
|
*
|
|
3924
|
-
* **Available**:
|
|
4219
|
+
* **Available**: 👤 users only
|
|
3925
4220
|
*
|
|
3926
4221
|
* @throws MtArgumentError
|
|
3927
4222
|
* If this is a channel post which does not have comments section.
|
|
@@ -3934,7 +4229,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3934
4229
|
* If this is a normal message (not a channel post),
|
|
3935
4230
|
* a simple reply will be sent.
|
|
3936
4231
|
*
|
|
3937
|
-
* **Available**:
|
|
4232
|
+
* **Available**: 👤 users only
|
|
3938
4233
|
*
|
|
3939
4234
|
* @throws MtArgumentError
|
|
3940
4235
|
* If this is a channel post which does not have comments section.
|
|
@@ -3980,7 +4275,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3980
4275
|
* To add a caption to the group, add caption to the first
|
|
3981
4276
|
* media in the group and don't add caption for any other.
|
|
3982
4277
|
*
|
|
3983
|
-
* **Available**:
|
|
4278
|
+
* **Available**: ✅ both users and bots
|
|
3984
4279
|
*
|
|
3985
4280
|
* @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
|
|
3986
4281
|
* @param medias Medias contained in the message.
|
|
@@ -4009,7 +4304,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4009
4304
|
/**
|
|
4010
4305
|
* Send a single media (a photo or a document-based media)
|
|
4011
4306
|
*
|
|
4012
|
-
* **Available**:
|
|
4307
|
+
* **Available**: ✅ both users and bots
|
|
4013
4308
|
*
|
|
4014
4309
|
* @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
|
|
4015
4310
|
* @param media
|
|
@@ -4099,7 +4394,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4099
4394
|
/**
|
|
4100
4395
|
* Send or remove a reaction.
|
|
4101
4396
|
*
|
|
4102
|
-
* **Available**:
|
|
4397
|
+
* **Available**: ✅ both users and bots
|
|
4103
4398
|
*
|
|
4104
4399
|
* @returns
|
|
4105
4400
|
* Message to which the reaction was sent, if available.
|
|
@@ -4125,7 +4420,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4125
4420
|
/**
|
|
4126
4421
|
* Send a rich message
|
|
4127
4422
|
*
|
|
4128
|
-
* **Available**:
|
|
4423
|
+
* **Available**: ✅ both users and bots
|
|
4129
4424
|
*
|
|
4130
4425
|
* @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
|
|
4131
4426
|
* @param params Rich message contents and additional sending parameters
|
|
@@ -4171,7 +4466,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4171
4466
|
/**
|
|
4172
4467
|
* Send a text message
|
|
4173
4468
|
*
|
|
4174
|
-
* **Available**:
|
|
4469
|
+
* **Available**: ✅ both users and bots
|
|
4175
4470
|
*
|
|
4176
4471
|
* @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
|
|
4177
4472
|
* @param text Text of the message
|
|
@@ -4207,13 +4502,13 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4207
4502
|
*
|
|
4208
4503
|
* If you need a continuous typing status, use {@link setTyping} instead.
|
|
4209
4504
|
*
|
|
4210
|
-
* **Available**:
|
|
4505
|
+
* **Available**: ✅ both users and bots
|
|
4211
4506
|
*
|
|
4212
4507
|
* @param chatId Chat ID
|
|
4213
4508
|
* @param [status='typing'] Typing status
|
|
4214
4509
|
* @param params
|
|
4215
4510
|
*/
|
|
4216
|
-
sendTyping(chatId: InputPeerLike, status?:
|
|
4511
|
+
sendTyping(chatId: InputPeerLike, status?: SendableTypingStatus | tl.TypeSendMessageAction, params?: {
|
|
4217
4512
|
/**
|
|
4218
4513
|
* For `upload_*` and history import actions, progress of the upload
|
|
4219
4514
|
*/
|
|
@@ -4246,7 +4541,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4246
4541
|
*
|
|
4247
4542
|
* This status is automatically renewed by mtcute until a further
|
|
4248
4543
|
* call with `cancel` is made, or a message is sent to the chat.
|
|
4249
|
-
* **Available**:
|
|
4544
|
+
* **Available**: ✅ both users and bots
|
|
4250
4545
|
*
|
|
4251
4546
|
*/
|
|
4252
4547
|
setTyping(params: {
|
|
@@ -4257,7 +4552,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4257
4552
|
*
|
|
4258
4553
|
* @default `typing`
|
|
4259
4554
|
*/
|
|
4260
|
-
status?:
|
|
4555
|
+
status?: SendableTypingStatus | tl.TypeSendMessageAction;
|
|
4261
4556
|
/**
|
|
4262
4557
|
* For `upload_*` and history import actions, progress of the upload
|
|
4263
4558
|
*/
|
|
@@ -4312,7 +4607,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4312
4607
|
/**
|
|
4313
4608
|
* Unpin all pinned messages in a chat.
|
|
4314
4609
|
*
|
|
4315
|
-
* **Available**:
|
|
4610
|
+
* **Available**: ✅ both users and bots
|
|
4316
4611
|
*
|
|
4317
4612
|
* @param chatId Chat or user ID
|
|
4318
4613
|
*/
|
|
@@ -4333,7 +4628,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4333
4628
|
* For supergroups/channels, you must have appropriate permissions,
|
|
4334
4629
|
* either as an admin, or as default permissions
|
|
4335
4630
|
*
|
|
4336
|
-
* **Available**:
|
|
4631
|
+
* **Available**: ✅ both users and bots
|
|
4337
4632
|
*
|
|
4338
4633
|
* @param chatId Chat ID, username, phone number, `"self"` or `"me"`
|
|
4339
4634
|
* @param messageId Message ID
|
|
@@ -4430,7 +4725,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4430
4725
|
/**
|
|
4431
4726
|
* Check if the current user can apply boost to some channel
|
|
4432
4727
|
*
|
|
4433
|
-
* **Available**:
|
|
4728
|
+
* **Available**: 👤 users only
|
|
4434
4729
|
*
|
|
4435
4730
|
* @returns
|
|
4436
4731
|
* - `{ can: true }` if the user can apply boost
|
|
@@ -4528,7 +4823,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4528
4823
|
* You can either pass `self` to get your own transactions,
|
|
4529
4824
|
* or a chat/bot ID to get transactions of that peer.
|
|
4530
4825
|
*
|
|
4531
|
-
* **Available**:
|
|
4826
|
+
* **Available**: ✅ both users and bots
|
|
4532
4827
|
*
|
|
4533
4828
|
* @param peerId Peer ID
|
|
4534
4829
|
* @param params Additional parameters
|
|
@@ -4561,7 +4856,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4561
4856
|
* Iterate over boosters of a channel.
|
|
4562
4857
|
*
|
|
4563
4858
|
* Wrapper over {@link getBoosters}
|
|
4564
|
-
* **Available**:
|
|
4859
|
+
* **Available**: 👤 users only
|
|
4565
4860
|
*
|
|
4566
4861
|
*/
|
|
4567
4862
|
iterBoosters(peerId: InputPeerLike, params?: Parameters<typeof getBoosts>[2] & {
|
|
@@ -4650,7 +4945,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4650
4945
|
*
|
|
4651
4946
|
* For bots the sticker set must have been created by this bot.
|
|
4652
4947
|
*
|
|
4653
|
-
* **Available**:
|
|
4948
|
+
* **Available**: ✅ both users and bots
|
|
4654
4949
|
*
|
|
4655
4950
|
* @param setId Sticker set short name or TL object with input sticker set
|
|
4656
4951
|
* @param sticker Sticker to be added
|
|
@@ -4669,7 +4964,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4669
4964
|
/**
|
|
4670
4965
|
* Create a new sticker set.
|
|
4671
4966
|
*
|
|
4672
|
-
* **Available**:
|
|
4967
|
+
* **Available**: ✅ both users and bots
|
|
4673
4968
|
*
|
|
4674
4969
|
* @param params
|
|
4675
4970
|
* @returns Newly created sticker set
|
|
@@ -4737,7 +5032,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4737
5032
|
*
|
|
4738
5033
|
* For bots the sticker set must have been created by this bot.
|
|
4739
5034
|
*
|
|
4740
|
-
* **Available**:
|
|
5035
|
+
* **Available**: ✅ both users and bots
|
|
4741
5036
|
*
|
|
4742
5037
|
* @param sticker
|
|
4743
5038
|
* TDLib and Bot API compatible File ID, or a
|
|
@@ -4748,7 +5043,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4748
5043
|
/**
|
|
4749
5044
|
* Get custom emoji stickers by their IDs, or `null` if not available/found.
|
|
4750
5045
|
*
|
|
4751
|
-
* **Available**:
|
|
5046
|
+
* **Available**: ✅ both users and bots
|
|
4752
5047
|
*
|
|
4753
5048
|
* @param ids IDs of the stickers (as defined in {@link MessageEntity.emojiId})
|
|
4754
5049
|
*/
|
|
@@ -4783,7 +5078,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4783
5078
|
/**
|
|
4784
5079
|
* Get a sticker set and stickers inside of it.
|
|
4785
5080
|
*
|
|
4786
|
-
* **Available**:
|
|
5081
|
+
* **Available**: ✅ both users and bots
|
|
4787
5082
|
*
|
|
4788
5083
|
* @param setId Sticker set identifier
|
|
4789
5084
|
*/
|
|
@@ -4794,7 +5089,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4794
5089
|
*
|
|
4795
5090
|
* For bots the sticker set must have been created by this bot.
|
|
4796
5091
|
*
|
|
4797
|
-
* **Available**:
|
|
5092
|
+
* **Available**: ✅ both users and bots
|
|
4798
5093
|
*
|
|
4799
5094
|
* @param sticker
|
|
4800
5095
|
* TDLib and Bot API compatible File ID, or a
|
|
@@ -4828,7 +5123,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4828
5123
|
/**
|
|
4829
5124
|
* Set group sticker set for a supergroup
|
|
4830
5125
|
*
|
|
4831
|
-
* **Available**:
|
|
5126
|
+
* **Available**: ✅ both users and bots
|
|
4832
5127
|
*
|
|
4833
5128
|
* @param setId Sticker set short name or a TL object with input sticker set
|
|
4834
5129
|
* @param thumb Sticker set thumbnail
|
|
@@ -4839,7 +5134,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4839
5134
|
/**
|
|
4840
5135
|
* Set sticker set thumbnail
|
|
4841
5136
|
*
|
|
4842
|
-
* **Available**:
|
|
5137
|
+
* **Available**: ✅ both users and bots
|
|
4843
5138
|
*
|
|
4844
5139
|
* @param id Sticker set short name or a TL object with input sticker set
|
|
4845
5140
|
* @param thumb Sticker set thumbnail
|
|
@@ -4889,7 +5184,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4889
5184
|
/**
|
|
4890
5185
|
* Edit a sent story
|
|
4891
5186
|
*
|
|
4892
|
-
* **Available**:
|
|
5187
|
+
* **Available**: ✅ both users and bots
|
|
4893
5188
|
*
|
|
4894
5189
|
* @returns Edited story
|
|
4895
5190
|
*/
|
|
@@ -5069,7 +5364,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
5069
5364
|
* Iterate over all stories (e.g. to load the top bar)
|
|
5070
5365
|
*
|
|
5071
5366
|
* Wrapper over {@link getAllStories}
|
|
5072
|
-
* **Available**:
|
|
5367
|
+
* **Available**: 👤 users only
|
|
5073
5368
|
*
|
|
5074
5369
|
*/
|
|
5075
5370
|
iterAllStories(params?: Parameters<typeof getAllStories>[1] & {
|
|
@@ -5082,7 +5377,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
5082
5377
|
}): AsyncIterableIterator<PeerStories>;
|
|
5083
5378
|
/**
|
|
5084
5379
|
* Iterate over profile stories. Wrapper over {@link getProfileStories}
|
|
5085
|
-
* **Available**:
|
|
5380
|
+
* **Available**: 👤 users only
|
|
5086
5381
|
*
|
|
5087
5382
|
*/
|
|
5088
5383
|
iterProfileStories(peerId: InputPeerLike, params?: Parameters<typeof getProfileStories>[2] & {
|
|
@@ -5103,7 +5398,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
5103
5398
|
/**
|
|
5104
5399
|
* Iterate over viewers list of a story.
|
|
5105
5400
|
* Wrapper over {@link getStoryViewers}
|
|
5106
|
-
* **Available**:
|
|
5401
|
+
* **Available**: 👤 users only
|
|
5107
5402
|
*
|
|
5108
5403
|
*/
|
|
5109
5404
|
iterStoryViewers(peerId: InputPeerLike, storyId: number, params?: Parameters<typeof getStoryViewers>[3] & {
|
|
@@ -5149,7 +5444,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
5149
5444
|
/**
|
|
5150
5445
|
* Send a story
|
|
5151
5446
|
*
|
|
5152
|
-
* **Available**:
|
|
5447
|
+
* **Available**: ✅ both users and bots
|
|
5153
5448
|
*
|
|
5154
5449
|
* @returns Created story
|
|
5155
5450
|
*/
|
|
@@ -5280,7 +5575,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
5280
5575
|
getGlobalTtl(): Promise<number>;
|
|
5281
5576
|
/**
|
|
5282
5577
|
* Get currently authorized user's full information
|
|
5283
|
-
* **Available**:
|
|
5578
|
+
* **Available**: ✅ both users and bots
|
|
5284
5579
|
*
|
|
5285
5580
|
*/
|
|
5286
5581
|
getMe(): Promise<User>;
|
|
@@ -5298,7 +5593,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
5298
5593
|
/**
|
|
5299
5594
|
* Get a single profile picture of a user by its ID
|
|
5300
5595
|
*
|
|
5301
|
-
* **Available**:
|
|
5596
|
+
* **Available**: ✅ both users and bots
|
|
5302
5597
|
*
|
|
5303
5598
|
* @param userId User ID, username, phone number, `"me"` or `"self"`
|
|
5304
5599
|
* @param photoId ID of the photo to fetch
|
|
@@ -5308,7 +5603,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
5308
5603
|
/**
|
|
5309
5604
|
* Get a list of profile pictures of a user
|
|
5310
5605
|
*
|
|
5311
|
-
* **Available**:
|
|
5606
|
+
* **Available**: ✅ both users and bots
|
|
5312
5607
|
*
|
|
5313
5608
|
* @param userId User ID, username, phone number, `"me"` or `"self"`
|
|
5314
5609
|
* @param params
|
|
@@ -5329,7 +5624,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
5329
5624
|
}): Promise<ArrayPaginated<Photo, number>>;
|
|
5330
5625
|
/**
|
|
5331
5626
|
* Get music files saved to the user's profile
|
|
5332
|
-
* **Available**:
|
|
5627
|
+
* **Available**: ✅ both users and bots
|
|
5333
5628
|
*
|
|
5334
5629
|
*/
|
|
5335
5630
|
getSavedMusic(params: {
|
|
@@ -5471,7 +5766,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
5471
5766
|
* - yourself (`self`)
|
|
5472
5767
|
* - supergroups or channels with enough boosts which you are an admin of
|
|
5473
5768
|
* - for bots – users who gave you the appropriate permissions
|
|
5474
|
-
* **Available**:
|
|
5769
|
+
* **Available**: ✅ both users and bots
|
|
5475
5770
|
*
|
|
5476
5771
|
*/
|
|
5477
5772
|
setEmojiStatus(params: {
|
|
@@ -5512,7 +5807,7 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
5512
5807
|
* Set a new profile photo or video for the current user.
|
|
5513
5808
|
*
|
|
5514
5809
|
* You can also pass a file ID or an InputPhoto to re-use existing photo.
|
|
5515
|
-
* **Available**:
|
|
5810
|
+
* **Available**: ✅ both users and bots
|
|
5516
5811
|
*
|
|
5517
5812
|
*/
|
|
5518
5813
|
setMyProfilePhoto(params: {
|