UNPKG

@tgsnake/core

Version:

Pure Telegram MTProto library for nodejs

50 lines (49 loc) 2.46 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TakeoutInitDelay = exports.SlowmodeWait = exports.PremiumSubActiveUntil = exports.FloodWait = exports.FloodTestPhoneWait = exports.FloodPremiumWait = exports.AddressInvalid = exports.TwoFaConfirmWait = exports.Flood = void 0; const RpcError_js_1 = require("../RpcError.js"); class Flood extends RpcError_js_1.RPCError { code = 420; name = 'FLOOD'; } exports.Flood = Flood; class TwoFaConfirmWait extends Flood { id = '2FA_CONFIRM_WAIT_X'; message = "Since this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in {value} seconds."; } exports.TwoFaConfirmWait = TwoFaConfirmWait; class AddressInvalid extends Flood { id = 'ADDRESS_INVALID'; message = 'The specified geopoint address is invalid.'; } exports.AddressInvalid = AddressInvalid; class FloodPremiumWait extends Flood { id = 'FLOOD_PREMIUM_WAIT_X'; message = 'Please wait {value} seconds before repeating the action, or purchase a [Telegram Premium subscription](https://core.telegram.org/api/premium) to remove this rate limit.'; } exports.FloodPremiumWait = FloodPremiumWait; class FloodTestPhoneWait extends Flood { id = 'FLOOD_TEST_PHONE_WAIT_X'; message = 'A wait of {value} seconds is required in the test servers'; } exports.FloodTestPhoneWait = FloodTestPhoneWait; class FloodWait extends Flood { id = 'FLOOD_WAIT_X'; message = 'Please wait {value} seconds before repeating the action.'; } exports.FloodWait = FloodWait; class PremiumSubActiveUntil extends Flood { id = 'PREMIUM_SUB_ACTIVE_UNTIL_X'; message = 'You already have a premium subscription active until unixtime {value} .'; } exports.PremiumSubActiveUntil = PremiumSubActiveUntil; class SlowmodeWait extends Flood { id = 'SLOWMODE_WAIT_X'; message = 'Slowmode is enabled in this chat: wait {value} seconds before sending another message to this chat.'; } exports.SlowmodeWait = SlowmodeWait; class TakeoutInitDelay extends Flood { id = 'TAKEOUT_INIT_DELAY_X'; message = "Sorry, for security reasons, you will be able to begin downloading your data in {value} seconds. We have notified all your devices about the export request to make sure it's authorized and to give you time to react if it's not."; } exports.TakeoutInitDelay = TakeoutInitDelay;