Skip to content

Small-Ku/pwsh-anime-attendance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pwsh-anime-attendance

English | 繁體中文

An auto attendance tool written in PowerShell, for official gaming social platforms like HoYoLAB and Skport.

Features

  • Multi-platform Support:
    • HoYoLAB: Supports attendance for Genshin Impact, Honkai: Star Rail, Zenless Zone Zero, etc.
    • Skport: Supports attendance for Arknights: Endfield.
  • Discord Notifications:
    • Message Reuse: Intelligently updates the same Discord message to avoid notification clutter.
    • Minimal Mode: Option to display detailed reward info or a concise one-line summary.
    • Error Tagging: Automatically tags specific users or roles when cookies expire or manual CAPTCHA is required.
  • Highly Customizable:
    • Supports multi-account and multi-bot configurations.
    • Custom User-Agent and language settings for different platforms.
  • Auto Re-sign: Automates tasks and re-signing for HoYoLAB.

Quick Start

1. Environment Requirements

Ensure your system has PowerShell Core (7+) or Windows PowerShell 5.1 (usually built-in) installed.

2. Download the files

Clone or download this repository to your local directory.

3. Configuration

  1. Rename or save sign.example.json as sign.json.
  2. Fill in the credentials as needed:
  3. Configure Discord Webhook:
    • Enter your Webhook URL in display.discord.bots (leave blank if not needed).
    • To enable message updating, set reuse_msg to true.

How to Get Skport Credentials

  1. Install the Violentmonkey extension (Official Site).
  2. Go to the Script Link and install/import it.
  3. Open the Endfield Sign-in Page and wait a moment.
  4. A window containing cred will pop up; copy it into sign.json.

4. Run the Script

Open PowerShell, navigate to the project directory, and execute:

./sign.ps1

Configuration Details

Discord Bot Configuration (bots)

  • discord_name: The display name of the bot.
  • reuse_msg:
    • false: Send a new message every time.
    • true: Automatically record the ID after the first message and update it in subsequent runs.
    • [Message ID]: Manually specify the message ID to update.
  • minimal: Whether to enable minimal display (shows only reward abbreviations).
  • profiles: A list where you can enter account indices (starting from 0) or specific console_name values.

Account Configuration (profiles)

  • platform: hoyolab or skport.
  • cookies/cred: Credentials for the corresponding platform.
  • console_name: A custom name used for log display and bot matching.

Automation

You can use the built-in sign_schedule.ps1 to automatically register a Windows Task Scheduler task:

  1. Open PowerShell with Administrator privileges.
  2. Run: ./sign_schedule.ps1.
  3. The script will automatically create a scheduled task named AnimeAttendance, set to run daily at 00:00 (UTC+8) and at system startup.

Disclaimer

This project is for educational and exchange purposes only. Please do not use it for any commercial purposes. The user assumes all responsibility for any account issues (such as bans or anomalies) caused by using this tool.

Contributors