@mtcute/core 0.13.0 → 0.13.2
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/cjs/highlevel/base.js +1 -1
- package/cjs/highlevel/base.js.map +1 -1
- package/cjs/highlevel/client.d.ts +22 -1
- package/cjs/highlevel/client.js +8 -0
- package/cjs/highlevel/client.js.map +1 -1
- package/cjs/highlevel/methods/_imports.js.map +1 -1
- package/cjs/highlevel/methods/chats/get-nearby-chats.js +1 -1
- package/cjs/highlevel/methods/chats/get-nearby-chats.js.map +1 -1
- package/cjs/highlevel/methods/chats/open-chat.d.ts +4 -0
- package/cjs/highlevel/methods/chats/open-chat.js +4 -0
- package/cjs/highlevel/methods/chats/open-chat.js.map +1 -1
- package/cjs/highlevel/methods/dialogs/get-chatlist-preview.d.ts +8 -0
- package/cjs/highlevel/methods/dialogs/get-chatlist-preview.js +18 -0
- package/cjs/highlevel/methods/dialogs/get-chatlist-preview.js.map +1 -0
- package/cjs/highlevel/methods/dialogs/iter-dialogs.js +52 -3
- package/cjs/highlevel/methods/dialogs/iter-dialogs.js.map +1 -1
- package/cjs/highlevel/methods/dialogs/join-chatlist.d.ts +15 -0
- package/cjs/highlevel/methods/dialogs/join-chatlist.js +42 -0
- package/cjs/highlevel/methods/dialogs/join-chatlist.js.map +1 -0
- package/cjs/highlevel/methods/messages/get-message-reactions.js +1 -0
- package/cjs/highlevel/methods/messages/get-message-reactions.js.map +1 -1
- package/cjs/highlevel/methods/premium/get-business-connection.js +1 -0
- package/cjs/highlevel/methods/premium/get-business-connection.js.map +1 -1
- package/cjs/highlevel/methods/users/set-offline.js +1 -3
- package/cjs/highlevel/methods/users/set-offline.js.map +1 -1
- package/cjs/highlevel/methods.d.ts +2 -0
- package/cjs/highlevel/methods.js +9 -5
- package/cjs/highlevel/methods.js.map +1 -1
- package/cjs/highlevel/types/bots/keyboards/index.d.ts +1 -0
- package/cjs/highlevel/types/bots/keyboards/index.js +1 -0
- package/cjs/highlevel/types/bots/keyboards/index.js.map +1 -1
- package/cjs/highlevel/types/peers/chat.d.ts +2 -0
- package/cjs/highlevel/types/peers/chat.js +4 -0
- package/cjs/highlevel/types/peers/chat.js.map +1 -1
- package/cjs/highlevel/types/peers/chatlist-preview.d.ts +21 -0
- package/cjs/highlevel/types/peers/chatlist-preview.js +49 -0
- package/cjs/highlevel/types/peers/chatlist-preview.js.map +1 -0
- package/cjs/highlevel/types/peers/index.d.ts +1 -0
- package/cjs/highlevel/types/peers/index.js +1 -0
- package/cjs/highlevel/types/peers/index.js.map +1 -1
- package/cjs/network/network-manager.js +2 -2
- package/cjs/network/network-manager.js.map +1 -1
- package/cjs/utils/links/misc.d.ts +6 -0
- package/cjs/utils/links/misc.js +24 -1
- package/cjs/utils/links/misc.js.map +1 -1
- package/esm/highlevel/base.js +1 -1
- package/esm/highlevel/base.js.map +1 -1
- package/esm/highlevel/client.d.ts +22 -1
- package/esm/highlevel/client.js +8 -0
- package/esm/highlevel/client.js.map +1 -1
- package/esm/highlevel/methods/_imports.js.map +1 -1
- package/esm/highlevel/methods/chats/get-nearby-chats.js +1 -1
- package/esm/highlevel/methods/chats/get-nearby-chats.js.map +1 -1
- package/esm/highlevel/methods/chats/open-chat.d.ts +4 -0
- package/esm/highlevel/methods/chats/open-chat.js +4 -0
- package/esm/highlevel/methods/chats/open-chat.js.map +1 -1
- package/esm/highlevel/methods/dialogs/get-chatlist-preview.d.ts +8 -0
- package/esm/highlevel/methods/dialogs/get-chatlist-preview.js +14 -0
- package/esm/highlevel/methods/dialogs/get-chatlist-preview.js.map +1 -0
- package/esm/highlevel/methods/dialogs/iter-dialogs.js +53 -4
- package/esm/highlevel/methods/dialogs/iter-dialogs.js.map +1 -1
- package/esm/highlevel/methods/dialogs/join-chatlist.d.ts +15 -0
- package/esm/highlevel/methods/dialogs/join-chatlist.js +38 -0
- package/esm/highlevel/methods/dialogs/join-chatlist.js.map +1 -0
- package/esm/highlevel/methods/messages/get-message-reactions.js +1 -0
- package/esm/highlevel/methods/messages/get-message-reactions.js.map +1 -1
- package/esm/highlevel/methods/premium/get-business-connection.js +1 -0
- package/esm/highlevel/methods/premium/get-business-connection.js.map +1 -1
- package/esm/highlevel/methods/users/set-offline.js +1 -3
- package/esm/highlevel/methods/users/set-offline.js.map +1 -1
- package/esm/highlevel/methods.d.ts +2 -0
- package/esm/highlevel/methods.js +2 -0
- package/esm/highlevel/methods.js.map +1 -1
- package/esm/highlevel/types/bots/keyboards/index.d.ts +1 -0
- package/esm/highlevel/types/bots/keyboards/index.js +1 -0
- package/esm/highlevel/types/bots/keyboards/index.js.map +1 -1
- package/esm/highlevel/types/peers/chat.d.ts +2 -0
- package/esm/highlevel/types/peers/chat.js +4 -0
- package/esm/highlevel/types/peers/chat.js.map +1 -1
- package/esm/highlevel/types/peers/chatlist-preview.d.ts +21 -0
- package/esm/highlevel/types/peers/chatlist-preview.js +46 -0
- package/esm/highlevel/types/peers/chatlist-preview.js.map +1 -0
- package/esm/highlevel/types/peers/index.d.ts +1 -0
- package/esm/highlevel/types/peers/index.js +1 -0
- package/esm/highlevel/types/peers/index.js.map +1 -1
- package/esm/network/network-manager.js +2 -2
- package/esm/network/network-manager.js.map +1 -1
- package/esm/utils/links/misc.d.ts +6 -0
- package/esm/utils/links/misc.js +23 -0
- package/esm/utils/links/misc.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../src/highlevel/methods.ts"],"names":[],"mappings":";;;;;;;;AAAA,kCAAkC;AAClC,sEAAgE;AAAvD,kHAAA,aAAa,OAAA;AACtB,4EAAqE;AAA5D,uHAAA,eAAe,OAAA;AACxB,wDAAkD;AAAzC,oGAAA,MAAM,OAAA;AACf,0EAAoE;AAA3D,sHAAA,eAAe,OAAA;AACxB,gEAA0D;AAAjD,4GAAA,UAAU,OAAA;AACnB,gDAA2C;AAAlC,6FAAA,GAAG,OAAA;AACZ,4DAAsD;AA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AA;AACxB,+EAAwE;AAA/D,yHAAA,gBAAgB,OAAA;AACzB,6DAAuD;AAA9C,wGAAA,QAAQ,OAAA;AACjB,iFAA0E;AAAjE,2HAAA,iBAAiB,OAAA;AAC1B,mEAA6D;AAApD,8GAAA,WAAW,OAAA;AACpB,mEAA6D;AAApD,8GAAA,WAAW,OAAA;AACpB,mEAAgE;AAAvD,iHAAA,cAAc,OAAA;AACvB,6EAAsE;AAA7D,uHAAA,eAAe,OAAA;AACxB,uEAAgE;AAAvD,iHAAA,YAAY,OAAA;AACrB,yEAAkE;AAAzD,mHAAA,aAAa,OAAA;AACtB,iFAAyE;AAAhE,0HAAA,gBAAgB,OAAA;AACzB,mFAA2E;AAAlE,4HAAA,iBAAiB,OAAA;AAC1B,yEAAkE;AAAzD,mHAAA,aAAa,OAAA;AACtB,iEAA2D;AAAlD,4GAAA,UAAU,OAAA;AACnB,mEAA6D;AAApD,8GAAA,WAAW,OAAA;AACpB,uEAAiE;AAAxD,kHAAA,aAAa,OAAA","sourcesContent":["/* THIS FILE WAS AUTO-GENERATED */\nexport { checkPassword } from './methods/auth/check-password.js'\nexport { getPasswordHint } from './methods/auth/get-password-hint.js'\nexport { logOut } from './methods/auth/log-out.js'\nexport { recoverPassword } from './methods/auth/recover-password.js'\nexport { resendCode } from './methods/auth/resend-code.js'\nexport { run } from './methods/auth/run.js'\nexport { sendCode } from './methods/auth/send-code.js'\nexport { sendRecoveryCode } from './methods/auth/send-recovery-code.js'\nexport { signIn } from './methods/auth/sign-in.js'\nexport { signInBot } from './methods/auth/sign-in-bot.js'\nexport { start } from './methods/auth/start.js'\nexport { startTest } from './methods/auth/start-test.js'\nexport { isSelfPeer } from './methods/auth/utils.js'\nexport { answerCallbackQuery } from './methods/bots/answer-callback-query.js'\nexport { answerInlineQuery } from './methods/bots/answer-inline-query.js'\nexport { answerPreCheckoutQuery } from './methods/bots/answer-pre-checkout-query.js'\nexport { deleteMyCommands } from './methods/bots/delete-my-commands.js'\nexport { getBotInfo } from './methods/bots/get-bot-info.js'\nexport { getBotMenuButton } from './methods/bots/get-bot-menu-button.js'\nexport { getCallbackAnswer } from './methods/bots/get-callback-answer.js'\nexport { getGameHighScores } from './methods/bots/get-game-high-scores.js'\nexport { getInlineGameHighScores } from './methods/bots/get-game-high-scores.js'\nexport { getMyCommands } from './methods/bots/get-my-commands.js'\nexport { setBotInfo } from './methods/bots/set-bot-info.js'\nexport { setBotMenuButton } from './methods/bots/set-bot-menu-button.js'\nexport { setGameScore } from './methods/bots/set-game-score.js'\nexport { setInlineGameScore } from './methods/bots/set-game-score.js'\nexport { setMyCommands } from './methods/bots/set-my-commands.js'\nexport { setMyDefaultRights } from './methods/bots/set-my-default-rights.js'\nexport { addChatMembers } from './methods/chats/add-chat-members.js'\nexport { archiveChats } from './methods/chats/archive-chats.js'\nexport { banChatMember } from './methods/chats/ban-chat-member.js'\nexport { createChannel } from './methods/chats/create-channel.js'\nexport type { CreateGroupResult } from './methods/chats/create-group.js'\nexport { createGroup } from './methods/chats/create-group.js'\nexport { createSupergroup } from './methods/chats/create-supergroup.js'\nexport { deleteChannel } from './methods/chats/delete-channel.js'\nexport { deleteChatPhoto } from './methods/chats/delete-chat-photo.js'\nexport { deleteGroup } from './methods/chats/delete-group.js'\nexport { deleteHistory } from './methods/chats/delete-history.js'\nexport { deleteUserHistory } from './methods/chats/delete-user-history.js'\nexport { editAdminRights } from './methods/chats/edit-admin-rights.js'\nexport { getChat } from './methods/chats/get-chat.js'\nexport { getChatEventLog } from './methods/chats/get-chat-event-log.js'\nexport { getChatMember } from './methods/chats/get-chat-member.js'\nexport { getChatMembers } from './methods/chats/get-chat-members.js'\nexport { getChatPreview } from './methods/chats/get-chat-preview.js'\nexport { getFullChat } from './methods/chats/get-full-chat.js'\nexport { getNearbyChats } from './methods/chats/get-nearby-chats.js'\nexport { getSimilarChannels } from './methods/chats/get-similar-channels.js'\nexport { iterChatEventLog } from './methods/chats/iter-chat-event-log.js'\nexport { iterChatMembers } from './methods/chats/iter-chat-members.js'\nexport { joinChat } from './methods/chats/join-chat.js'\nexport { kickChatMember } from './methods/chats/kick-chat-member.js'\nexport { leaveChat } from './methods/chats/leave-chat.js'\nexport { markChatUnread } from './methods/chats/mark-chat-unread.js'\nexport { openChat } from './methods/chats/open-chat.js'\nexport { closeChat } from './methods/chats/open-chat.js'\nexport { reorderUsernames } from './methods/chats/reorder-usernames.js'\nexport { restrictChatMember } from './methods/chats/restrict-chat-member.js'\nexport { saveDraft } from './methods/chats/save-draft.js'\nexport { setChatColor } from './methods/chats/set-chat-color.js'\nexport { setChatDefaultPermissions } from './methods/chats/set-chat-default-permissions.js'\nexport { setChatDescription } from './methods/chats/set-chat-description.js'\nexport { setChatPhoto } from './methods/chats/set-chat-photo.js'\nexport { setChatTitle } from './methods/chats/set-chat-title.js'\nexport { setChatTtl } from './methods/chats/set-chat-ttl.js'\nexport { setChatUsername } from './methods/chats/set-chat-username.js'\nexport { setSlowMode } from './methods/chats/set-slow-mode.js'\nexport { toggleContentProtection } from './methods/chats/toggle-content-protection.js'\nexport { toggleFragmentUsername } from './methods/chats/toggle-fragment-username.js'\nexport { toggleJoinRequests } from './methods/chats/toggle-join-requests.js'\nexport { toggleJoinToSend } from './methods/chats/toggle-join-to-send.js'\nexport { unarchiveChats } from './methods/chats/unarchive-chats.js'\nexport { unbanChatMember } from './methods/chats/unban-chat-member.js'\nexport { addContact } from './methods/contacts/add-contact.js'\nexport { deleteContacts } from './methods/contacts/delete-contacts.js'\nexport { getContacts } from './methods/contacts/get-contacts.js'\nexport { importContacts } from './methods/contacts/import-contacts.js'\nexport { createFolder } from './methods/dialogs/create-folder.js'\nexport { deleteFolder } from './methods/dialogs/delete-folder.js'\nexport { editFolder } from './methods/dialogs/edit-folder.js'\nexport { findDialogs } from './methods/dialogs/find-dialogs.js'\nexport { findFolder } from './methods/dialogs/find-folder.js'\nexport { getFolders } from './methods/dialogs/get-folders.js'\nexport { getPeerDialogs } from './methods/dialogs/get-peer-dialogs.js'\nexport { iterDialogs } from './methods/dialogs/iter-dialogs.js'\nexport { setFoldersOrder } from './methods/dialogs/set-folders-order.js'\nexport { downloadAsBuffer } from './methods/files/download-buffer.js'\nexport { downloadAsIterable } from './methods/files/download-iterable.js'\nexport { downloadAsStream } from './methods/files/download-stream.js'\nexport { _normalizeInputFile } from './methods/files/normalize-input-file.js'\nexport { _normalizeInputMedia } from './methods/files/normalize-input-media.js'\nexport { uploadFile } from './methods/files/upload-file.js'\nexport { uploadMedia } from './methods/files/upload-media.js'\nexport { createForumTopic } from './methods/forums/create-forum-topic.js'\nexport { deleteForumTopicHistory } from './methods/forums/delete-forum-topic-history.js'\nexport { editForumTopic } from './methods/forums/edit-forum-topic.js'\nexport type { GetForumTopicsOffset } from './methods/forums/get-forum-topics.js'\nexport { getForumTopics } from './methods/forums/get-forum-topics.js'\nexport { getForumTopicsById } from './methods/forums/get-forum-topics-by-id.js'\nexport { iterForumTopics } from './methods/forums/iter-forum-topics.js'\nexport { reorderPinnedForumTopics } from './methods/forums/reorder-pinned-forum-topics.js'\nexport { toggleForum } from './methods/forums/toggle-forum.js'\nexport { toggleForumTopicClosed } from './methods/forums/toggle-forum-topic-closed.js'\nexport { toggleForumTopicPinned } from './methods/forums/toggle-forum-topic-pinned.js'\nexport { toggleGeneralTopicHidden } from './methods/forums/toggle-general-topic-hidden.js'\nexport { createInviteLink } from './methods/invite-links/create-invite-link.js'\nexport { editInviteLink } from './methods/invite-links/edit-invite-link.js'\nexport { exportInviteLink } from './methods/invite-links/export-invite-link.js'\nexport { getInviteLink } from './methods/invite-links/get-invite-link.js'\nexport { getInviteLinkMembers } from './methods/invite-links/get-invite-link-members.js'\nexport type { GetInviteLinksOffset } from './methods/invite-links/get-invite-links.js'\nexport { getInviteLinks } from './methods/invite-links/get-invite-links.js'\nexport { getPrimaryInviteLink } from './methods/invite-links/get-primary-invite-link.js'\nexport { hideAllJoinRequests } from './methods/invite-links/hide-all-join-requests.js'\nexport { hideJoinRequest } from './methods/invite-links/hide-join-request.js'\nexport { iterInviteLinkMembers } from './methods/invite-links/iter-invite-link-members.js'\nexport { iterInviteLinks } from './methods/invite-links/iter-invite-links.js'\nexport { revokeInviteLink } from './methods/invite-links/revoke-invite-link.js'\nexport { closePoll } from './methods/messages/close-poll.js'\nexport type { DeleteMessagesParams } from './methods/messages/delete-messages.js'\nexport { deleteMessagesById } from './methods/messages/delete-messages.js'\nexport { deleteMessages } from './methods/messages/delete-messages.js'\nexport { deleteScheduledMessages } from './methods/messages/delete-scheduled-messages.js'\nexport { editInlineMessage } from './methods/messages/edit-inline-message.js'\nexport { editMessage } from './methods/messages/edit-message.js'\nexport type { ForwardMessageOptions } from './methods/messages/forward-messages.js'\nexport { forwardMessagesById } from './methods/messages/forward-messages.js'\nexport { forwardMessages } from './methods/messages/forward-messages.js'\nexport { getAllScheduledMessages } from './methods/messages/get-all-scheduled-messages.js'\nexport { getAvailableMessageEffects } from './methods/messages/get-available-effects.js'\nexport { getCallbackQueryMessage } from './methods/messages/get-callback-query-message.js'\nexport { getDiscussionMessage } from './methods/messages/get-discussion-message.js'\nexport { getFactCheck } from './methods/messages/get-fact-check.js'\nexport type { GetHistoryOffset } from './methods/messages/get-history.js'\nexport { getHistory } from './methods/messages/get-history.js'\nexport { getMessageByLink } from './methods/messages/get-message-by-link.js'\nexport { getMessageGroup } from './methods/messages/get-message-group.js'\nexport { getMessageReactionsById } from './methods/messages/get-message-reactions.js'\nexport { getMessageReactions } from './methods/messages/get-message-reactions.js'\nexport { getMessages } from './methods/messages/get-messages.js'\nexport { getMessagesUnsafe } from './methods/messages/get-messages-unsafe.js'\nexport type { GetReactionUsersOffset } from './methods/messages/get-reaction-users.js'\nexport { getReactionUsers } from './methods/messages/get-reaction-users.js'\nexport { getReplyTo } from './methods/messages/get-reply-to.js'\nexport { getScheduledMessages } from './methods/messages/get-scheduled-messages.js'\nexport { iterHistory } from './methods/messages/iter-history.js'\nexport { iterReactionUsers } from './methods/messages/iter-reaction-users.js'\nexport { iterSearchGlobal } from './methods/messages/iter-search-global.js'\nexport { iterSearchMessages } from './methods/messages/iter-search-messages.js'\nexport { pinMessage } from './methods/messages/pin-message.js'\nexport { readHistory } from './methods/messages/read-history.js'\nexport { readReactions } from './methods/messages/read-reactions.js'\nexport type { SearchGlobalOffset } from './methods/messages/search-global.js'\nexport { searchGlobal } from './methods/messages/search-global.js'\nexport type { SearchHashtagOffset } from './methods/messages/search-hashtag.js'\nexport { searchHashtag } from './methods/messages/search-hashtag.js'\nexport { iterSearchHashtag } from './methods/messages/search-hashtag.js'\nexport type { SearchMessagesOffset } from './methods/messages/search-messages.js'\nexport { searchMessages } from './methods/messages/search-messages.js'\nexport { answerText } from './methods/messages/send-answer.js'\nexport { answerMedia } from './methods/messages/send-answer.js'\nexport { answerMediaGroup } from './methods/messages/send-answer.js'\nexport { commentText } from './methods/messages/send-comment.js'\nexport { commentMedia } from './methods/messages/send-comment.js'\nexport { commentMediaGroup } from './methods/messages/send-comment.js'\nexport type { SendCopyParams } from './methods/messages/send-copy.js'\nexport { sendCopy } from './methods/messages/send-copy.js'\nexport type { SendCopyGroupParams } from './methods/messages/send-copy-group.js'\nexport { sendCopyGroup } from './methods/messages/send-copy-group.js'\nexport { sendMedia } from './methods/messages/send-media.js'\nexport { sendMediaGroup } from './methods/messages/send-media-group.js'\nexport type { QuoteParamsFrom } from './methods/messages/send-quote.js'\nexport { quoteWithText } from './methods/messages/send-quote.js'\nexport { quoteWithMedia } from './methods/messages/send-quote.js'\nexport { quoteWithMediaGroup } from './methods/messages/send-quote.js'\nexport { sendReaction } from './methods/messages/send-reaction.js'\nexport { replyText } from './methods/messages/send-reply.js'\nexport { replyMedia } from './methods/messages/send-reply.js'\nexport { replyMediaGroup } from './methods/messages/send-reply.js'\nexport { sendScheduled } from './methods/messages/send-scheduled.js'\nexport { sendText } from './methods/messages/send-text.js'\nexport { sendTyping } from './methods/messages/send-typing.js'\nexport { sendVote } from './methods/messages/send-vote.js'\nexport { translateMessage } from './methods/messages/translate-message.js'\nexport { translateText } from './methods/messages/translate-text.js'\nexport { unpinAllMessages } from './methods/messages/unpin-all-messages.js'\nexport { unpinMessage } from './methods/messages/unpin-message.js'\nexport { getCollectibleInfo } from './methods/misc/get-collectible-info.js'\nexport { initTakeoutSession } from './methods/misc/init-takeout-session.js'\nexport { _normalizePrivacyRules } from './methods/misc/normalize-privacy-rules.js'\nexport { changeCloudPassword } from './methods/password/change-cloud-password.js'\nexport { enableCloudPassword } from './methods/password/enable-cloud-password.js'\nexport { verifyPasswordEmail } from './methods/password/password-email.js'\nexport { resendPasswordEmail } from './methods/password/password-email.js'\nexport { cancelPasswordEmail } from './methods/password/password-email.js'\nexport { removeCloudPassword } from './methods/password/remove-cloud-password.js'\nexport { applyBoost } from './methods/premium/apply-boost.js'\nexport type { CanApplyBoostResult } from './methods/premium/can-apply-boost.js'\nexport { canApplyBoost } from './methods/premium/can-apply-boost.js'\nexport { createBusinessChatLink } from './methods/premium/create-business-chat-link.js'\nexport { editBusinessChatLink } from './methods/premium/edit-business-chat-link.js'\nexport { deleteBusinessChatLink } from './methods/premium/edit-business-chat-link.js'\nexport { getBoostStats } from './methods/premium/get-boost-stats.js'\nexport { getBoosts } from './methods/premium/get-boosts.js'\nexport { getBusinessChatLinks } from './methods/premium/get-business-chat-links.js'\nexport { getBusinessConnection } from './methods/premium/get-business-connection.js'\nexport { getMyBoostSlots } from './methods/premium/get-my-boost-slots.js'\nexport { iterBoosters } from './methods/premium/iter-boosters.js'\nexport { setBusinessIntro } from './methods/premium/set-business-intro.js'\nexport { setBusinessWorkHours } from './methods/premium/set-business-work-hours.js'\nexport { addStickerToSet } from './methods/stickers/add-sticker-to-set.js'\nexport { createStickerSet } from './methods/stickers/create-sticker-set.js'\nexport { deleteStickerFromSet } from './methods/stickers/delete-sticker-from-set.js'\nexport { getCustomEmojis } from './methods/stickers/get-custom-emojis.js'\nexport { getCustomEmojisFromMessages } from './methods/stickers/get-custom-emojis.js'\nexport { getInstalledStickers } from './methods/stickers/get-installed-stickers.js'\nexport { getMyStickerSets } from './methods/stickers/get-my-sticker-sets.js'\nexport { getStickerSet } from './methods/stickers/get-sticker-set.js'\nexport { moveStickerInSet } from './methods/stickers/move-sticker-in-set.js'\nexport { replaceStickerInSet } from './methods/stickers/replace-sticker-in-set.js'\nexport { setChatStickerSet } from './methods/stickers/set-chat-sticker-set.js'\nexport { setStickerSetThumb } from './methods/stickers/set-sticker-set-thumb.js'\nexport type { CanSendStoryResult } from './methods/stories/can-send-story.js'\nexport { canSendStory } from './methods/stories/can-send-story.js'\nexport { deleteStories } from './methods/stories/delete-stories.js'\nexport { editStory } from './methods/stories/edit-story.js'\nexport { getAllStories } from './methods/stories/get-all-stories.js'\nexport { getPeerStories } from './methods/stories/get-peer-stories.js'\nexport { getProfileStories } from './methods/stories/get-profile-stories.js'\nexport { getStoriesById } from './methods/stories/get-stories-by-id.js'\nexport { getStoriesInteractions } from './methods/stories/get-stories-interactions.js'\nexport { getStoryLink } from './methods/stories/get-story-link.js'\nexport { getStoryViewers } from './methods/stories/get-story-viewers.js'\nexport { hideMyStoriesViews } from './methods/stories/hide-my-stories-views.js'\nexport { incrementStoriesViews } from './methods/stories/increment-stories-views.js'\nexport { iterAllStories } from './methods/stories/iter-all-stories.js'\nexport { iterProfileStories } from './methods/stories/iter-profile-stories.js'\nexport { iterStoryViewers } from './methods/stories/iter-story-viewers.js'\nexport { readStories } from './methods/stories/read-stories.js'\nexport { reportStory } from './methods/stories/report-story.js'\nexport { sendStory } from './methods/stories/send-story.js'\nexport { sendStoryReaction } from './methods/stories/send-story-reaction.js'\nexport { togglePeerStoriesArchived } from './methods/stories/toggle-peer-stories-archived.js'\nexport { toggleStoriesPinned } from './methods/stories/toggle-stories-pinned.js'\nexport { blockUser } from './methods/users/block-user.js'\nexport { deleteProfilePhotos } from './methods/users/delete-profile-photos.js'\nexport { editCloseFriendsRaw } from './methods/users/edit-close-friends.js'\nexport { editCloseFriends } from './methods/users/edit-close-friends.js'\nexport { getCommonChats } from './methods/users/get-common-chats.js'\nexport { getGlobalTtl } from './methods/users/get-global-ttl.js'\nexport { getMe } from './methods/users/get-me.js'\nexport { getMyUsername } from './methods/users/get-my-username.js'\nexport { getProfilePhoto } from './methods/users/get-profile-photo.js'\nexport { getProfilePhotos } from './methods/users/get-profile-photos.js'\nexport { getUsers } from './methods/users/get-users.js'\nexport { iterProfilePhotos } from './methods/users/iter-profile-photos.js'\nexport { resolvePeer } from './methods/users/resolve-peer.js'\nexport { resolveUser } from './methods/users/resolve-peer.js'\nexport { resolveChannel } from './methods/users/resolve-peer.js'\nexport { resolvePeerMany } from './methods/users/resolve-peer-many.js'\nexport { setGlobalTtl } from './methods/users/set-global-ttl.js'\nexport { setMyBirthday } from './methods/users/set-my-birthday.js'\nexport { setMyEmojiStatus } from './methods/users/set-my-emoji-status.js'\nexport { setMyProfilePhoto } from './methods/users/set-my-profile-photo.js'\nexport { setMyUsername } from './methods/users/set-my-username.js'\nexport { setOffline } from './methods/users/set-offline.js'\nexport { unblockUser } from './methods/users/unblock-user.js'\nexport { updateProfile } from './methods/users/update-profile.js'\n"]}
|
|
1
|
+
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../src/highlevel/methods.ts"],"names":[],"mappings":";;;;;;;;AAAA,kCAAkC;AAClC,sEAAgE;AAAvD,kHAAA,aAAa,OAAA;AACtB,4EAAqE;AAA5D,uHAAA,eAAe,OAAA;AACxB,wDAAkD;AAAzC,oGAAA,MAAM,OAAA;AACf,0EAAoE;AAA3D,sHAAA,eAAe,OAAA;AACxB,gEAA0D;AAAjD,4GAAA,UAAU,OAAA;AACnB,gDAA2C;AAAlC,6FAAA,GAAG,OAAA;AACZ,4DAAsD;AAA7C,wGAAA,QAAQ,OAAA;AACjB,8EAAuE;AAA9D,yHAAA,gBAAgB,OAAA;AACzB,wDAAkD;AAAzC,oGAAA,MAAM,OAAA;AACf,gEAAyD;AAAhD,2GAAA,SAAS,OAAA;AAClB,oDAA+C;AAAtC,iGAAA,KAAK,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0E;AAAjE,2HAAA,iBAAiB,OAAA;AAC1B,mEAA6D;AAApD,8GAAA,WAAW,OAAA;AACpB,mEAA6D;AAApD,8GAAA,WAAW,OAAA;AACpB,mEAAgE;AAAvD,iHAAA,cAAc,OAAA;AACvB,6EAAsE;AAA7D,uHAAA,eAAe,OAAA;AACxB,uEAAgE;AAAvD,iHAAA,YAAY,OAAA;AACrB,yEAAkE;AAAzD,mHAAA,aAAa,OAAA;AACtB,iFAAyE;AAAhE,0HAAA,gBAAgB,OAAA;AACzB,mFAA2E;AAAlE,4HAAA,iBAAiB,OAAA;AAC1B,yEAAkE;AAAzD,mHAAA,aAAa,OAAA;AACtB,iEAA2D;AAAlD,4GAAA,UAAU,OAAA;AACnB,mEAA6D;AAApD,8GAAA,WAAW,OAAA;AACpB,uEAAiE;AAAxD,kHAAA,aAAa,OAAA","sourcesContent":["/* THIS FILE WAS AUTO-GENERATED */\nexport { checkPassword } from './methods/auth/check-password.js'\nexport { getPasswordHint } from './methods/auth/get-password-hint.js'\nexport { logOut } from './methods/auth/log-out.js'\nexport { recoverPassword } from './methods/auth/recover-password.js'\nexport { resendCode } from './methods/auth/resend-code.js'\nexport { run } from './methods/auth/run.js'\nexport { sendCode } from './methods/auth/send-code.js'\nexport { sendRecoveryCode } from './methods/auth/send-recovery-code.js'\nexport { signIn } from './methods/auth/sign-in.js'\nexport { signInBot } from './methods/auth/sign-in-bot.js'\nexport { start } from './methods/auth/start.js'\nexport { startTest } from './methods/auth/start-test.js'\nexport { isSelfPeer } from './methods/auth/utils.js'\nexport { answerCallbackQuery } from './methods/bots/answer-callback-query.js'\nexport { answerInlineQuery } from './methods/bots/answer-inline-query.js'\nexport { answerPreCheckoutQuery } from './methods/bots/answer-pre-checkout-query.js'\nexport { deleteMyCommands } from './methods/bots/delete-my-commands.js'\nexport { getBotInfo } from './methods/bots/get-bot-info.js'\nexport { getBotMenuButton } from './methods/bots/get-bot-menu-button.js'\nexport { getCallbackAnswer } from './methods/bots/get-callback-answer.js'\nexport { getGameHighScores } from './methods/bots/get-game-high-scores.js'\nexport { getInlineGameHighScores } from './methods/bots/get-game-high-scores.js'\nexport { getMyCommands } from './methods/bots/get-my-commands.js'\nexport { setBotInfo } from './methods/bots/set-bot-info.js'\nexport { setBotMenuButton } from './methods/bots/set-bot-menu-button.js'\nexport { setGameScore } from './methods/bots/set-game-score.js'\nexport { setInlineGameScore } from './methods/bots/set-game-score.js'\nexport { setMyCommands } from './methods/bots/set-my-commands.js'\nexport { setMyDefaultRights } from './methods/bots/set-my-default-rights.js'\nexport { addChatMembers } from './methods/chats/add-chat-members.js'\nexport { archiveChats } from './methods/chats/archive-chats.js'\nexport { banChatMember } from './methods/chats/ban-chat-member.js'\nexport { createChannel } from './methods/chats/create-channel.js'\nexport type { CreateGroupResult } from './methods/chats/create-group.js'\nexport { createGroup } from './methods/chats/create-group.js'\nexport { createSupergroup } from './methods/chats/create-supergroup.js'\nexport { deleteChannel } from './methods/chats/delete-channel.js'\nexport { deleteChatPhoto } from './methods/chats/delete-chat-photo.js'\nexport { deleteGroup } from './methods/chats/delete-group.js'\nexport { deleteHistory } from './methods/chats/delete-history.js'\nexport { deleteUserHistory } from './methods/chats/delete-user-history.js'\nexport { editAdminRights } from './methods/chats/edit-admin-rights.js'\nexport { getChat } from './methods/chats/get-chat.js'\nexport { getChatEventLog } from './methods/chats/get-chat-event-log.js'\nexport { getChatMember } from './methods/chats/get-chat-member.js'\nexport { getChatMembers } from './methods/chats/get-chat-members.js'\nexport { getChatPreview } from './methods/chats/get-chat-preview.js'\nexport { getFullChat } from './methods/chats/get-full-chat.js'\nexport { getNearbyChats } from './methods/chats/get-nearby-chats.js'\nexport { getSimilarChannels } from './methods/chats/get-similar-channels.js'\nexport { iterChatEventLog } from './methods/chats/iter-chat-event-log.js'\nexport { iterChatMembers } from './methods/chats/iter-chat-members.js'\nexport { joinChat } from './methods/chats/join-chat.js'\nexport { kickChatMember } from './methods/chats/kick-chat-member.js'\nexport { leaveChat } from './methods/chats/leave-chat.js'\nexport { markChatUnread } from './methods/chats/mark-chat-unread.js'\nexport { openChat } from './methods/chats/open-chat.js'\nexport { closeChat } from './methods/chats/open-chat.js'\nexport { reorderUsernames } from './methods/chats/reorder-usernames.js'\nexport { restrictChatMember } from './methods/chats/restrict-chat-member.js'\nexport { saveDraft } from './methods/chats/save-draft.js'\nexport { setChatColor } from './methods/chats/set-chat-color.js'\nexport { setChatDefaultPermissions } from './methods/chats/set-chat-default-permissions.js'\nexport { setChatDescription } from './methods/chats/set-chat-description.js'\nexport { setChatPhoto } from './methods/chats/set-chat-photo.js'\nexport { setChatTitle } from './methods/chats/set-chat-title.js'\nexport { setChatTtl } from './methods/chats/set-chat-ttl.js'\nexport { setChatUsername } from './methods/chats/set-chat-username.js'\nexport { setSlowMode } from './methods/chats/set-slow-mode.js'\nexport { toggleContentProtection } from './methods/chats/toggle-content-protection.js'\nexport { toggleFragmentUsername } from './methods/chats/toggle-fragment-username.js'\nexport { toggleJoinRequests } from './methods/chats/toggle-join-requests.js'\nexport { toggleJoinToSend } from './methods/chats/toggle-join-to-send.js'\nexport { unarchiveChats } from './methods/chats/unarchive-chats.js'\nexport { unbanChatMember } from './methods/chats/unban-chat-member.js'\nexport { addContact } from './methods/contacts/add-contact.js'\nexport { deleteContacts } from './methods/contacts/delete-contacts.js'\nexport { getContacts } from './methods/contacts/get-contacts.js'\nexport { importContacts } from './methods/contacts/import-contacts.js'\nexport { createFolder } from './methods/dialogs/create-folder.js'\nexport { deleteFolder } from './methods/dialogs/delete-folder.js'\nexport { editFolder } from './methods/dialogs/edit-folder.js'\nexport { findDialogs } from './methods/dialogs/find-dialogs.js'\nexport { findFolder } from './methods/dialogs/find-folder.js'\nexport { getChatlistPreview } from './methods/dialogs/get-chatlist-preview.js'\nexport { getFolders } from './methods/dialogs/get-folders.js'\nexport { getPeerDialogs } from './methods/dialogs/get-peer-dialogs.js'\nexport { iterDialogs } from './methods/dialogs/iter-dialogs.js'\nexport { joinChatlist } from './methods/dialogs/join-chatlist.js'\nexport { setFoldersOrder } from './methods/dialogs/set-folders-order.js'\nexport { downloadAsBuffer } from './methods/files/download-buffer.js'\nexport { downloadAsIterable } from './methods/files/download-iterable.js'\nexport { downloadAsStream } from './methods/files/download-stream.js'\nexport { _normalizeInputFile } from './methods/files/normalize-input-file.js'\nexport { _normalizeInputMedia } from './methods/files/normalize-input-media.js'\nexport { uploadFile } from './methods/files/upload-file.js'\nexport { uploadMedia } from './methods/files/upload-media.js'\nexport { createForumTopic } from './methods/forums/create-forum-topic.js'\nexport { deleteForumTopicHistory } from './methods/forums/delete-forum-topic-history.js'\nexport { editForumTopic } from './methods/forums/edit-forum-topic.js'\nexport type { GetForumTopicsOffset } from './methods/forums/get-forum-topics.js'\nexport { getForumTopics } from './methods/forums/get-forum-topics.js'\nexport { getForumTopicsById } from './methods/forums/get-forum-topics-by-id.js'\nexport { iterForumTopics } from './methods/forums/iter-forum-topics.js'\nexport { reorderPinnedForumTopics } from './methods/forums/reorder-pinned-forum-topics.js'\nexport { toggleForum } from './methods/forums/toggle-forum.js'\nexport { toggleForumTopicClosed } from './methods/forums/toggle-forum-topic-closed.js'\nexport { toggleForumTopicPinned } from './methods/forums/toggle-forum-topic-pinned.js'\nexport { toggleGeneralTopicHidden } from './methods/forums/toggle-general-topic-hidden.js'\nexport { createInviteLink } from './methods/invite-links/create-invite-link.js'\nexport { editInviteLink } from './methods/invite-links/edit-invite-link.js'\nexport { exportInviteLink } from './methods/invite-links/export-invite-link.js'\nexport { getInviteLink } from './methods/invite-links/get-invite-link.js'\nexport { getInviteLinkMembers } from './methods/invite-links/get-invite-link-members.js'\nexport type { GetInviteLinksOffset } from './methods/invite-links/get-invite-links.js'\nexport { getInviteLinks } from './methods/invite-links/get-invite-links.js'\nexport { getPrimaryInviteLink } from './methods/invite-links/get-primary-invite-link.js'\nexport { hideAllJoinRequests } from './methods/invite-links/hide-all-join-requests.js'\nexport { hideJoinRequest } from './methods/invite-links/hide-join-request.js'\nexport { iterInviteLinkMembers } from './methods/invite-links/iter-invite-link-members.js'\nexport { iterInviteLinks } from './methods/invite-links/iter-invite-links.js'\nexport { revokeInviteLink } from './methods/invite-links/revoke-invite-link.js'\nexport { closePoll } from './methods/messages/close-poll.js'\nexport type { DeleteMessagesParams } from './methods/messages/delete-messages.js'\nexport { deleteMessagesById } from './methods/messages/delete-messages.js'\nexport { deleteMessages } from './methods/messages/delete-messages.js'\nexport { deleteScheduledMessages } from './methods/messages/delete-scheduled-messages.js'\nexport { editInlineMessage } from './methods/messages/edit-inline-message.js'\nexport { editMessage } from './methods/messages/edit-message.js'\nexport type { ForwardMessageOptions } from './methods/messages/forward-messages.js'\nexport { forwardMessagesById } from './methods/messages/forward-messages.js'\nexport { forwardMessages } from './methods/messages/forward-messages.js'\nexport { getAllScheduledMessages } from './methods/messages/get-all-scheduled-messages.js'\nexport { getAvailableMessageEffects } from './methods/messages/get-available-effects.js'\nexport { getCallbackQueryMessage } from './methods/messages/get-callback-query-message.js'\nexport { getDiscussionMessage } from './methods/messages/get-discussion-message.js'\nexport { getFactCheck } from './methods/messages/get-fact-check.js'\nexport type { GetHistoryOffset } from './methods/messages/get-history.js'\nexport { getHistory } from './methods/messages/get-history.js'\nexport { getMessageByLink } from './methods/messages/get-message-by-link.js'\nexport { getMessageGroup } from './methods/messages/get-message-group.js'\nexport { getMessageReactionsById } from './methods/messages/get-message-reactions.js'\nexport { getMessageReactions } from './methods/messages/get-message-reactions.js'\nexport { getMessages } from './methods/messages/get-messages.js'\nexport { getMessagesUnsafe } from './methods/messages/get-messages-unsafe.js'\nexport type { GetReactionUsersOffset } from './methods/messages/get-reaction-users.js'\nexport { getReactionUsers } from './methods/messages/get-reaction-users.js'\nexport { getReplyTo } from './methods/messages/get-reply-to.js'\nexport { getScheduledMessages } from './methods/messages/get-scheduled-messages.js'\nexport { iterHistory } from './methods/messages/iter-history.js'\nexport { iterReactionUsers } from './methods/messages/iter-reaction-users.js'\nexport { iterSearchGlobal } from './methods/messages/iter-search-global.js'\nexport { iterSearchMessages } from './methods/messages/iter-search-messages.js'\nexport { pinMessage } from './methods/messages/pin-message.js'\nexport { readHistory } from './methods/messages/read-history.js'\nexport { readReactions } from './methods/messages/read-reactions.js'\nexport type { SearchGlobalOffset } from './methods/messages/search-global.js'\nexport { searchGlobal } from './methods/messages/search-global.js'\nexport type { SearchHashtagOffset } from './methods/messages/search-hashtag.js'\nexport { searchHashtag } from './methods/messages/search-hashtag.js'\nexport { iterSearchHashtag } from './methods/messages/search-hashtag.js'\nexport type { SearchMessagesOffset } from './methods/messages/search-messages.js'\nexport { searchMessages } from './methods/messages/search-messages.js'\nexport { answerText } from './methods/messages/send-answer.js'\nexport { answerMedia } from './methods/messages/send-answer.js'\nexport { answerMediaGroup } from './methods/messages/send-answer.js'\nexport { commentText } from './methods/messages/send-comment.js'\nexport { commentMedia } from './methods/messages/send-comment.js'\nexport { commentMediaGroup } from './methods/messages/send-comment.js'\nexport type { SendCopyParams } from './methods/messages/send-copy.js'\nexport { sendCopy } from './methods/messages/send-copy.js'\nexport type { SendCopyGroupParams } from './methods/messages/send-copy-group.js'\nexport { sendCopyGroup } from './methods/messages/send-copy-group.js'\nexport { sendMedia } from './methods/messages/send-media.js'\nexport { sendMediaGroup } from './methods/messages/send-media-group.js'\nexport type { QuoteParamsFrom } from './methods/messages/send-quote.js'\nexport { quoteWithText } from './methods/messages/send-quote.js'\nexport { quoteWithMedia } from './methods/messages/send-quote.js'\nexport { quoteWithMediaGroup } from './methods/messages/send-quote.js'\nexport { sendReaction } from './methods/messages/send-reaction.js'\nexport { replyText } from './methods/messages/send-reply.js'\nexport { replyMedia } from './methods/messages/send-reply.js'\nexport { replyMediaGroup } from './methods/messages/send-reply.js'\nexport { sendScheduled } from './methods/messages/send-scheduled.js'\nexport { sendText } from './methods/messages/send-text.js'\nexport { sendTyping } from './methods/messages/send-typing.js'\nexport { sendVote } from './methods/messages/send-vote.js'\nexport { translateMessage } from './methods/messages/translate-message.js'\nexport { translateText } from './methods/messages/translate-text.js'\nexport { unpinAllMessages } from './methods/messages/unpin-all-messages.js'\nexport { unpinMessage } from './methods/messages/unpin-message.js'\nexport { getCollectibleInfo } from './methods/misc/get-collectible-info.js'\nexport { initTakeoutSession } from './methods/misc/init-takeout-session.js'\nexport { _normalizePrivacyRules } from './methods/misc/normalize-privacy-rules.js'\nexport { changeCloudPassword } from './methods/password/change-cloud-password.js'\nexport { enableCloudPassword } from './methods/password/enable-cloud-password.js'\nexport { verifyPasswordEmail } from './methods/password/password-email.js'\nexport { resendPasswordEmail } from './methods/password/password-email.js'\nexport { cancelPasswordEmail } from './methods/password/password-email.js'\nexport { removeCloudPassword } from './methods/password/remove-cloud-password.js'\nexport { applyBoost } from './methods/premium/apply-boost.js'\nexport type { CanApplyBoostResult } from './methods/premium/can-apply-boost.js'\nexport { canApplyBoost } from './methods/premium/can-apply-boost.js'\nexport { createBusinessChatLink } from './methods/premium/create-business-chat-link.js'\nexport { editBusinessChatLink } from './methods/premium/edit-business-chat-link.js'\nexport { deleteBusinessChatLink } from './methods/premium/edit-business-chat-link.js'\nexport { getBoostStats } from './methods/premium/get-boost-stats.js'\nexport { getBoosts } from './methods/premium/get-boosts.js'\nexport { getBusinessChatLinks } from './methods/premium/get-business-chat-links.js'\nexport { getBusinessConnection } from './methods/premium/get-business-connection.js'\nexport { getMyBoostSlots } from './methods/premium/get-my-boost-slots.js'\nexport { iterBoosters } from './methods/premium/iter-boosters.js'\nexport { setBusinessIntro } from './methods/premium/set-business-intro.js'\nexport { setBusinessWorkHours } from './methods/premium/set-business-work-hours.js'\nexport { addStickerToSet } from './methods/stickers/add-sticker-to-set.js'\nexport { createStickerSet } from './methods/stickers/create-sticker-set.js'\nexport { deleteStickerFromSet } from './methods/stickers/delete-sticker-from-set.js'\nexport { getCustomEmojis } from './methods/stickers/get-custom-emojis.js'\nexport { getCustomEmojisFromMessages } from './methods/stickers/get-custom-emojis.js'\nexport { getInstalledStickers } from './methods/stickers/get-installed-stickers.js'\nexport { getMyStickerSets } from './methods/stickers/get-my-sticker-sets.js'\nexport { getStickerSet } from './methods/stickers/get-sticker-set.js'\nexport { moveStickerInSet } from './methods/stickers/move-sticker-in-set.js'\nexport { replaceStickerInSet } from './methods/stickers/replace-sticker-in-set.js'\nexport { setChatStickerSet } from './methods/stickers/set-chat-sticker-set.js'\nexport { setStickerSetThumb } from './methods/stickers/set-sticker-set-thumb.js'\nexport type { CanSendStoryResult } from './methods/stories/can-send-story.js'\nexport { canSendStory } from './methods/stories/can-send-story.js'\nexport { deleteStories } from './methods/stories/delete-stories.js'\nexport { editStory } from './methods/stories/edit-story.js'\nexport { getAllStories } from './methods/stories/get-all-stories.js'\nexport { getPeerStories } from './methods/stories/get-peer-stories.js'\nexport { getProfileStories } from './methods/stories/get-profile-stories.js'\nexport { getStoriesById } from './methods/stories/get-stories-by-id.js'\nexport { getStoriesInteractions } from './methods/stories/get-stories-interactions.js'\nexport { getStoryLink } from './methods/stories/get-story-link.js'\nexport { getStoryViewers } from './methods/stories/get-story-viewers.js'\nexport { hideMyStoriesViews } from './methods/stories/hide-my-stories-views.js'\nexport { incrementStoriesViews } from './methods/stories/increment-stories-views.js'\nexport { iterAllStories } from './methods/stories/iter-all-stories.js'\nexport { iterProfileStories } from './methods/stories/iter-profile-stories.js'\nexport { iterStoryViewers } from './methods/stories/iter-story-viewers.js'\nexport { readStories } from './methods/stories/read-stories.js'\nexport { reportStory } from './methods/stories/report-story.js'\nexport { sendStory } from './methods/stories/send-story.js'\nexport { sendStoryReaction } from './methods/stories/send-story-reaction.js'\nexport { togglePeerStoriesArchived } from './methods/stories/toggle-peer-stories-archived.js'\nexport { toggleStoriesPinned } from './methods/stories/toggle-stories-pinned.js'\nexport { blockUser } from './methods/users/block-user.js'\nexport { deleteProfilePhotos } from './methods/users/delete-profile-photos.js'\nexport { editCloseFriendsRaw } from './methods/users/edit-close-friends.js'\nexport { editCloseFriends } from './methods/users/edit-close-friends.js'\nexport { getCommonChats } from './methods/users/get-common-chats.js'\nexport { getGlobalTtl } from './methods/users/get-global-ttl.js'\nexport { getMe } from './methods/users/get-me.js'\nexport { getMyUsername } from './methods/users/get-my-username.js'\nexport { getProfilePhoto } from './methods/users/get-profile-photo.js'\nexport { getProfilePhotos } from './methods/users/get-profile-photos.js'\nexport { getUsers } from './methods/users/get-users.js'\nexport { iterProfilePhotos } from './methods/users/iter-profile-photos.js'\nexport { resolvePeer } from './methods/users/resolve-peer.js'\nexport { resolveUser } from './methods/users/resolve-peer.js'\nexport { resolveChannel } from './methods/users/resolve-peer.js'\nexport { resolvePeerMany } from './methods/users/resolve-peer-many.js'\nexport { setGlobalTtl } from './methods/users/set-global-ttl.js'\nexport { setMyBirthday } from './methods/users/set-my-birthday.js'\nexport { setMyEmojiStatus } from './methods/users/set-my-emoji-status.js'\nexport { setMyProfilePhoto } from './methods/users/set-my-profile-photo.js'\nexport { setMyUsername } from './methods/users/set-my-username.js'\nexport { setOffline } from './methods/users/set-offline.js'\nexport { unblockUser } from './methods/users/unblock-user.js'\nexport { updateProfile } from './methods/users/update-profile.js'\n"]}
|
|
@@ -27,6 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.BotKeyboard = void 0;
|
|
30
|
+
__exportStar(require("./builder.js"), exports);
|
|
30
31
|
__exportStar(require("./types.js"), exports);
|
|
31
32
|
const BotKeyboard = __importStar(require("./factories.js"));
|
|
32
33
|
exports.BotKeyboard = BotKeyboard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/highlevel/types/bots/keyboards/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0B;AAC1B,4DAA6C;AAazC,kCAAW","sourcesContent":["export * from './types.js'\nimport * as BotKeyboard from './factories.js'\n\nexport {\n /**\n * Convenience methods wrapping TL\n * objects creation for bot keyboard buttons.\n *\n * You can also use the type-discriminated objects directly.\n *\n * > **Note**: Button creation functions are intended to be used\n * > with inline reply markup, unless stated otherwise\n * > in the description.\n */\n BotKeyboard,\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/highlevel/types/bots/keyboards/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,6CAA0B;AAC1B,4DAA6C;AAazC,kCAAW","sourcesContent":["export * from './builder.js'\nexport * from './types.js'\nimport * as BotKeyboard from './factories.js'\n\nexport {\n /**\n * Convenience methods wrapping TL\n * objects creation for bot keyboard buttons.\n *\n * You can also use the type-discriminated objects directly.\n *\n * > **Note**: Button creation functions are intended to be used\n * > with inline reply markup, unless stated otherwise\n * > in the description.\n */\n BotKeyboard,\n}\n"]}
|
|
@@ -102,6 +102,8 @@ export declare class Chat {
|
|
|
102
102
|
get isContact(): boolean;
|
|
103
103
|
/** Whether this peer is a forum supergroup */
|
|
104
104
|
get isForum(): boolean;
|
|
105
|
+
/** Whether the chat is not available (e.g. because the user was banned from there) */
|
|
106
|
+
get isUnavailable(): boolean;
|
|
105
107
|
/**
|
|
106
108
|
* Whether the current user is a member of the chat.
|
|
107
109
|
*
|
|
@@ -201,6 +201,10 @@ class Chat {
|
|
|
201
201
|
get isForum() {
|
|
202
202
|
return this.peer._ === 'channel' && this.peer.forum;
|
|
203
203
|
}
|
|
204
|
+
/** Whether the chat is not available (e.g. because the user was banned from there) */
|
|
205
|
+
get isUnavailable() {
|
|
206
|
+
return this.peer._ === 'chatForbidden' || this.peer._ === 'channelForbidden';
|
|
207
|
+
}
|
|
204
208
|
/**
|
|
205
209
|
* Whether the current user is a member of the chat.
|
|
206
210
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../../../src/highlevel/types/peers/chat.ts"],"names":[],"mappings":";;;AAEA,wDAAgF;AAChF,g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AAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACtC,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAA;QAC9B,CAAC;QAED,IAAI,CAAC,IAAI;YAAE,IAAI,GAAG,IAAI,CAAC,WAAW,CAAA;QAClC,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAA;QAE/B,OAAO,IAAI,iCAAa,CACpB;YACI,CAAC,EAAE,sBAAsB;YACzB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,EAAE,gBAAgB,IAAI,CAAC,QAAQ,EAAE;SACvC,EACD,IAAI,CACP,CAAA;IACL,CAAC;CACJ;AApgBD,oBAogBC;AAED,IAAA,2BAAc,EAAC,IAAI,EAAE;IACjB,WAAW;IACX,UAAU;IACV,WAAW;IACX,OAAO;IACP,aAAa;IACb,oBAAoB;IACpB,MAAM;IACN,OAAO;CACV,CAAC,CAAA;AACF,IAAA,0BAAe,EAAC,IAAI,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA","sourcesContent":["import { tl } from '@mtcute/tl'\n\nimport { MtArgumentError, MtTypeAssertionError } from '../../../types/errors.js'\nimport { getMarkedPeerId } from '../../../utils/peer-utils.js'\nimport { makeInspectable } from '../../utils/index.js'\nimport { memoizeGetters } from '../../utils/memoize.js'\nimport { MessageEntity } from '../messages/message-entity.js'\nimport { EmojiStatus } from '../reactions/emoji-status.js'\nimport { ChatColors } from './chat-colors.js'\nimport { ChatPermissions } from './chat-permissions.js'\nimport { ChatPhoto } from './chat-photo.js'\nimport { PeersIndex } from './peers-index.js'\nimport { User } from './user.js'\n\n/**\n * Chat type. Can be:\n * - `private`: PM with other users or yourself (Saved Messages)\n * - `bot`: PM with a bot\n * - `group`: Legacy group\n * - `supergroup`: Supergroup\n * - `channel`: Broadcast channel\n * - `gigagroup`: Gigagroup aka Broadcast group\n */\nexport type ChatType = 'private' | 'bot' | 'group' | 'supergroup' | 'channel' | 'gigagroup'\n\n/**\n * A chat.\n */\nexport class Chat {\n readonly type = 'chat' as const\n\n /**\n * Raw peer object that this {@link Chat} represents.\n */\n readonly peer: tl.RawUser | tl.RawChat | tl.RawChannel | tl.RawChatForbidden | tl.RawChannelForbidden\n\n constructor(peer: tl.TypeUser | tl.TypeChat) {\n if (!peer) throw new MtArgumentError('peer is not available')\n\n switch (peer._) {\n case 'user':\n case 'chat':\n case 'channel':\n case 'chatForbidden':\n case 'channelForbidden':\n break\n default:\n throw new MtTypeAssertionError('peer', 'user | chat | channel', peer._)\n }\n\n this.peer = peer\n }\n\n /** Marked ID of this chat */\n get id(): number {\n return getMarkedPeerId(this.inputPeer)\n }\n\n /**\n * Whether this chat's information is incomplete.\n *\n * This usually only happens in large chats, where\n * the server sometimes sends only a part of the chat's\n * information. Basic info like name and profile photo\n * are always available, but other fields may be omitted\n * despite being available.\n *\n * It was observed that these fields may be missing:\n * - `isMember`\n * - and probably more\n *\n * This currently only ever happens for non-bot users, so if you are building\n * a normal bot, you can safely ignore this field.\n *\n * To fetch the \"complete\" user information, use one of these methods:\n * - {@link TelegramClient.getChat}\n * - {@link TelegramClient.getFullChat}.\n *\n * Learn more: [Incomplete peers](https://mtcute.dev/guide/topics/peers.html#incomplete-peers)\n */\n get isMin(): boolean {\n // avoid additional runtime checks\n return Boolean((this.peer as { min?: boolean }).min)\n }\n\n /**\n * Chat's input peer for advanced use-cases.\n *\n * > **Note**: for {@link min} chats, this method will return\n * > `mtcute.dummyInputPeerMin*`, which are actually not a valid input peer,\n * > These are used to indicate that the user is incomplete, and a message\n * > reference is needed to resolve the peer.\n * >\n * > Such objects are handled by {@link TelegramClient.resolvePeer} method,\n * so prefer using it whenever you need an input peer.\n */\n get inputPeer(): tl.TypeInputPeer {\n switch (this.peer._) {\n case 'user':\n if (this.peer.min) {\n return {\n _: 'mtcute.dummyInputPeerMinUser',\n userId: this.peer.id,\n }\n }\n\n if (!this.peer.accessHash) {\n throw new MtArgumentError(\"Peer's access hash is not available!\")\n }\n\n return {\n _: 'inputPeerUser',\n userId: this.peer.id,\n accessHash: this.peer.accessHash,\n }\n case 'chat':\n case 'chatForbidden':\n return {\n _: 'inputPeerChat',\n chatId: this.peer.id,\n }\n case 'channel':\n case 'channelForbidden':\n if ((this.peer as tl.RawChannel).min) {\n return {\n _: 'mtcute.dummyInputPeerMinChannel',\n channelId: this.peer.id,\n }\n }\n\n if (!this.peer.accessHash) {\n throw new MtArgumentError(\"Peer's access hash is not available!\")\n }\n\n return {\n _: 'inputPeerChannel',\n channelId: this.peer.id,\n accessHash: this.peer.accessHash,\n }\n }\n }\n\n /** Type of chat */\n get chatType(): ChatType {\n switch (this.peer._) {\n case 'user':\n return this.peer.bot ? 'bot' : 'private'\n case 'chat':\n case 'chatForbidden':\n return 'group'\n case 'channel':\n case 'channelForbidden':\n if (this.peer._ === 'channel' && this.peer.gigagroup) {\n return 'gigagroup'\n } else if (this.peer.broadcast) {\n return 'channel'\n }\n\n return 'supergroup'\n }\n }\n\n /**\n * Whether this chat is a group chat\n * (i.e. not a channel and not PM)\n */\n get isGroup(): boolean {\n switch (this.chatType) {\n case 'group':\n case 'supergroup':\n case 'gigagroup':\n return true\n }\n\n return false\n }\n\n /**\n * Whether this chat has been verified by Telegram.\n * Supergroups, channels and groups only\n */\n get isVerified(): boolean {\n return 'verified' in this.peer ? this.peer.verified! : false\n }\n\n /**\n * Whether this chat has been restricted.\n * See {@link restrictions} for details\n */\n get isRestricted(): boolean {\n return 'restricted' in this.peer ? this.peer.restricted! : false\n }\n\n /**\n * Whether this chat is owned by the current user.\n * Supergroups, channels and groups only\n */\n get isCreator(): boolean {\n return 'creator' in this.peer ? this.peer.creator! : false\n }\n\n /**\n * Whether current user has admin rights in this chat.\n * Supergroups, channels and groups only.\n */\n get isAdmin(): boolean {\n return 'adminRights' in this.peer && Boolean(this.peer.adminRights)\n }\n\n /** Whether this chat has been flagged for scam */\n get isScam(): boolean {\n return 'scam' in this.peer ? this.peer.scam! : false\n }\n\n /** Whether this chat has been flagged for impersonation */\n get isFake(): boolean {\n return 'fake' in this.peer ? this.peer.fake! : false\n }\n\n /** Whether this chat is part of the Telegram support team. Users and bots only */\n get isSupport(): boolean {\n return this.peer._ === 'user' && this.peer.support!\n }\n\n /** Whether this chat is chat with yourself (i.e. Saved Messages) */\n get isSelf(): boolean {\n return this.peer._ === 'user' && this.peer.self!\n }\n\n /** Whether this peer is your contact */\n get isContact(): boolean {\n return this.peer._ === 'user' && this.peer.contact!\n }\n\n /** Whether this peer is a forum supergroup */\n get isForum(): boolean {\n return this.peer._ === 'channel' && this.peer.forum!\n }\n\n /**\n * Whether the current user is a member of the chat.\n *\n * For users, this is always `true`.\n */\n get isMember(): boolean {\n switch (this.peer._) {\n case 'user':\n return true\n case 'channel':\n case 'chat':\n return !this.peer.left\n default:\n return false\n }\n }\n\n /** Whether you have hidden (arhived) this chat's stories */\n get storiesHidden(): boolean {\n return 'storiesHidden' in this.peer ? this.peer.storiesHidden! : false\n }\n\n get storiesUnavailable(): boolean {\n return 'storiesUnavailable' in this.peer ? this.peer.storiesUnavailable! : false\n }\n\n /** Whether this group is a channel/supergroup with join requests enabled */\n get hasJoinRequests(): boolean {\n return this.peer._ === 'channel' && this.peer.joinRequest!\n }\n\n /** Whether this group is a supergroup with join-to-send rule enabled */\n get hasJoinToSend(): boolean {\n return this.peer._ === 'channel' && this.peer.joinToSend!\n }\n\n /** Whether this group has content protection (i.e. disabled forwards) */\n get hasContentProtection(): boolean {\n return (this.peer._ === 'channel' || this.peer._ === 'chat') && this.peer.noforwards!\n }\n\n /**\n * Title, for supergroups, channels and groups\n */\n get title(): string | null {\n return this.peer._ !== 'user' ? this.peer.title ?? null : null\n }\n\n /**\n * Username, for private chats, bots, supergroups and channels if available\n */\n get username(): string | null {\n if (!('username' in this.peer)) return null\n\n return this.peer.username ?? this.peer.usernames?.[0].username ?? null\n }\n\n /**\n * Usernames (inclufing collectibles), for private chats, bots, supergroups and channels if available\n */\n get usernames(): ReadonlyArray<tl.RawUsername> | null {\n if (!('usernames' in this.peer)) return null\n\n return (\n this.peer.usernames ??\n (this.peer.username ? [{ _: 'username', username: this.peer.username, active: true }] : null)\n )\n }\n\n /**\n * First name of the other party in a private chat,\n * for private chats and bots\n */\n get firstName(): string | null {\n return this.peer._ === 'user' ? this.peer.firstName ?? null : null\n }\n\n /**\n * Last name of the other party in a private chat, for private chats\n */\n get lastName(): string | null {\n return this.peer._ === 'user' ? this.peer.lastName ?? null : null\n }\n\n /**\n * Get the display name of the chat.\n *\n * Title for groups and channels,\n * name (and last name if available) for users\n */\n get displayName(): string {\n if (this.peer._ === 'user') {\n if (this.peer.lastName) {\n return this.peer.firstName + ' ' + this.peer.lastName\n }\n\n return this.peer.firstName ?? 'Deleted Account'\n }\n\n return this.peer.title\n }\n\n /**\n * Chat photo, if any.\n * Suitable for downloads only.\n *\n * If full chat information is available, prefer {@link FullChat#fullPhoto} instead.\n */\n get photo(): ChatPhoto | null {\n if (\n !('photo' in this.peer) ||\n !this.peer.photo ||\n (this.peer.photo._ !== 'userProfilePhoto' && this.peer.photo._ !== 'chatPhoto')\n ) {\n return null\n }\n\n return new ChatPhoto(this.inputPeer, this.peer.photo)\n }\n\n /**\n * User's or bot's assigned DC (data center).\n * Available only in case the user has set a public profile photo.\n *\n * **Note**: this information is approximate; it is based on where\n * Telegram stores the current chat photo. It is accurate only in case\n * the owner has set the chat photo, otherwise it will be the DC assigned\n * to the administrator who set the current profile photo.\n */\n get dcId(): number | null {\n if (!('photo' in this.peer)) return null\n\n return (\n (this.peer.photo as Exclude<typeof this.peer.photo, tl.RawChatPhotoEmpty | tl.RawUserProfilePhotoEmpty>)\n ?.dcId ?? null\n )\n }\n\n /**\n * The list of reasons why this chat might be unavailable to some users.\n * This field is available only in case {@link isRestricted} is `true`\n */\n get restrictions(): ReadonlyArray<tl.RawRestrictionReason> | null {\n return 'restrictionReason' in this.peer ? this.peer.restrictionReason ?? null : null\n }\n\n /**\n * Current user's permissions, for supergroups.\n */\n get permissions(): ChatPermissions | null {\n if (!('bannedRights' in this.peer && this.peer.bannedRights)) {\n return null\n }\n\n return new ChatPermissions(this.peer.bannedRights)\n }\n\n /**\n * Default chat member permissions, for groups and supergroups.\n */\n get defaultPermissions(): ChatPermissions | null {\n if (!('defaultBannedRights' in this.peer) || !this.peer.defaultBannedRights) {\n return null\n }\n\n return new ChatPermissions(this.peer.defaultBannedRights)\n }\n\n /**\n * Admin rights of the current user in this chat.\n * `null` for PMs and non-administered chats\n */\n get adminRights(): tl.RawChatAdminRights | null {\n return 'adminRights' in this.peer ? this.peer.adminRights ?? null : null\n }\n\n /**\n * Distance in meters of this group chat from your location\n * Returned only in {@link TelegramClient.getNearbyChats}\n */\n readonly distance?: number\n\n /**\n * Maximum ID of stories this chat has (or 0 if none)\n */\n get storiesMaxId(): number {\n switch (this.peer._) {\n case 'channel':\n case 'user':\n return this.peer.storiesMaxId ?? 0\n }\n\n return 0\n }\n\n /**\n * Color that should be used when rendering replies to\n * the messages and web previews sent by this chat,\n * as well as to render the chat title\n */\n get color(): ChatColors {\n const color = this.peer._ === 'user' || this.peer._ === 'channel' ? this.peer.color : undefined\n\n return new ChatColors(this.peer.id, color)\n }\n\n /**\n * Chat's emoji status, if any.\n */\n get emojiStatus(): EmojiStatus | null {\n if (this.peer._ !== 'user' && this.peer._ !== 'channel') return null\n if (!this.peer.emojiStatus || this.peer.emojiStatus._ === 'emojiStatusEmpty') return null\n\n return new EmojiStatus(this.peer.emojiStatus)\n }\n\n /**\n * Color that should be used when rendering the header of\n * the user's profile\n *\n * If `null`, a generic header should be used instead\n */\n get profileColors(): ChatColors {\n const color = this.peer._ === 'user' || this.peer._ === 'channel' ? this.peer.profileColor : undefined\n\n return new ChatColors(this.peer.id, color)\n }\n\n /** Boosts level this chat has (0 if none or is not a channel) */\n get boostsLevel(): number {\n return this.peer._ === 'channel' ? this.peer.level ?? 0 : 0\n }\n\n /**\n * Get a {@link User} from this chat.\n *\n * Returns `null` if this is not a chat with user\n */\n get user(): User | null {\n if (this.peer._ !== 'user') return null\n\n return new User(this.peer)\n }\n\n /** @internal */\n static _parseFromMessage(message: tl.RawMessage | tl.RawMessageService, peers: PeersIndex): Chat {\n return Chat._parseFromPeer(message.peerId, peers)\n }\n\n /** @internal */\n static _parseFromPeer(peer: tl.TypePeer, peers: PeersIndex): Chat {\n switch (peer._) {\n case 'peerUser':\n return new Chat(peers.user(peer.userId))\n case 'peerChat':\n return new Chat(peers.chat(peer.chatId))\n }\n\n return new Chat(peers.chat(peer.channelId))\n }\n\n /**\n * Create a mention for the chat.\n *\n * If this is a user, works just like {@link User.mention}.\n * Otherwise, if the chat has a username, a `@username` is created\n * (or text link, if `text` is passed). If it does not, chat title is\n * simply returned without additional formatting.\n *\n * When available and `text` is omitted, this method will return `@username`.\n * Otherwise, text mention is created for the given (or default) parse mode\n *\n * Use `null` as `text` (first parameter) to force create a text\n * mention with display name, even if there is a username.\n *\n * > **Note**: This method doesn't format anything on its own.\n * > Instead, it returns a {@link MessageEntity} that can later\n * > be used with `html` or `md` template tags, or `unparse` method directly.\n *\n * @param text Text of the mention.\n * @example\n * ```typescript\n * msg.replyText(html`Hello, ${msg.chat.mention()`)\n * ```\n */\n mention(text?: string | null): string | MessageEntity {\n if (this.user) return this.user.mention(text)\n\n if (text === undefined && this.username) {\n return `@${this.username}`\n }\n\n if (!text) text = this.displayName\n if (!this.username) return text\n\n return new MessageEntity(\n {\n _: 'messageEntityTextUrl',\n offset: 0,\n length: text.length,\n url: `https://t.me/${this.username}`,\n },\n text,\n )\n }\n}\n\nmemoizeGetters(Chat, [\n 'inputPeer',\n 'chatType',\n 'usernames',\n 'photo',\n 'permissions',\n 'defaultPermissions',\n 'user',\n 'color',\n])\nmakeInspectable(Chat, [], ['user'])\n"]}
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../../../src/highlevel/types/peers/chat.ts"],"names":[],"mappings":";;;AAEA,wDAAgF;AAChF,gEAA8D;AAC9D,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C,IAAoB;QACxB,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QAE7C,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACtC,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAA;QAC9B,CAAC;QAED,IAAI,CAAC,IAAI;YAAE,IAAI,GAAG,IAAI,CAAC,WAAW,CAAA;QAClC,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAA;QAE/B,OAAO,IAAI,iCAAa,CACpB;YACI,CAAC,EAAE,sBAAsB;YACzB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,EAAE,gBAAgB,IAAI,CAAC,QAAQ,EAAE;SACvC,EACD,IAAI,CACP,CAAA;IACL,CAAC;CACJ;AAzgBD,oBAygBC;AAED,IAAA,2BAAc,EAAC,IAAI,EAAE;IACjB,WAAW;IACX,UAAU;IACV,WAAW;IACX,OAAO;IACP,aAAa;IACb,oBAAoB;IACpB,MAAM;IACN,OAAO;CACV,CAAC,CAAA;AACF,IAAA,0BAAe,EAAC,IAAI,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA","sourcesContent":["import { tl } from '@mtcute/tl'\n\nimport { MtArgumentError, MtTypeAssertionError } from '../../../types/errors.js'\nimport { getMarkedPeerId } from '../../../utils/peer-utils.js'\nimport { makeInspectable } from '../../utils/index.js'\nimport { memoizeGetters } from '../../utils/memoize.js'\nimport { MessageEntity } from '../messages/message-entity.js'\nimport { EmojiStatus } from '../reactions/emoji-status.js'\nimport { ChatColors } from './chat-colors.js'\nimport { ChatPermissions } from './chat-permissions.js'\nimport { ChatPhoto } from './chat-photo.js'\nimport { PeersIndex } from './peers-index.js'\nimport { User } from './user.js'\n\n/**\n * Chat type. Can be:\n * - `private`: PM with other users or yourself (Saved Messages)\n * - `bot`: PM with a bot\n * - `group`: Legacy group\n * - `supergroup`: Supergroup\n * - `channel`: Broadcast channel\n * - `gigagroup`: Gigagroup aka Broadcast group\n */\nexport type ChatType = 'private' | 'bot' | 'group' | 'supergroup' | 'channel' | 'gigagroup'\n\n/**\n * A chat.\n */\nexport class Chat {\n readonly type = 'chat' as const\n\n /**\n * Raw peer object that this {@link Chat} represents.\n */\n readonly peer: tl.RawUser | tl.RawChat | tl.RawChannel | tl.RawChatForbidden | tl.RawChannelForbidden\n\n constructor(peer: tl.TypeUser | tl.TypeChat) {\n if (!peer) throw new MtArgumentError('peer is not available')\n\n switch (peer._) {\n case 'user':\n case 'chat':\n case 'channel':\n case 'chatForbidden':\n case 'channelForbidden':\n break\n default:\n throw new MtTypeAssertionError('peer', 'user | chat | channel', peer._)\n }\n\n this.peer = peer\n }\n\n /** Marked ID of this chat */\n get id(): number {\n return getMarkedPeerId(this.inputPeer)\n }\n\n /**\n * Whether this chat's information is incomplete.\n *\n * This usually only happens in large chats, where\n * the server sometimes sends only a part of the chat's\n * information. Basic info like name and profile photo\n * are always available, but other fields may be omitted\n * despite being available.\n *\n * It was observed that these fields may be missing:\n * - `isMember`\n * - and probably more\n *\n * This currently only ever happens for non-bot users, so if you are building\n * a normal bot, you can safely ignore this field.\n *\n * To fetch the \"complete\" user information, use one of these methods:\n * - {@link TelegramClient.getChat}\n * - {@link TelegramClient.getFullChat}.\n *\n * Learn more: [Incomplete peers](https://mtcute.dev/guide/topics/peers.html#incomplete-peers)\n */\n get isMin(): boolean {\n // avoid additional runtime checks\n return Boolean((this.peer as { min?: boolean }).min)\n }\n\n /**\n * Chat's input peer for advanced use-cases.\n *\n * > **Note**: for {@link min} chats, this method will return\n * > `mtcute.dummyInputPeerMin*`, which are actually not a valid input peer,\n * > These are used to indicate that the user is incomplete, and a message\n * > reference is needed to resolve the peer.\n * >\n * > Such objects are handled by {@link TelegramClient.resolvePeer} method,\n * so prefer using it whenever you need an input peer.\n */\n get inputPeer(): tl.TypeInputPeer {\n switch (this.peer._) {\n case 'user':\n if (this.peer.min) {\n return {\n _: 'mtcute.dummyInputPeerMinUser',\n userId: this.peer.id,\n }\n }\n\n if (!this.peer.accessHash) {\n throw new MtArgumentError(\"Peer's access hash is not available!\")\n }\n\n return {\n _: 'inputPeerUser',\n userId: this.peer.id,\n accessHash: this.peer.accessHash,\n }\n case 'chat':\n case 'chatForbidden':\n return {\n _: 'inputPeerChat',\n chatId: this.peer.id,\n }\n case 'channel':\n case 'channelForbidden':\n if ((this.peer as tl.RawChannel).min) {\n return {\n _: 'mtcute.dummyInputPeerMinChannel',\n channelId: this.peer.id,\n }\n }\n\n if (!this.peer.accessHash) {\n throw new MtArgumentError(\"Peer's access hash is not available!\")\n }\n\n return {\n _: 'inputPeerChannel',\n channelId: this.peer.id,\n accessHash: this.peer.accessHash,\n }\n }\n }\n\n /** Type of chat */\n get chatType(): ChatType {\n switch (this.peer._) {\n case 'user':\n return this.peer.bot ? 'bot' : 'private'\n case 'chat':\n case 'chatForbidden':\n return 'group'\n case 'channel':\n case 'channelForbidden':\n if (this.peer._ === 'channel' && this.peer.gigagroup) {\n return 'gigagroup'\n } else if (this.peer.broadcast) {\n return 'channel'\n }\n\n return 'supergroup'\n }\n }\n\n /**\n * Whether this chat is a group chat\n * (i.e. not a channel and not PM)\n */\n get isGroup(): boolean {\n switch (this.chatType) {\n case 'group':\n case 'supergroup':\n case 'gigagroup':\n return true\n }\n\n return false\n }\n\n /**\n * Whether this chat has been verified by Telegram.\n * Supergroups, channels and groups only\n */\n get isVerified(): boolean {\n return 'verified' in this.peer ? this.peer.verified! : false\n }\n\n /**\n * Whether this chat has been restricted.\n * See {@link restrictions} for details\n */\n get isRestricted(): boolean {\n return 'restricted' in this.peer ? this.peer.restricted! : false\n }\n\n /**\n * Whether this chat is owned by the current user.\n * Supergroups, channels and groups only\n */\n get isCreator(): boolean {\n return 'creator' in this.peer ? this.peer.creator! : false\n }\n\n /**\n * Whether current user has admin rights in this chat.\n * Supergroups, channels and groups only.\n */\n get isAdmin(): boolean {\n return 'adminRights' in this.peer && Boolean(this.peer.adminRights)\n }\n\n /** Whether this chat has been flagged for scam */\n get isScam(): boolean {\n return 'scam' in this.peer ? this.peer.scam! : false\n }\n\n /** Whether this chat has been flagged for impersonation */\n get isFake(): boolean {\n return 'fake' in this.peer ? this.peer.fake! : false\n }\n\n /** Whether this chat is part of the Telegram support team. Users and bots only */\n get isSupport(): boolean {\n return this.peer._ === 'user' && this.peer.support!\n }\n\n /** Whether this chat is chat with yourself (i.e. Saved Messages) */\n get isSelf(): boolean {\n return this.peer._ === 'user' && this.peer.self!\n }\n\n /** Whether this peer is your contact */\n get isContact(): boolean {\n return this.peer._ === 'user' && this.peer.contact!\n }\n\n /** Whether this peer is a forum supergroup */\n get isForum(): boolean {\n return this.peer._ === 'channel' && this.peer.forum!\n }\n\n /** Whether the chat is not available (e.g. because the user was banned from there) */\n get isUnavailable(): boolean {\n return this.peer._ === 'chatForbidden' || this.peer._ === 'channelForbidden'\n }\n\n /**\n * Whether the current user is a member of the chat.\n *\n * For users, this is always `true`.\n */\n get isMember(): boolean {\n switch (this.peer._) {\n case 'user':\n return true\n case 'channel':\n case 'chat':\n return !this.peer.left\n default:\n return false\n }\n }\n\n /** Whether you have hidden (arhived) this chat's stories */\n get storiesHidden(): boolean {\n return 'storiesHidden' in this.peer ? this.peer.storiesHidden! : false\n }\n\n get storiesUnavailable(): boolean {\n return 'storiesUnavailable' in this.peer ? this.peer.storiesUnavailable! : false\n }\n\n /** Whether this group is a channel/supergroup with join requests enabled */\n get hasJoinRequests(): boolean {\n return this.peer._ === 'channel' && this.peer.joinRequest!\n }\n\n /** Whether this group is a supergroup with join-to-send rule enabled */\n get hasJoinToSend(): boolean {\n return this.peer._ === 'channel' && this.peer.joinToSend!\n }\n\n /** Whether this group has content protection (i.e. disabled forwards) */\n get hasContentProtection(): boolean {\n return (this.peer._ === 'channel' || this.peer._ === 'chat') && this.peer.noforwards!\n }\n\n /**\n * Title, for supergroups, channels and groups\n */\n get title(): string | null {\n return this.peer._ !== 'user' ? this.peer.title ?? null : null\n }\n\n /**\n * Username, for private chats, bots, supergroups and channels if available\n */\n get username(): string | null {\n if (!('username' in this.peer)) return null\n\n return this.peer.username ?? this.peer.usernames?.[0].username ?? null\n }\n\n /**\n * Usernames (inclufing collectibles), for private chats, bots, supergroups and channels if available\n */\n get usernames(): ReadonlyArray<tl.RawUsername> | null {\n if (!('usernames' in this.peer)) return null\n\n return (\n this.peer.usernames ??\n (this.peer.username ? [{ _: 'username', username: this.peer.username, active: true }] : null)\n )\n }\n\n /**\n * First name of the other party in a private chat,\n * for private chats and bots\n */\n get firstName(): string | null {\n return this.peer._ === 'user' ? this.peer.firstName ?? null : null\n }\n\n /**\n * Last name of the other party in a private chat, for private chats\n */\n get lastName(): string | null {\n return this.peer._ === 'user' ? this.peer.lastName ?? null : null\n }\n\n /**\n * Get the display name of the chat.\n *\n * Title for groups and channels,\n * name (and last name if available) for users\n */\n get displayName(): string {\n if (this.peer._ === 'user') {\n if (this.peer.lastName) {\n return this.peer.firstName + ' ' + this.peer.lastName\n }\n\n return this.peer.firstName ?? 'Deleted Account'\n }\n\n return this.peer.title\n }\n\n /**\n * Chat photo, if any.\n * Suitable for downloads only.\n *\n * If full chat information is available, prefer {@link FullChat#fullPhoto} instead.\n */\n get photo(): ChatPhoto | null {\n if (\n !('photo' in this.peer) ||\n !this.peer.photo ||\n (this.peer.photo._ !== 'userProfilePhoto' && this.peer.photo._ !== 'chatPhoto')\n ) {\n return null\n }\n\n return new ChatPhoto(this.inputPeer, this.peer.photo)\n }\n\n /**\n * User's or bot's assigned DC (data center).\n * Available only in case the user has set a public profile photo.\n *\n * **Note**: this information is approximate; it is based on where\n * Telegram stores the current chat photo. It is accurate only in case\n * the owner has set the chat photo, otherwise it will be the DC assigned\n * to the administrator who set the current profile photo.\n */\n get dcId(): number | null {\n if (!('photo' in this.peer)) return null\n\n return (\n (this.peer.photo as Exclude<typeof this.peer.photo, tl.RawChatPhotoEmpty | tl.RawUserProfilePhotoEmpty>)\n ?.dcId ?? null\n )\n }\n\n /**\n * The list of reasons why this chat might be unavailable to some users.\n * This field is available only in case {@link isRestricted} is `true`\n */\n get restrictions(): ReadonlyArray<tl.RawRestrictionReason> | null {\n return 'restrictionReason' in this.peer ? this.peer.restrictionReason ?? null : null\n }\n\n /**\n * Current user's permissions, for supergroups.\n */\n get permissions(): ChatPermissions | null {\n if (!('bannedRights' in this.peer && this.peer.bannedRights)) {\n return null\n }\n\n return new ChatPermissions(this.peer.bannedRights)\n }\n\n /**\n * Default chat member permissions, for groups and supergroups.\n */\n get defaultPermissions(): ChatPermissions | null {\n if (!('defaultBannedRights' in this.peer) || !this.peer.defaultBannedRights) {\n return null\n }\n\n return new ChatPermissions(this.peer.defaultBannedRights)\n }\n\n /**\n * Admin rights of the current user in this chat.\n * `null` for PMs and non-administered chats\n */\n get adminRights(): tl.RawChatAdminRights | null {\n return 'adminRights' in this.peer ? this.peer.adminRights ?? null : null\n }\n\n /**\n * Distance in meters of this group chat from your location\n * Returned only in {@link TelegramClient.getNearbyChats}\n */\n readonly distance?: number\n\n /**\n * Maximum ID of stories this chat has (or 0 if none)\n */\n get storiesMaxId(): number {\n switch (this.peer._) {\n case 'channel':\n case 'user':\n return this.peer.storiesMaxId ?? 0\n }\n\n return 0\n }\n\n /**\n * Color that should be used when rendering replies to\n * the messages and web previews sent by this chat,\n * as well as to render the chat title\n */\n get color(): ChatColors {\n const color = this.peer._ === 'user' || this.peer._ === 'channel' ? this.peer.color : undefined\n\n return new ChatColors(this.peer.id, color)\n }\n\n /**\n * Chat's emoji status, if any.\n */\n get emojiStatus(): EmojiStatus | null {\n if (this.peer._ !== 'user' && this.peer._ !== 'channel') return null\n if (!this.peer.emojiStatus || this.peer.emojiStatus._ === 'emojiStatusEmpty') return null\n\n return new EmojiStatus(this.peer.emojiStatus)\n }\n\n /**\n * Color that should be used when rendering the header of\n * the user's profile\n *\n * If `null`, a generic header should be used instead\n */\n get profileColors(): ChatColors {\n const color = this.peer._ === 'user' || this.peer._ === 'channel' ? this.peer.profileColor : undefined\n\n return new ChatColors(this.peer.id, color)\n }\n\n /** Boosts level this chat has (0 if none or is not a channel) */\n get boostsLevel(): number {\n return this.peer._ === 'channel' ? this.peer.level ?? 0 : 0\n }\n\n /**\n * Get a {@link User} from this chat.\n *\n * Returns `null` if this is not a chat with user\n */\n get user(): User | null {\n if (this.peer._ !== 'user') return null\n\n return new User(this.peer)\n }\n\n /** @internal */\n static _parseFromMessage(message: tl.RawMessage | tl.RawMessageService, peers: PeersIndex): Chat {\n return Chat._parseFromPeer(message.peerId, peers)\n }\n\n /** @internal */\n static _parseFromPeer(peer: tl.TypePeer, peers: PeersIndex): Chat {\n switch (peer._) {\n case 'peerUser':\n return new Chat(peers.user(peer.userId))\n case 'peerChat':\n return new Chat(peers.chat(peer.chatId))\n }\n\n return new Chat(peers.chat(peer.channelId))\n }\n\n /**\n * Create a mention for the chat.\n *\n * If this is a user, works just like {@link User.mention}.\n * Otherwise, if the chat has a username, a `@username` is created\n * (or text link, if `text` is passed). If it does not, chat title is\n * simply returned without additional formatting.\n *\n * When available and `text` is omitted, this method will return `@username`.\n * Otherwise, text mention is created for the given (or default) parse mode\n *\n * Use `null` as `text` (first parameter) to force create a text\n * mention with display name, even if there is a username.\n *\n * > **Note**: This method doesn't format anything on its own.\n * > Instead, it returns a {@link MessageEntity} that can later\n * > be used with `html` or `md` template tags, or `unparse` method directly.\n *\n * @param text Text of the mention.\n * @example\n * ```typescript\n * msg.replyText(html`Hello, ${msg.chat.mention()`)\n * ```\n */\n mention(text?: string | null): string | MessageEntity {\n if (this.user) return this.user.mention(text)\n\n if (text === undefined && this.username) {\n return `@${this.username}`\n }\n\n if (!text) text = this.displayName\n if (!this.username) return text\n\n return new MessageEntity(\n {\n _: 'messageEntityTextUrl',\n offset: 0,\n length: text.length,\n url: `https://t.me/${this.username}`,\n },\n text,\n )\n }\n}\n\nmemoizeGetters(Chat, [\n 'inputPeer',\n 'chatType',\n 'usernames',\n 'photo',\n 'permissions',\n 'defaultPermissions',\n 'user',\n 'color',\n])\nmakeInspectable(Chat, [], ['user'])\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Chat } from './chat.js';
|
|
3
|
+
import { PeersIndex } from './peers-index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Information about a chatlist
|
|
6
|
+
*/
|
|
7
|
+
export declare class ChatlistPreview {
|
|
8
|
+
readonly raw: tl.chatlists.TypeChatlistInvite;
|
|
9
|
+
readonly peers: PeersIndex;
|
|
10
|
+
constructor(raw: tl.chatlists.TypeChatlistInvite);
|
|
11
|
+
/** Whether the current user has already joined this chatlist */
|
|
12
|
+
get isJoined(): boolean;
|
|
13
|
+
/** If we joined the chatlist, ID of the folder representing it */
|
|
14
|
+
get folderId(): number | null;
|
|
15
|
+
/** Title of the chatlist (only available for non-joined chatlists) */
|
|
16
|
+
get title(): string;
|
|
17
|
+
/** Emoji representing an icon of the chatlist (may only be available for non-joined chatlists) */
|
|
18
|
+
get emoji(): string | null;
|
|
19
|
+
/** List of all chats contained in the chatlist */
|
|
20
|
+
get chats(): Chat[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatlistPreview = void 0;
|
|
4
|
+
const inspectable_js_1 = require("../../utils/inspectable.js");
|
|
5
|
+
const memoize_js_1 = require("../../utils/memoize.js");
|
|
6
|
+
const chat_js_1 = require("./chat.js");
|
|
7
|
+
const peers_index_js_1 = require("./peers-index.js");
|
|
8
|
+
/**
|
|
9
|
+
* Information about a chatlist
|
|
10
|
+
*/
|
|
11
|
+
class ChatlistPreview {
|
|
12
|
+
raw;
|
|
13
|
+
peers;
|
|
14
|
+
constructor(raw) {
|
|
15
|
+
this.raw = raw;
|
|
16
|
+
this.peers = peers_index_js_1.PeersIndex.from(raw);
|
|
17
|
+
}
|
|
18
|
+
/** Whether the current user has already joined this chatlist */
|
|
19
|
+
get isJoined() {
|
|
20
|
+
return this.raw._ === 'chatlists.chatlistInviteAlready';
|
|
21
|
+
}
|
|
22
|
+
/** If we joined the chatlist, ID of the folder representing it */
|
|
23
|
+
get folderId() {
|
|
24
|
+
return this.raw._ === 'chatlists.chatlistInviteAlready' ? this.raw.filterId : null;
|
|
25
|
+
}
|
|
26
|
+
/** Title of the chatlist (only available for non-joined chatlists) */
|
|
27
|
+
get title() {
|
|
28
|
+
return this.raw._ === 'chatlists.chatlistInvite' ? this.raw.title : '';
|
|
29
|
+
}
|
|
30
|
+
/** Emoji representing an icon of the chatlist (may only be available for non-joined chatlists) */
|
|
31
|
+
get emoji() {
|
|
32
|
+
return this.raw._ === 'chatlists.chatlistInvite' ? this.raw.emoticon ?? null : null;
|
|
33
|
+
}
|
|
34
|
+
/** List of all chats contained in the chatlist */
|
|
35
|
+
get chats() {
|
|
36
|
+
let peers;
|
|
37
|
+
if (this.raw._ === 'chatlists.chatlistInvite') {
|
|
38
|
+
peers = this.raw.peers;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
peers = [...this.raw.alreadyPeers, ...this.raw.missingPeers];
|
|
42
|
+
}
|
|
43
|
+
return peers.map((peer) => chat_js_1.Chat._parseFromPeer(peer, this.peers));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.ChatlistPreview = ChatlistPreview;
|
|
47
|
+
(0, memoize_js_1.memoizeGetters)(ChatlistPreview, ['chats']);
|
|
48
|
+
(0, inspectable_js_1.makeInspectable)(ChatlistPreview);
|
|
49
|
+
//# sourceMappingURL=chatlist-preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatlist-preview.js","sourceRoot":"","sources":["../../../../../src/highlevel/types/peers/chatlist-preview.ts"],"names":[],"mappings":";;;AAEA,+DAA4D;AAC5D,uDAAuD;AACv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AAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAI,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IACrE,CAAC;CACJ;AAtCD,0CAsCC;AAED,IAAA,2BAAc,EAAC,eAAe,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;AAC1C,IAAA,gCAAe,EAAC,eAAe,CAAC,CAAA","sourcesContent":["import { tl } from '@mtcute/tl'\n\nimport { makeInspectable } from '../../utils/inspectable.js'\nimport { memoizeGetters } from '../../utils/memoize.js'\nimport { Chat } from './chat.js'\nimport { PeersIndex } from './peers-index.js'\n\n/**\n * Information about a chatlist\n */\nexport class ChatlistPreview {\n readonly peers: PeersIndex\n constructor(readonly raw: tl.chatlists.TypeChatlistInvite) {\n this.peers = PeersIndex.from(raw)\n }\n\n /** Whether the current user has already joined this chatlist */\n get isJoined(): boolean {\n return this.raw._ === 'chatlists.chatlistInviteAlready'\n }\n\n /** If we joined the chatlist, ID of the folder representing it */\n get folderId(): number | null {\n return this.raw._ === 'chatlists.chatlistInviteAlready' ? this.raw.filterId : null\n }\n\n /** Title of the chatlist (only available for non-joined chatlists) */\n get title(): string {\n return this.raw._ === 'chatlists.chatlistInvite' ? this.raw.title : ''\n }\n\n /** Emoji representing an icon of the chatlist (may only be available for non-joined chatlists) */\n get emoji(): string | null {\n return this.raw._ === 'chatlists.chatlistInvite' ? this.raw.emoticon ?? null : null\n }\n\n /** List of all chats contained in the chatlist */\n get chats(): Chat[] {\n let peers\n\n if (this.raw._ === 'chatlists.chatlistInvite') {\n peers = this.raw.peers\n } else {\n peers = [...this.raw.alreadyPeers, ...this.raw.missingPeers]\n }\n\n return peers.map((peer) => Chat._parseFromPeer(peer, this.peers))\n }\n}\n\nmemoizeGetters(ChatlistPreview, ['chats'])\nmakeInspectable(ChatlistPreview)\n"]}
|
|
@@ -7,6 +7,7 @@ export * from './chat-member.js';
|
|
|
7
7
|
export * from './chat-permissions.js';
|
|
8
8
|
export * from './chat-photo.js';
|
|
9
9
|
export * from './chat-preview.js';
|
|
10
|
+
export * from './chatlist-preview.js';
|
|
10
11
|
export * from './forum-topic.js';
|
|
11
12
|
export * from './full-chat.js';
|
|
12
13
|
export * from './peer.js';
|
|
@@ -23,6 +23,7 @@ __exportStar(require("./chat-member.js"), exports);
|
|
|
23
23
|
__exportStar(require("./chat-permissions.js"), exports);
|
|
24
24
|
__exportStar(require("./chat-photo.js"), exports);
|
|
25
25
|
__exportStar(require("./chat-preview.js"), exports);
|
|
26
|
+
__exportStar(require("./chatlist-preview.js"), exports);
|
|
26
27
|
__exportStar(require("./forum-topic.js"), exports);
|
|
27
28
|
__exportStar(require("./full-chat.js"), exports);
|
|
28
29
|
__exportStar(require("./peer.js"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/highlevel/types/peers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,wDAAqC;AACrC,wDAAqC;AACrC,+DAA4C;AAC5C,qDAAkC;AAClC,mDAAgC;AAChC,wDAAqC;AACrC,kDAA+B;AAC/B,oDAAiC;AACjC,mDAAgC;AAChC,iDAA8B;AAC9B,4CAAyB;AACzB,mDAAgC;AAChC,qDAAkC;AAClC,4CAAyB","sourcesContent":["export * from './chat.js'\nexport * from './chat-event/index.js'\nexport * from './chat-invite-link.js'\nexport * from './chat-invite-link-member.js'\nexport * from './chat-location.js'\nexport * from './chat-member.js'\nexport * from './chat-permissions.js'\nexport * from './chat-photo.js'\nexport * from './chat-preview.js'\nexport * from './forum-topic.js'\nexport * from './full-chat.js'\nexport * from './peer.js'\nexport * from './peers-index.js'\nexport * from './typing-status.js'\nexport * from './user.js'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/highlevel/types/peers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,wDAAqC;AACrC,wDAAqC;AACrC,+DAA4C;AAC5C,qDAAkC;AAClC,mDAAgC;AAChC,wDAAqC;AACrC,kDAA+B;AAC/B,oDAAiC;AACjC,wDAAqC;AACrC,mDAAgC;AAChC,iDAA8B;AAC9B,4CAAyB;AACzB,mDAAgC;AAChC,qDAAkC;AAClC,4CAAyB","sourcesContent":["export * from './chat.js'\nexport * from './chat-event/index.js'\nexport * from './chat-invite-link.js'\nexport * from './chat-invite-link-member.js'\nexport * from './chat-location.js'\nexport * from './chat-member.js'\nexport * from './chat-permissions.js'\nexport * from './chat-photo.js'\nexport * from './chat-preview.js'\nexport * from './chatlist-preview.js'\nexport * from './forum-topic.js'\nexport * from './full-chat.js'\nexport * from './peer.js'\nexport * from './peers-index.js'\nexport * from './typing-status.js'\nexport * from './user.js'\n"]}
|
|
@@ -248,7 +248,7 @@ class NetworkManager {
|
|
|
248
248
|
_: 'initConnection',
|
|
249
249
|
deviceModel,
|
|
250
250
|
systemVersion: '1.0',
|
|
251
|
-
appVersion: '0.13.
|
|
251
|
+
appVersion: '0.13.2',
|
|
252
252
|
systemLangCode: 'en',
|
|
253
253
|
langPack: '', // "langPacks are for official apps only"
|
|
254
254
|
langCode: 'en',
|
|
@@ -525,7 +525,7 @@ class NetworkManager {
|
|
|
525
525
|
e.seconds = 1;
|
|
526
526
|
}
|
|
527
527
|
if (e.seconds <= floodSleepThreshold) {
|
|
528
|
-
this._log.info('Flood wait for %d seconds', e.seconds);
|
|
528
|
+
this._log.info('Flood wait for %d seconds (because of %s)', e.seconds, message._);
|
|
529
529
|
await (0, index_js_2.sleep)(e.seconds * 1000);
|
|
530
530
|
continue;
|
|
531
531
|
}
|