Account Stuff
You can control an account and do various tasks, from buying things in the shop to playing Chikn Winner.
None of these methods require you to join a game.
Login Methods
There are 4 ways to become authorized. These are all asynchronous and should be await
ed. They also all return the same thing, which is either an error string or bot.account
.
[async] bot.createAccount
Creates an account with an email and password.
[async] bot.login
Logs you into an account using an email and password. If you do not call this, joining a game will create and use an anonymous account.
[async] bot.loginWithRefreshToken
Logs you into an account using a Firebase refresh token.
This is currently a method that does not violate Google’s ToS (automation). It also works with Facebook, although no one uses Facebook. It could also be used for email/password, although it is technically less stable.
To obtain a refresh token from Shell, run the following console script while logged into your account:
This will create a black screen with a white text that says “click me to copy token!”. Clicking it will copy the refresh token to your clipboard. Then, put it into loginWithRefreshToken
:
[async] bot.loginAnonymously
Logs you into a guest/anonymous account. This is the default behavior if you do not call either of the above authorization functions and attempt to do something like joining a game.
bot.account
This is an object that stores account information.
bot.account.id
- the id of the accountbot.account.firebaseId
- the firebase id (for auth)bot.account.sessionId
- the session id (for auth)bot.account.session
- the session (for auth)bot.account.email
- the raw email of the accountbot.account.password
- the raw password (plaintext, be careful) of the accountbot.account.ownedItemIds
- the owned items’ IDsbot.account.vip
- if the account is vip statusbot.account.accountAge
- the age of the account in millisecondsbot.account.emailVerified
- if the account’s email is verifiedbot.account.eggBalance
- the egg balancebot.account.cw
- cw statusbot.account.cw.atLimit
- if the account is at the limit for the daybot.account.cw.limit
- the number of times the account has played cw that daybot.account.cw.secondsUntilPlay
- the number of seconds until the account can play againbot.account.cw.canPlayAgain
- the timestamp the account can play again
bot.account.stats
- user stats
Chikn Winner
These methods allow you to play Chikn Winner.
[async] bot.checkChiknWinner
Allows you to check the status of the Chikn Winner minigame for the account. It returns something like this:
More information is in the explanation for bot.account.cw
below.
[async] bot.playChiknWinner
Allows you to play the Chikn Winner minigame. It will either return what you pulled, which either is eggs:
or an item:
It may also return a string, which is one of these errors:
hit_daily_limit
- the bot has hit the daily limit, runbot.resetChiknWinner()
to reset the limit for 200 eggson_cooldown
- chikn winner is on cooldown, seebot.account.cw.secondsUntilPlay
for the seconds until you can play againsession_expired
- the bot’s session expired, usually because the bot’s account was deleted due to bot detectionunknown_error
- an unknown error returned by shell - create an issue on github with the content in the console
[async] bot.resetChiknWinner
Allows you to reset Chikn Winner for 200 eggs if you have hit the daily limit.
If it successfully resets, it will return the Chikn Winner status (from bot.checkChiknWinner()
).
It may also fail, returning one of these errors:
not_at_limit
- the bot is not at the limit for the day, and you should play normallynot_enough_eggs
- the bot does not have enough eggs to resetunknown_error
- an unknown error returned by shell - create an issue on github with the content in the console