Independent fork of canaria3406/hoyolab-auto-sign
Important
There is always a risk when using automation software. No one is responsible if anything happens to your account.
- Auto Check In - Get daily rewards in hoyo games.
- Discord & Telegram Notifications - Get the daily results on a Discord webhook, a Telegram bot, or both.
- Update Notifications - Get notified when there is a new release.
- Code Redeem(WIP) - Redeem codes without you knowing it.
- Go to Google Apps Script and create a new project with your custom name.
- Select the editor and paste the content of src/main.js into the default file.
- Click + > Script, name the new file
config, paste the content of config.example.js into it and fill in your webhook, bot and profiles. All accounts go in theprofileslist. Your credentials only live in this file, so updating later means replacingmainand nothing else. - Select "main" and click the "Run" button at the top. Grant the necessary permissions and confirm that the configuration is correct (Execution started > completed).
- Click the trigger button on the left side and add a new trigger. Select the function to run: main Select the event source: Time-driven Select the type of time based trigger: Day timer Select the time of day: recommended to choose any off-peak time between 0900 to 1500.
- Create a bot with @BotFather and put its token in
telegram.tokenin your config file. - Put the target chat in
telegram.chat_id. For a private chat this is your user ID (message the bot first); for a group or channel add the bot to it and use the number from at.me/c/<id>/...link with-100in front. Sending a message and openinghttps://api.telegram.org/bot<TOKEN>/getUpdatesshows the exact ID. - For groups with Topics set
thread_idto the topic number, otherwise leave it empty.
Leave token empty to disable Telegram, or discord.url empty to disable Discord.
Every run sends one message with the result of each account, labelled with the profile's accountName. On Telegram every message has a button under it that opens the repository.
- Routine runs (every game checked in, or was already checked in) mention nobody. On Telegram they are also delivered without a notification sound.
- Runs that need attention (captcha, expired cookie, or any other error from HoyoLab) are delivered with sound on Telegram, and the affected profile's
discord_idis mentioned on Discord. - Update notices are always delivered as a normal message.
bun i
bun run format # prettier, src folder only
bun run check # eslint + tscTo push with clasp, copy .clasp.json.example to .clasp.json and fill in your script ID, then copy config.example.js to src/config.js and fill it in.
src/config.js is git-ignored so your credentials stay out of the repository, and clasp pushes it together with src/main.js.