I'm just gonna paste the enums here. I'm tired. Read yourself.
Usage:
import { APIError } from 'yolkbot/enums';
const bot = new Bot();
const result = await bot.loginAnonymously();
if (result.error === APIError.FirebaseRateLimited) {
console.log('You\'ve created too many accounts recently, try again later.');
} else if (result.error) {
console.log('An unhandled error occurred during login:', result.error);
} else {
console.log('Logged in successfully as user ID:', result.userId);
}
const APIError = {
WebSocketConnectFail: 'websocket_connect_fail',
MissingParams: 'missing_params',
NetworkFail: 'firebase_network_failed',
ServicesClosedEarly: 'services_closed_early',
InternalError: 'unknown_error',
FirebaseRateLimited: 'firebase_rate_limited'
}
const LoginError = {
...APIError,
AccountBanned: 'account_banned'
}
const BuyItemError = {
SessionExpired: 'PLAYER_NOT_FOUND',
ItemNotFound: 'ITEM_NOT_FOUND',
ItemAlreadyOwned: 'ALREADY_OWNED',
CannotAfford: 'INSUFFICIENT_FUNDS',
InternalError: 'UNKNOWN_ERROR'
}
const ChicknWinnerError = {
OnCooldown: 'on_cooldown',
HitDailyLimit: 'hit_daily_limit',
NotAtDailyLimit: 'not_at_limit',
NotEnoughResetEggs: 'not_enough_eggs',
SessionExpired: 'session_expired',
InternalError: 'unknown_error'
}
const GameFindError = {
MissingParams: 'missing_params',
InvalidRegion: 'region_not_in_list',
InvalidMode: 'mode_not_in_list',
InvalidMap: 'map_not_in_list',
GameNotFound: 'game_not_found',
SessionExpired: 'session_expired',
InternalError: 'unknown_error'
}
const GameJoinError = {
MissingParams: 'missing_params',
InvalidObject: 'invalid_game_object',
WebSocketConnectFail: 'websocket_connect_fail',
GameNotFound: 'game_not_found',
InternalError: 'unknown_error'
}
const MatchmakerError = {
WebSocketConnectFail: 'websocket_connect_fail'
}
const Intents = {
CHALLENGES: 1,
BOT_STATS: 2,
PATHFINDING: 3,
PING: 5,
COSMETIC_DATA: 6,
PLAYER_HEALTH: 7,
PACKET_HOOK: 8,
LOG_PACKETS: 10,
SKIP_LOGIN: 11,
DEBUG_BUFFER: 12,
NO_AFK_KICK: 16,
LOAD_MAP: 17,
OBSERVE_GAME: 18,
RENEW_SESSION: 21,
VIP_HIDE_BADGE: 22,
SIMULATION: 23,
MANUAL_UPDATE: 24,
FASTER_RESPAWN: 25
}
const RedeemCodeError = {
SessionExpired: 'PLAYER_NOT_FOUND',
CurrentlyRedeemingElsewhere: 'CODE_DOUBLE_DOUBLE',
AlreadyRedeemed: 'CODE_PREV_REDEEMED',
InvalidCode: 'CODE_NOT_FOUND',
Ratelimited: 'RATE_LIMIT_REACHED',
InternalError: 'UNKNOWN_ERROR'
}
const ClaimSocialError = {
SessionExpired: 'reward_expired_session',
InvalidReward: 'REWARD_NOT_FOUND',
AlreadyRedeemed: 'REWARD_PREV_GIVEN',
InternalError: 'unknown_error'
}
const ClaimURLError = {
SessionExpired: 'urlRewardParams_expired_session',
InvalidReward: 'REWARD_NOT_FOUND',
AlreadyRedeemed: 'REWARD_PREV_GIVEN',
InternalError: 'unknown_error'
}
const ChallengeRerollError = {
SessionExpired: 'challengeRerollSlot_expired_session',
ChallengeNotFound: 'challenge_not_found',
ChallengeNotAssigned: 'challenge_reroll_not_found',
NotEnoughEggs: 'insufficient_eggs',
InternalError: 'unknown_error'
}
const ChallengeClaimError = {
SessionExpired: 'challengeClaimReward_expired_session',
ChallengeNotFound: 'challenge_claim_not_found',
ChallengeNotCompleted: 'challenge_not_completed',
InternalError: 'unknown_error'
}
const PathfindError = {
NoPathFound: 'no_path_found',
PathTooShort: 'path_too_short'
}
const ZoneLeaveReason = {
Despawned: 'despawned',
Killed: 'killed',
WalkedOut: 'exited',
RoundEnded: 'round_ended'
}
const CleanupLevel = {
None: 0,
Partial: 1,
Full: 2
}
I'm just gonna paste the enums here. I'm tired. Read yourself.
Usage:
import { APIError } from 'yolkbot/enums';
const bot = new Bot();
const result = await bot.loginAnonymously();
if (result.error === APIError.FirebaseRateLimited) {
console.log('You\'ve created too many accounts recently, try again later.');
} else if (result.error) {
console.log('An unhandled error occurred during login:', result.error);
} else {
console.log('Logged in successfully as user ID:', result.userId);
}
const APIError = {
WebSocketConnectFail: 'websocket_connect_fail',
MissingParams: 'missing_params',
NetworkFail: 'firebase_network_failed',
ServicesClosedEarly: 'services_closed_early',
InternalError: 'unknown_error',
FirebaseRateLimited: 'firebase_rate_limited'
}
const LoginError = {
...APIError,
AccountBanned: 'account_banned'
}
const BuyItemError = {
SessionExpired: 'PLAYER_NOT_FOUND',
ItemNotFound: 'ITEM_NOT_FOUND',
ItemAlreadyOwned: 'ALREADY_OWNED',
CannotAfford: 'INSUFFICIENT_FUNDS',
InternalError: 'UNKNOWN_ERROR'
}
const ChicknWinnerError = {
OnCooldown: 'on_cooldown',
HitDailyLimit: 'hit_daily_limit',
NotAtDailyLimit: 'not_at_limit',
NotEnoughResetEggs: 'not_enough_eggs',
SessionExpired: 'session_expired',
InternalError: 'unknown_error'
}
const GameFindError = {
MissingParams: 'missing_params',
InvalidRegion: 'region_not_in_list',
InvalidMode: 'mode_not_in_list',
InvalidMap: 'map_not_in_list',
GameNotFound: 'game_not_found',
SessionExpired: 'session_expired',
InternalError: 'unknown_error'
}
const GameJoinError = {
MissingParams: 'missing_params',
InvalidObject: 'invalid_game_object',
WebSocketConnectFail: 'websocket_connect_fail',
GameNotFound: 'game_not_found',
InternalError: 'unknown_error'
}
const MatchmakerError = {
WebSocketConnectFail: 'websocket_connect_fail'
}
const Intents = {
CHALLENGES: 1,
BOT_STATS: 2,
PATHFINDING: 3,
PING: 5,
COSMETIC_DATA: 6,
PLAYER_HEALTH: 7,
PACKET_HOOK: 8,
LOG_PACKETS: 10,
SKIP_LOGIN: 11,
DEBUG_BUFFER: 12,
NO_AFK_KICK: 16,
LOAD_MAP: 17,
OBSERVE_GAME: 18,
RENEW_SESSION: 21,
VIP_HIDE_BADGE: 22,
SIMULATION: 23,
MANUAL_UPDATE: 24,
FASTER_RESPAWN: 25
}
const RedeemCodeError = {
SessionExpired: 'PLAYER_NOT_FOUND',
CurrentlyRedeemingElsewhere: 'CODE_DOUBLE_DOUBLE',
AlreadyRedeemed: 'CODE_PREV_REDEEMED',
InvalidCode: 'CODE_NOT_FOUND',
Ratelimited: 'RATE_LIMIT_REACHED',
InternalError: 'UNKNOWN_ERROR'
}
const ClaimSocialError = {
SessionExpired: 'reward_expired_session',
InvalidReward: 'REWARD_NOT_FOUND',
AlreadyRedeemed: 'REWARD_PREV_GIVEN',
InternalError: 'unknown_error'
}
const ClaimURLError = {
SessionExpired: 'urlRewardParams_expired_session',
InvalidReward: 'REWARD_NOT_FOUND',
AlreadyRedeemed: 'REWARD_PREV_GIVEN',
InternalError: 'unknown_error'
}
const ChallengeRerollError = {
SessionExpired: 'challengeRerollSlot_expired_session',
ChallengeNotFound: 'challenge_not_found',
ChallengeNotAssigned: 'challenge_reroll_not_found',
NotEnoughEggs: 'insufficient_eggs',
InternalError: 'unknown_error'
}
const ChallengeClaimError = {
SessionExpired: 'challengeClaimReward_expired_session',
ChallengeNotFound: 'challenge_claim_not_found',
ChallengeNotCompleted: 'challenge_not_completed',
InternalError: 'unknown_error'
}
const PathfindError = {
NoPathFound: 'no_path_found',
PathTooShort: 'path_too_short'
}
const ZoneLeaveReason = {
Despawned: 'despawned',
Killed: 'killed',
WalkedOut: 'exited',
RoundEnded: 'round_ended'
}
const CleanupLevel = {
None: 0,
Partial: 1,
Full: 2
}