UNPKG

@tgsnake/core

Version:

Pure Telegram MTProto library for nodejs

150 lines (149 loc) 8.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UserRestricted = exports.UserpicUploadRequired = exports.UserpicPrivacyRequired = exports.UpdateAppToLogin = exports.TopicDeleted = exports.TopicClosed = exports.StickersetOwnerAnonymous = exports.StickersetInvalid = exports.SendCodeUnavailable = exports.PrivacyPremiumRequired = exports.PreviousChatImportActiveWaitmin = exports.PremiumCurrentlyUnavailable = exports.PhonePasswordFlood = exports.PhoneNumberInvalid = exports.PaymentUnsupported = exports.InviteHashExpired = exports.GiftcodeNotAllowed = exports.FreshResetAuthorisationForbidden = exports.FreshChangePhoneForbidden = exports.FreshChangeAdminsForbidden = exports.FilerefUpgradeNeeded = exports.ChatForwardsRestricted = exports.ChannelTooLarge = exports.ChannelPrivate = exports.CallProtocolCompatLayerInvalid = exports.BusinessAddressActive = exports.BannedRightsInvalid = exports.AuthKeyDuplicated = exports.NotAcceptable = void 0; const RpcError_js_1 = require("../RpcError.js"); class NotAcceptable extends RpcError_js_1.RPCError { code = 406; name = 'NOT_ACCEPTABLE'; } exports.NotAcceptable = NotAcceptable; class AuthKeyDuplicated extends NotAcceptable { id = 'AUTH_KEY_DUPLICATED'; message = 'Concurrent usage of the current session from multiple connections was detected, the current session was invalidated by the server for security reasons!'; } exports.AuthKeyDuplicated = AuthKeyDuplicated; class BannedRightsInvalid extends NotAcceptable { id = 'BANNED_RIGHTS_INVALID'; message = 'You provided some invalid flags in the banned rights.'; } exports.BannedRightsInvalid = BannedRightsInvalid; class BusinessAddressActive extends NotAcceptable { id = 'BUSINESS_ADDRESS_ACTIVE'; message = 'The user is currently advertising a [Business Location](https://core.telegram.org/api/business#location), the location may only be changed (or removed) using [account.updateBusinessLocation »](https://core.telegram.org/method/account.updateBusinessLocation). .'; } exports.BusinessAddressActive = BusinessAddressActive; class CallProtocolCompatLayerInvalid extends NotAcceptable { id = 'CALL_PROTOCOL_COMPAT_LAYER_INVALID'; message = 'The other side of the call does not support any of the VoIP protocols supported by the local client, as specified by the `protocol.layer` and `protocol.library_versions` fields.'; } exports.CallProtocolCompatLayerInvalid = CallProtocolCompatLayerInvalid; class ChannelPrivate extends NotAcceptable { id = 'CHANNEL_PRIVATE'; message = "You haven't joined this channel/supergroup."; } exports.ChannelPrivate = ChannelPrivate; class ChannelTooLarge extends NotAcceptable { id = 'CHANNEL_TOO_LARGE'; message = 'Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change).'; } exports.ChannelTooLarge = ChannelTooLarge; class ChatForwardsRestricted extends NotAcceptable { id = 'CHAT_FORWARDS_RESTRICTED'; message = "You can't forward messages from a protected chat."; } exports.ChatForwardsRestricted = ChatForwardsRestricted; class FilerefUpgradeNeeded extends NotAcceptable { id = 'FILEREF_UPGRADE_NEEDED'; message = 'The client has to be updated in order to support [file references](https://core.telegram.org/api/file_reference).'; } exports.FilerefUpgradeNeeded = FilerefUpgradeNeeded; class FreshChangeAdminsForbidden extends NotAcceptable { id = 'FRESH_CHANGE_ADMINS_FORBIDDEN'; message = "You were just elected admin, you can't add or modify other admins yet."; } exports.FreshChangeAdminsForbidden = FreshChangeAdminsForbidden; class FreshChangePhoneForbidden extends NotAcceptable { id = 'FRESH_CHANGE_PHONE_FORBIDDEN'; message = "You can't change phone number right after logging in, please wait at least 24 hours."; } exports.FreshChangePhoneForbidden = FreshChangePhoneForbidden; class FreshResetAuthorisationForbidden extends NotAcceptable { id = 'FRESH_RESET_AUTHORISATION_FORBIDDEN'; message = "You can't logout other sessions if less than 24 hours have passed since you logged on the current session."; } exports.FreshResetAuthorisationForbidden = FreshResetAuthorisationForbidden; class GiftcodeNotAllowed extends NotAcceptable { id = 'GIFTCODE_NOT_ALLOWED'; message = ''; } exports.GiftcodeNotAllowed = GiftcodeNotAllowed; class InviteHashExpired extends NotAcceptable { id = 'INVITE_HASH_EXPIRED'; message = 'The invite link has expired.'; } exports.InviteHashExpired = InviteHashExpired; class PaymentUnsupported extends NotAcceptable { id = 'PAYMENT_UNSUPPORTED'; message = 'A detailed description of the error will be received separately as described [here »](https://core.telegram.org/api/errors#406-not-acceptable).'; } exports.PaymentUnsupported = PaymentUnsupported; class PhoneNumberInvalid extends NotAcceptable { id = 'PHONE_NUMBER_INVALID'; message = 'The phone number is invalid.'; } exports.PhoneNumberInvalid = PhoneNumberInvalid; class PhonePasswordFlood extends NotAcceptable { id = 'PHONE_PASSWORD_FLOOD'; message = 'You have tried logging in too many times.'; } exports.PhonePasswordFlood = PhonePasswordFlood; class PremiumCurrentlyUnavailable extends NotAcceptable { id = 'PREMIUM_CURRENTLY_UNAVAILABLE'; message = 'You cannot currently purchase a Premium subscription.'; } exports.PremiumCurrentlyUnavailable = PremiumCurrentlyUnavailable; class PreviousChatImportActiveWaitmin extends NotAcceptable { id = 'PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN'; message = 'Import for this chat is already in progress, wait {value} minutes before starting a new one.'; } exports.PreviousChatImportActiveWaitmin = PreviousChatImportActiveWaitmin; class PrivacyPremiumRequired extends NotAcceptable { id = 'PRIVACY_PREMIUM_REQUIRED'; message = 'You need a [Telegram Premium subscription](https://core.telegram.org/api/premium) to send a message to this user.'; } exports.PrivacyPremiumRequired = PrivacyPremiumRequired; class SendCodeUnavailable extends NotAcceptable { id = 'SEND_CODE_UNAVAILABLE'; message = 'Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend).'; } exports.SendCodeUnavailable = SendCodeUnavailable; class StickersetInvalid extends NotAcceptable { id = 'STICKERSET_INVALID'; message = 'The provided sticker set is invalid.'; } exports.StickersetInvalid = StickersetInvalid; class StickersetOwnerAnonymous extends NotAcceptable { id = 'STICKERSET_OWNER_ANONYMOUS'; message = "Provided stickerset can't be installed as group stickerset to prevent admin deanonymization."; } exports.StickersetOwnerAnonymous = StickersetOwnerAnonymous; class TopicClosed extends NotAcceptable { id = 'TOPIC_CLOSED'; message = "This topic was closed, you can't send messages to it anymore."; } exports.TopicClosed = TopicClosed; class TopicDeleted extends NotAcceptable { id = 'TOPIC_DELETED'; message = 'The specified topic was deleted.'; } exports.TopicDeleted = TopicDeleted; class UpdateAppToLogin extends NotAcceptable { id = 'UPDATE_APP_TO_LOGIN'; message = 'Please update your client to login.'; } exports.UpdateAppToLogin = UpdateAppToLogin; class UserpicPrivacyRequired extends NotAcceptable { id = 'USERPIC_PRIVACY_REQUIRED'; message = 'You need to disable privacy settings for your profile picture in order to make your geolocation public.'; } exports.UserpicPrivacyRequired = UserpicPrivacyRequired; class UserpicUploadRequired extends NotAcceptable { id = 'USERPIC_UPLOAD_REQUIRED'; message = 'You must have a profile picture to publish your geolocation.'; } exports.UserpicUploadRequired = UserpicUploadRequired; class UserRestricted extends NotAcceptable { id = 'USER_RESTRICTED'; message = "You're spamreported, you can't create channels or chats."; } exports.UserRestricted = UserRestricted;