Documentation - v0.27.1
    Preparing search index...

    Class StubTelegramClient

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _knownChats: Map<number, TypeChat> = ...
    _knownUsers: Map<number, TypeUser> = ...
    _selfId: number = 0
    appConfig: AppConfigManager = ...

    App config manager

    log: Logger

    Logger for the client

    onConnectionState: Emitter<ConnectionState> = ...

    Emitted when the connection state changes

    onError: Emitter<Error> = ...

    Emitted when an error occurs

    onRawUpdate: Emitter<RawUpdateInfo> = ...

    Emitted when an update is received from the server. Requires updates loop to be running

    onServerUpdate: Emitter<TypeUpdates> = ...

    Emitted when a low-level Updates updates is received

    platform: ICorePlatform

    Platform used by the client

    Storage manager

    timers: TimersManager

    Timers manager

    updates?: UpdatesManager

    Accessors

    • get stopSignal(): AbortSignal

      Signal that will be aborted when the client is destroyed

      Returns AbortSignal

    Methods

    • Type Parameters

      • T extends
            | "invokeAfterMsg"
            | "invokeAfterMsgs"
            | "initConnection"
            | "invokeWithLayer"
            | "invokeWithoutUpdates"
            | "invokeWithMessagesRange"
            | "invokeWithTakeout"
            | "invokeWithBusinessConnection"
            | "invokeWithGooglePlayIntegrity"
            | "invokeWithApnsSecret"
            | "invokeWithReCaptcha"
            | "auth.sendCode"
            | "auth.signUp"
            | "auth.signIn"
            | "auth.logOut"
            | "auth.resetAuthorizations"
            | "auth.exportAuthorization"
            | "auth.importAuthorization"
            | "auth.bindTempAuthKey"
            | "auth.importBotAuthorization"
            | "auth.checkPassword"
            | "auth.requestPasswordRecovery"
            | "auth.recoverPassword"
            | "auth.resendCode"
            | "auth.cancelCode"
            | "auth.dropTempAuthKeys"
            | "auth.exportLoginToken"
            | "auth.importLoginToken"
            | "auth.acceptLoginToken"
            | "auth.checkRecoveryPassword"
            | "auth.importWebTokenAuthorization"
            | "auth.requestFirebaseSms"
            | "auth.resetLoginEmail"
            | "auth.reportMissingCode"
            | "auth.checkPaidAuth"
            | "account.registerDevice"
            | "account.unregisterDevice"
            | "account.updateNotifySettings"
            | "account.getNotifySettings"
            | "account.resetNotifySettings"
            | "account.updateProfile"
            | "account.updateStatus"
            | "account.getWallPapers"
            | "account.reportPeer"
            | "account.checkUsername"
            | "account.updateUsername"
            | "account.getPrivacy"
            | "account.setPrivacy"
            | "account.deleteAccount"
            | "account.getAccountTTL"
            | "account.setAccountTTL"
            | "account.sendChangePhoneCode"
            | "account.changePhone"
            | "account.updateDeviceLocked"
            | "account.getAuthorizations"
            | "account.resetAuthorization"
            | "account.getPassword"
            | "account.getPasswordSettings"
            | "account.updatePasswordSettings"
            | "account.sendConfirmPhoneCode"
            | "account.confirmPhone"
            | "account.getTmpPassword"
            | "account.getWebAuthorizations"
            | "account.resetWebAuthorization"
            | "account.resetWebAuthorizations"
            | "account.getAllSecureValues"
            | "account.getSecureValue"
            | "account.saveSecureValue"
            | "account.deleteSecureValue"
            | "account.getAuthorizationForm"
            | "account.acceptAuthorization"
            | "account.sendVerifyPhoneCode"
            | "account.verifyPhone"
            | "account.sendVerifyEmailCode"
            | "account.verifyEmail"
            | "account.initTakeoutSession"
            | "account.finishTakeoutSession"
            | "account.confirmPasswordEmail"
            | "account.resendPasswordEmail"
            | "account.cancelPasswordEmail"
            | "account.getContactSignUpNotification"
            | "account.setContactSignUpNotification"
            | "account.getNotifyExceptions"
            | "account.getWallPaper"
            | "account.uploadWallPaper"
            | "account.saveWallPaper"
            | "account.installWallPaper"
            | "account.resetWallPapers"
            | "account.getAutoDownloadSettings"
            | "account.saveAutoDownloadSettings"
            | "account.uploadTheme"
            | "account.createTheme"
            | "account.updateTheme"
            | "account.saveTheme"
            | "account.installTheme"
            | "account.getTheme"
            | "account.getThemes"
            | "account.setContentSettings"
            | "account.getContentSettings"
            | "account.getMultiWallPapers"
            | "account.getGlobalPrivacySettings"
            | "account.setGlobalPrivacySettings"
            | "account.reportProfilePhoto"
            | "account.resetPassword"
            | "account.declinePasswordReset"
            | "account.getChatThemes"
            | "account.setAuthorizationTTL"
            | "account.changeAuthorizationSettings"
            | "account.getSavedRingtones"
            | "account.saveRingtone"
            | "account.uploadRingtone"
            | "account.updateEmojiStatus"
            | "account.getDefaultEmojiStatuses"
            | "account.getRecentEmojiStatuses"
            | "account.clearRecentEmojiStatuses"
            | "account.reorderUsernames"
            | "account.toggleUsername"
            | "account.getDefaultProfilePhotoEmojis"
            | "account.getDefaultGroupPhotoEmojis"
            | "account.getAutoSaveSettings"
            | "account.saveAutoSaveSettings"
            | "account.deleteAutoSaveExceptions"
            | "account.invalidateSignInCodes"
            | "account.updateColor"
            | "account.getDefaultBackgroundEmojis"
            | "account.getChannelDefaultEmojiStatuses"
            | "account.getChannelRestrictedStatusEmojis"
            | "account.updateBusinessWorkHours"
            | "account.updateBusinessLocation"
            | "account.updateBusinessGreetingMessage"
            | "account.updateBusinessAwayMessage"
            | "account.updateConnectedBot"
            | "account.getConnectedBots"
            | "account.getBotBusinessConnection"
            | "account.updateBusinessIntro"
            | "account.toggleConnectedBotPaused"
            | "account.disablePeerConnectedBot"
            | "account.updateBirthday"
            | "account.createBusinessChatLink"
            | "account.editBusinessChatLink"
            | "account.deleteBusinessChatLink"
            | "account.getBusinessChatLinks"
            | "account.resolveBusinessChatLink"
            | "account.updatePersonalChannel"
            | "account.toggleSponsoredMessages"
            | "account.getReactionsNotifySettings"
            | "account.setReactionsNotifySettings"
            | "account.getCollectibleEmojiStatuses"
            | "account.getPaidMessagesRevenue"
            | "account.toggleNoPaidMessagesException"
            | "account.setMainProfileTab"
            | "account.saveMusic"
            | "account.getSavedMusicIds"
            | "account.getUniqueGiftChatThemes"
            | "users.getUsers"
            | "users.getFullUser"
            | "users.setSecureValueErrors"
            | "users.getRequirementsToContact"
            | "users.getSavedMusic"
            | "users.getSavedMusicByID"
            | "users.suggestBirthday"
            | "contacts.getContactIDs"
            | "contacts.getStatuses"
            | "contacts.getContacts"
            | "contacts.importContacts"
            | "contacts.deleteContacts"
            | "contacts.deleteByPhones"
            | "contacts.block"
            | "contacts.unblock"
            | "contacts.getBlocked"
            | "contacts.search"
            | "contacts.resolveUsername"
            | "contacts.getTopPeers"
            | "contacts.resetTopPeerRating"
            | "contacts.resetSaved"
            | "contacts.getSaved"
            | "contacts.toggleTopPeers"
            | "contacts.addContact"
            | "contacts.acceptContact"
            | "contacts.getLocated"
            | "contacts.blockFromReplies"
            | "contacts.resolvePhone"
            | "contacts.exportContactToken"
            | "contacts.importContactToken"
            | "contacts.editCloseFriends"
            | "contacts.setBlocked"
            | "contacts.getBirthdays"
            | "contacts.getSponsoredPeers"
            | "contacts.updateContactNote"
            | "messages.getMessages"
            | "messages.getDialogs"
            | "messages.getHistory"
            | "messages.search"
            | "messages.readHistory"
            | "messages.deleteHistory"
            | "messages.deleteMessages"
            | "messages.receivedMessages"
            | "messages.setTyping"
            | "messages.sendMessage"
            | "messages.sendMedia"
            | "messages.forwardMessages"
            | "messages.reportSpam"
            | "messages.getPeerSettings"
            | "messages.report"
            | "messages.getChats"
            | "messages.getFullChat"
            | "messages.editChatTitle"
            | "messages.editChatPhoto"
            | "messages.addChatUser"
            | "messages.deleteChatUser"
            | "messages.createChat"
            | "messages.getDhConfig"
            | "messages.requestEncryption"
            | "messages.acceptEncryption"
            | "messages.discardEncryption"
            | "messages.setEncryptedTyping"
            | "messages.readEncryptedHistory"
            | "messages.sendEncrypted"
            | "messages.sendEncryptedFile"
            | "messages.sendEncryptedService"
            | "messages.receivedQueue"
            | "messages.reportEncryptedSpam"
            | "messages.readMessageContents"
            | "messages.getStickers"
            | "messages.getAllStickers"
            | "messages.getWebPagePreview"
            | "messages.exportChatInvite"
            | "messages.checkChatInvite"
            | "messages.importChatInvite"
            | "messages.getStickerSet"
            | "messages.installStickerSet"
            | "messages.uninstallStickerSet"
            | "messages.startBot"
            | "messages.getMessagesViews"
            | "messages.editChatAdmin"
            | "messages.migrateChat"
            | "messages.searchGlobal"
            | "messages.reorderStickerSets"
            | "messages.getDocumentByHash"
            | "messages.getSavedGifs"
            | "messages.saveGif"
            | "messages.getInlineBotResults"
            | "messages.setInlineBotResults"
            | "messages.sendInlineBotResult"
            | "messages.getMessageEditData"
            | "messages.editMessage"
            | "messages.editInlineBotMessage"
            | "messages.getBotCallbackAnswer"
            | "messages.setBotCallbackAnswer"
            | "messages.getPeerDialogs"
            | "messages.saveDraft"
            | "messages.getAllDrafts"
            | "messages.getFeaturedStickers"
            | "messages.readFeaturedStickers"
            | "messages.getRecentStickers"
            | "messages.saveRecentSticker"
            | "messages.clearRecentStickers"
            | "messages.getArchivedStickers"
            | "messages.getMaskStickers"
            | "messages.getAttachedStickers"
            | "messages.setGameScore"
            | "messages.setInlineGameScore"
            | "messages.getGameHighScores"
            | "messages.getInlineGameHighScores"
            | "messages.getCommonChats"
            | "messages.getWebPage"
            | "messages.toggleDialogPin"
            | "messages.reorderPinnedDialogs"
            | "messages.getPinnedDialogs"
            | "messages.setBotShippingResults"
            | "messages.setBotPrecheckoutResults"
            | "messages.uploadMedia"
            | "messages.sendScreenshotNotification"
            | "messages.getFavedStickers"
            | "messages.faveSticker"
            | "messages.getUnreadMentions"
            | "messages.readMentions"
            | "messages.getRecentLocations"
            | "messages.sendMultiMedia"
            | "messages.uploadEncryptedFile"
            | "messages.searchStickerSets"
            | "messages.getSplitRanges"
            | "messages.markDialogUnread"
            | "messages.getDialogUnreadMarks"
            | "messages.clearAllDrafts"
            | "messages.updatePinnedMessage"
            | "messages.sendVote"
            | "messages.getPollResults"
            | "messages.getOnlines"
            | "messages.editChatAbout"
            | "messages.editChatDefaultBannedRights"
            | "messages.getEmojiKeywords"
            | "messages.getEmojiKeywordsDifference"
            | "messages.getEmojiKeywordsLanguages"
            | "messages.getEmojiURL"
            | "messages.getSearchCounters"
            | "messages.requestUrlAuth"
            | "messages.acceptUrlAuth"
            | "messages.hidePeerSettingsBar"
            | "messages.getScheduledHistory"
            | "messages.getScheduledMessages"
            | "messages.sendScheduledMessages"
            | "messages.deleteScheduledMessages"
            | "messages.getPollVotes"
            | "messages.toggleStickerSets"
            | "messages.getDialogFilters"
            | "messages.getSuggestedDialogFilters"
            | "messages.updateDialogFilter"
            | "messages.updateDialogFiltersOrder"
            | "messages.getOldFeaturedStickers"
            | "messages.getReplies"
            | "messages.getDiscussionMessage"
            | "messages.readDiscussion"
            | "messages.unpinAllMessages"
            | "messages.deleteChat"
            | "messages.deletePhoneCallHistory"
            | "messages.checkHistoryImport"
            | "messages.initHistoryImport"
            | "messages.uploadImportedMedia"
            | "messages.startHistoryImport"
            | "messages.getExportedChatInvites"
            | "messages.getExportedChatInvite"
            | "messages.editExportedChatInvite"
            | "messages.deleteRevokedExportedChatInvites"
            | "messages.deleteExportedChatInvite"
            | "messages.getAdminsWithInvites"
            | "messages.getChatInviteImporters"
            | "messages.setHistoryTTL"
            | "messages.checkHistoryImportPeer"
            | "messages.setChatTheme"
            | "messages.getMessageReadParticipants"
            | "messages.getSearchResultsCalendar"
            | "messages.getSearchResultsPositions"
            | "messages.hideChatJoinRequest"
            | "messages.hideAllChatJoinRequests"
            | "messages.toggleNoForwards"
            | "messages.saveDefaultSendAs"
            | "messages.sendReaction"
            | "messages.getMessagesReactions"
            | "messages.getMessageReactionsList"
            | "messages.setChatAvailableReactions"
            | "messages.getAvailableReactions"
            | "messages.setDefaultReaction"
            | "messages.translateText"
            | "messages.getUnreadReactions"
            | "messages.readReactions"
            | "messages.searchSentMedia"
            | "messages.getAttachMenuBots"
            | "messages.getAttachMenuBot"
            | "messages.toggleBotInAttachMenu"
            | "messages.requestWebView"
            | "messages.prolongWebView"
            | "messages.requestSimpleWebView"
            | "messages.sendWebViewResultMessage"
            | "messages.sendWebViewData"
            | "messages.transcribeAudio"
            | "messages.rateTranscribedAudio"
            | "messages.getCustomEmojiDocuments"
            | "messages.getEmojiStickers"
            | "messages.getFeaturedEmojiStickers"
            | "messages.reportReaction"
            | "messages.getTopReactions"
            | "messages.getRecentReactions"
            | "messages.clearRecentReactions"
            | "messages.getExtendedMedia"
            | "messages.setDefaultHistoryTTL"
            | "messages.getDefaultHistoryTTL"
            | "messages.sendBotRequestedPeer"
            | "messages.getEmojiGroups"
            | "messages.getEmojiStatusGroups"
            | "messages.getEmojiProfilePhotoGroups"
            | "messages.searchCustomEmoji"
            | "messages.togglePeerTranslations"
            | "messages.getBotApp"
            | "messages.requestAppWebView"
            | "messages.setChatWallPaper"
            | "messages.searchEmojiStickerSets"
            | "messages.getSavedDialogs"
            | "messages.getSavedHistory"
            | "messages.deleteSavedHistory"
            | "messages.getPinnedSavedDialogs"
            | "messages.toggleSavedDialogPin"
            | "messages.reorderPinnedSavedDialogs"
            | "messages.getSavedReactionTags"
            | "messages.updateSavedReactionTag"
            | "messages.getDefaultTagReactions"
            | "messages.getOutboxReadDate"
            | "messages.getQuickReplies"
            | "messages.reorderQuickReplies"
            | "messages.checkQuickReplyShortcut"
            | "messages.editQuickReplyShortcut"
            | "messages.deleteQuickReplyShortcut"
            | "messages.getQuickReplyMessages"
            | "messages.sendQuickReplyMessages"
            | "messages.deleteQuickReplyMessages"
            | "messages.toggleDialogFilterTags"
            | "messages.getMyStickers"
            | "messages.getEmojiStickerGroups"
            | "messages.getAvailableEffects"
            | "messages.editFactCheck"
            | "messages.deleteFactCheck"
            | "messages.getFactCheck"
            | "messages.requestMainWebView"
            | "messages.sendPaidReaction"
            | "messages.togglePaidReactionPrivacy"
            | "messages.getPaidReactionPrivacy"
            | "messages.viewSponsoredMessage"
            | "messages.clickSponsoredMessage"
            | "messages.reportSponsoredMessage"
            | "messages.getSponsoredMessages"
            | "messages.savePreparedInlineMessage"
            | "messages.getPreparedInlineMessage"
            | "messages.searchStickers"
            | "messages.reportMessagesDelivery"
            | "messages.getSavedDialogsByID"
            | "messages.readSavedHistory"
            | "messages.toggleTodoCompleted"
            | "messages.appendTodoList"
            | "messages.toggleSuggestedPostApproval"
            | "messages.getForumTopics"
            | "messages.getForumTopicsByID"
            | "messages.editForumTopic"
            | "messages.updatePinnedForumTopic"
            | "messages.reorderPinnedForumTopics"
            | "messages.createForumTopic"
            | "messages.deleteTopicHistory"
            | "updates.getState"
            | "updates.getDifference"
            | "updates.getChannelDifference"
            | "photos.updateProfilePhoto"
            | "photos.uploadProfilePhoto"
            | "photos.deletePhotos"
            | "photos.getUserPhotos"
            | "photos.uploadContactProfilePhoto"
            | "upload.saveFilePart"
            | "upload.getFile"
            | "upload.saveBigFilePart"
            | "upload.getWebFile"
            | "upload.getCdnFile"
            | "upload.reuploadCdnFile"
            | "upload.getCdnFileHashes"
            | "upload.getFileHashes"
            | "help.getConfig"
            | "help.getNearestDc"
            | "help.getAppUpdate"
            | "help.getInviteText"
            | "help.getSupport"
            | "help.setBotUpdatesStatus"
            | "help.getCdnConfig"
            | "help.getRecentMeUrls"
            | "help.getTermsOfServiceUpdate"
            | "help.acceptTermsOfService"
            | "help.getDeepLinkInfo"
            | "help.getAppConfig"
            | "help.saveAppLog"
            | "help.getPassportConfig"
            | "help.getSupportName"
            | "help.getUserInfo"
            | "help.editUserInfo"
            | "help.getPromoData"
            | "help.hidePromoData"
            | "help.dismissSuggestion"
            | "help.getCountriesList"
            | "help.getPremiumPromo"
            | "help.getPeerColors"
            | "help.getPeerProfileColors"
            | "help.getTimezonesList"
            | "channels.readHistory"
            | "channels.deleteMessages"
            | "channels.reportSpam"
            | "channels.getMessages"
            | "channels.getParticipants"
            | "channels.getParticipant"
            | "channels.getChannels"
            | "channels.getFullChannel"
            | "channels.createChannel"
            | "channels.editAdmin"
            | "channels.editTitle"
            | "channels.editPhoto"
            | "channels.checkUsername"
            | "channels.updateUsername"
            | "channels.joinChannel"
            | "channels.leaveChannel"
            | "channels.inviteToChannel"
            | "channels.deleteChannel"
            | "channels.exportMessageLink"
            | "channels.toggleSignatures"
            | "channels.getAdminedPublicChannels"
            | "channels.editBanned"
            | "channels.getAdminLog"
            | "channels.setStickers"
            | "channels.readMessageContents"
            | "channels.deleteHistory"
            | "channels.togglePreHistoryHidden"
            | "channels.getLeftChannels"
            | "channels.getGroupsForDiscussion"
            | "channels.setDiscussionGroup"
            | "channels.editCreator"
            | "channels.editLocation"
            | "channels.toggleSlowMode"
            | "channels.getInactiveChannels"
            | "channels.convertToGigagroup"
            | "channels.getSendAs"
            | "channels.deleteParticipantHistory"
            | "channels.toggleJoinToSend"
            | "channels.toggleJoinRequest"
            | "channels.reorderUsernames"
            | "channels.toggleUsername"
            | "channels.deactivateAllUsernames"
            | "channels.toggleForum"
            | "channels.toggleAntiSpam"
            | "channels.reportAntiSpamFalsePositive"
            | "channels.toggleParticipantsHidden"
            | "channels.updateColor"
            | "channels.toggleViewForumAsMessages"
            | "channels.getChannelRecommendations"
            | "channels.updateEmojiStatus"
            | "channels.setBoostsToUnblockRestrictions"
            | "channels.setEmojiStickers"
            | "channels.restrictSponsoredMessages"
            | "channels.searchPosts"
            | "channels.updatePaidMessagesPrice"
            | "channels.toggleAutotranslation"
            | "channels.getMessageAuthor"
            | "channels.checkSearchPostsFlood"
            | "channels.setMainProfileTab"
            | "bots.sendCustomRequest"
            | "bots.answerWebhookJSONQuery"
            | "bots.setBotCommands"
            | "bots.resetBotCommands"
            | "bots.getBotCommands"
            | "bots.setBotMenuButton"
            | "bots.getBotMenuButton"
            | "bots.setBotBroadcastDefaultAdminRights"
            | "bots.setBotGroupDefaultAdminRights"
            | "bots.setBotInfo"
            | "bots.getBotInfo"
            | "bots.reorderUsernames"
            | "bots.toggleUsername"
            | "bots.canSendMessage"
            | "bots.allowSendMessage"
            | "bots.invokeWebViewCustomMethod"
            | "bots.getPopularAppBots"
            | "bots.addPreviewMedia"
            | "bots.editPreviewMedia"
            | "bots.deletePreviewMedia"
            | "bots.reorderPreviewMedias"
            | "bots.getPreviewInfo"
            | "bots.getPreviewMedias"
            | "bots.updateUserEmojiStatus"
            | "bots.toggleUserEmojiStatusPermission"
            | "bots.checkDownloadFileParams"
            | "bots.getAdminedBots"
            | "bots.updateStarRefProgram"
            | "bots.setCustomVerification"
            | "bots.getBotRecommendations"
            | "payments.getPaymentForm"
            | "payments.getPaymentReceipt"
            | "payments.validateRequestedInfo"
            | "payments.sendPaymentForm"
            | "payments.getSavedInfo"
            | "payments.clearSavedInfo"
            | "payments.getBankCardData"
            | "payments.exportInvoice"
            | "payments.assignAppStoreTransaction"
            | "payments.assignPlayMarketTransaction"
            | "payments.getPremiumGiftCodeOptions"
            | "payments.checkGiftCode"
            | "payments.applyGiftCode"
            | "payments.getGiveawayInfo"
            | "payments.launchPrepaidGiveaway"
            | "payments.getStarsTopupOptions"
            | "payments.getStarsStatus"
            | "payments.getStarsTransactions"
            | "payments.sendStarsForm"
            | "payments.refundStarsCharge"
            | "payments.getStarsRevenueStats"
            | "payments.getStarsRevenueWithdrawalUrl"
            | "payments.getStarsRevenueAdsAccountUrl"
            | "payments.getStarsTransactionsByID"
            | "payments.getStarsGiftOptions"
            | "payments.getStarsSubscriptions"
            | "payments.changeStarsSubscription"
            | "payments.fulfillStarsSubscription"
            | "payments.getStarsGiveawayOptions"
            | "payments.getStarGifts"
            | "payments.saveStarGift"
            | "payments.convertStarGift"
            | "payments.botCancelStarsSubscription"
            | "payments.getConnectedStarRefBots"
            | "payments.getConnectedStarRefBot"
            | "payments.getSuggestedStarRefBots"
            | "payments.connectStarRefBot"
            | "payments.editConnectedStarRefBot"
            | "payments.getStarGiftUpgradePreview"
            | "payments.upgradeStarGift"
            | "payments.transferStarGift"
            | "payments.getUniqueStarGift"
            | "payments.getSavedStarGifts"
            | "payments.getSavedStarGift"
            | "payments.getStarGiftWithdrawalUrl"
            | "payments.toggleChatStarGiftNotifications"
            | "payments.toggleStarGiftsPinnedToTop"
            | "payments.canPurchaseStore"
            | "payments.getResaleStarGifts"
            | "payments.updateStarGiftPrice"
            | "payments.createStarGiftCollection"
            | "payments.updateStarGiftCollection"
            | "payments.reorderStarGiftCollections"
            | "payments.deleteStarGiftCollection"
            | "payments.getStarGiftCollections"
            | "payments.getUniqueStarGiftValueInfo"
            | "payments.checkCanSendGift"
            | "stickers.createStickerSet"
            | "stickers.removeStickerFromSet"
            | "stickers.changeStickerPosition"
            | "stickers.addStickerToSet"
            | "stickers.setStickerSetThumb"
            | "stickers.checkShortName"
            | "stickers.suggestShortName"
            | "stickers.changeSticker"
            | "stickers.renameStickerSet"
            | "stickers.deleteStickerSet"
            | "stickers.replaceSticker"
            | "phone.getCallConfig"
            | "phone.requestCall"
            | "phone.acceptCall"
            | "phone.confirmCall"
            | "phone.receivedCall"
            | "phone.discardCall"
            | "phone.setCallRating"
            | "phone.saveCallDebug"
            | "phone.sendSignalingData"
            | "phone.createGroupCall"
            | "phone.joinGroupCall"
            | "phone.leaveGroupCall"
            | "phone.inviteToGroupCall"
            | "phone.discardGroupCall"
            | "phone.toggleGroupCallSettings"
            | "phone.getGroupCall"
            | "phone.getGroupParticipants"
            | "phone.checkGroupCall"
            | "phone.toggleGroupCallRecord"
            | "phone.editGroupCallParticipant"
            | "phone.editGroupCallTitle"
            | "phone.getGroupCallJoinAs"
            | "phone.exportGroupCallInvite"
            | "phone.toggleGroupCallStartSubscription"
            | "phone.startScheduledGroupCall"
            | "phone.saveDefaultGroupCallJoinAs"
            | "phone.joinGroupCallPresentation"
            | "phone.leaveGroupCallPresentation"
            | "phone.getGroupCallStreamChannels"
            | "phone.getGroupCallStreamRtmpUrl"
            | "phone.saveCallLog"
            | "phone.createConferenceCall"
            | "phone.deleteConferenceCallParticipants"
            | "phone.sendConferenceCallBroadcast"
            | "phone.inviteConferenceCallParticipant"
            | "phone.declineConferenceCallInvite"
            | "phone.getGroupCallChainBlocks"
            | "phone.sendGroupCallMessage"
            | "phone.sendGroupCallEncryptedMessage"
            | "langpack.getLangPack"
            | "langpack.getStrings"
            | "langpack.getDifference"
            | "langpack.getLanguages"
            | "langpack.getLanguage"
            | "folders.editPeerFolders"
            | "stats.getBroadcastStats"
            | "stats.loadAsyncGraph"
            | "stats.getMegagroupStats"
            | "stats.getMessagePublicForwards"
            | "stats.getMessageStats"
            | "stats.getStoryStats"
            | "stats.getStoryPublicForwards"
            | "chatlists.exportChatlistInvite"
            | "chatlists.deleteExportedInvite"
            | "chatlists.editExportedInvite"
            | "chatlists.getExportedInvites"
            | "chatlists.checkChatlistInvite"
            | "chatlists.joinChatlistInvite"
            | "chatlists.getChatlistUpdates"
            | "chatlists.joinChatlistUpdates"
            | "chatlists.hideChatlistUpdates"
            | "chatlists.getLeaveChatlistSuggestions"
            | "chatlists.leaveChatlist"
            | "stories.canSendStory"
            | "stories.sendStory"
            | "stories.editStory"
            | "stories.deleteStories"
            | "stories.togglePinned"
            | "stories.getAllStories"
            | "stories.getPinnedStories"
            | "stories.getStoriesArchive"
            | "stories.getStoriesByID"
            | "stories.toggleAllStoriesHidden"
            | "stories.readStories"
            | "stories.incrementStoryViews"
            | "stories.getStoryViewsList"
            | "stories.getStoriesViews"
            | "stories.exportStoryLink"
            | "stories.report"
            | "stories.activateStealthMode"
            | "stories.sendReaction"
            | "stories.getPeerStories"
            | "stories.getAllReadPeerStories"
            | "stories.getPeerMaxIDs"
            | "stories.getChatsToSend"
            | "stories.togglePeerStoriesHidden"
            | "stories.getStoryReactionsList"
            | "stories.togglePinnedToTop"
            | "stories.searchPosts"
            | "stories.createAlbum"
            | "stories.updateAlbum"
            | "stories.reorderAlbums"
            | "stories.deleteAlbum"
            | "stories.getAlbums"
            | "stories.getAlbumStories"
            | "premium.getBoostsList"
            | "premium.getMyBoosts"
            | "premium.applyBoost"
            | "premium.getBoostsStatus"
            | "premium.getUserBoosts"
            | "smsjobs.isEligibleToJoin"
            | "smsjobs.join"
            | "smsjobs.leave"
            | "smsjobs.updateSettings"
            | "smsjobs.getStatus"
            | "smsjobs.getSmsJob"
            | "smsjobs.finishJob"
            | "fragment.getCollectibleInfo"
            | "payments.getStarGiftAuctionState"
            | "payments.getStarGiftAuctionAcquiredGifts"
            | "payments.getStarGiftActiveAuctions"
            | "phone.deleteGroupCallMessages"
            | "phone.deleteGroupCallParticipantMessages"
            | "phone.getGroupCallStars"
            | "phone.saveDefaultSendAs"
            | "stories.startLive"
            | "channels.createForumTopic"
            | "channels.getForumTopics"
            | "channels.getForumTopicsByID"
            | "channels.editForumTopic"
            | "channels.updatePinnedForumTopic"
            | "channels.deleteTopicHistory"
            | "channels.reorderPinnedForumTopics"
            | "mtcute.customMethod"

      Parameters

      Returns void

    • Make an RPC call

      This method is still quite low-level and you shouldn't use this when using high-level API provided by @mtcute/client.

      Type Parameters

      • T extends RpcMethod

      Parameters

      Returns Promise<RpcCallReturn[T["_"]]>

    • Destroy the client and all its resources.

      This will terminate any connections to the Telegram servers, free all the resources, and make the client no longer usable

      Returns Promise<void>

    • Export current session to a single LONG string, containing all the needed information.

      Warning! Anyone with this string will be able to authorize as you and do anything. Treat this as your password, and never give it away!

      In case you have accidentally leaked this string, make sure to revoke this session in account settings: "Privacy & Security" > "Active sessions" > find the one containing mtcute > Revoke, or, in case this is a bot, revoke bot token with @BotFather

      Returns Promise<string>

    • Parameters

      • chatId: number = 0

      Returns MessageBox

    • Parameters

      • chatId: number = 0

      Returns number

    • Parameters

      • chatId: number = 0
      • count: number = 1

      Returns number

    • Import the session from the given session string.

      Note that the session will only be imported in case the storage is missing authorization (i.e. does not contain auth key for the primary DC), otherwise it will be ignored (unless force).

      Parameters

      • session: string | InputStringSessionData

        Session string to import

      • force: boolean = false

        Whether to overwrite existing session

      Returns Promise<void>

    • Parameters

      • fn: (data: Uint8Array) => void

      Returns void

    • ADVANCED

      Do all the preparations, but don't connect just yet. Useful when you want to do some preparations before connecting, like setting up session.

      Call connect to actually connect.

      Returns Promise<void>

    • Create a fake "full" client (i.e. TelegramClient)

      Basically a proxy that returns an empty function for every unknown method

      Returns any