# phi-plugin **Repository Path**: catrong/phi-plugin ## Basic Information - **Project Name**: phi-plugin - **Description**: 适用于 Yunzai-Bot V3 的 phigros 辅助插件 - **Primary Language**: JavaScript - **License**: GPL-3.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 19 - **Forks**: 0 - **Created**: 2023-02-01 - **Last Updated**: 2026-03-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

### [中文](./README.md) | English

[![Guild](https://img.shields.io/badge/QQGuild-Hutao114Pgr939-9cf?style=flat-square&logo=GroupMe)](https://pd.qq.com/s/e3z86q6bw) [![Guild](https://img.shields.io/badge/Discord-RkBwFBaRqa-9cf?style=flat-square&logo=Discord)](https://discord.gg/invite/RkBwFBaRqa) [![Bilibili](https://img.shields.io/badge/Bilibili-就是不会告诉你-A4CAFA?style=flat-square&logo=bilibili&logoColor=white&labelColor=ff69b4)](https://space.bilibili.com/403342249) [![Stars](https://img.shields.io/github/stars/Catrong/phi-plugin?style=flat-square&color=yellow&label=Star)](../../stargazers) ![version](https://img.shields.io/badge/Plugin_Version-1.0.1-9cf?style=flat-square) ![version](https://img.shields.io/badge/Phigros-3.18.4-9cf?style=flat-square) [![YunzaiBot](https://img.shields.io/badge/Yunzai-v3.0-9cf?style=flat-square&logo=dependabot)](/yoimiya-kokomi/Yunzai-Bot) [![MiaoYunzai](https://img.shields.io/badge/Miao--Yunzai-v3.0-9cf?style=flat-square&logo=dependabot)](/yoimiya-kokomi/Miao-Yunzai) [![TrssYunzai](https://img.shields.io/badge/TRSS--Yunzai-v3.0-9cf?style=flat-square&logo=dependabot)](/TimeRainStarSky/Yunzai)
### Introduction `phi-plugin` is a plugin for querying Phigros information, including b30, score, userinfo, and more Phigros-related features. Suggestions and issues can be submitted via [Issues](./issues). [Pull request](./pulls) are welcome. Use `/phihelp` after installation to view detailed commands. --- ### Installation Run the following commands in your Yunzai directory: > Using GitHub ```bash # Install plugin core git clone --depth=1 https://github.com/Catrong/phi-plugin.git ./plugins/phi-plugin/ # Enter plugin directory cd ./plugins/phi-plugin/ # Install dependencies pnpm install -P ``` > Using Gitee ```bash # Install plugin core git clone --depth=1 https://gitee.com/catrong/phi-plugin.git ./plugins/phi-plugin/ # Enter plugin directory cd ./plugins/phi-plugin/ # Install dependencies pnpm install -P ``` > [!WARNING] > Please use the master's permission to execute this command to download the song illustrations. Otherwise, the relevant song illustrations will not be displayed properly! (It can be standard input or other platforms.) > >``` > /phi downill >``` --- #### Todo * [ ] Optimize UI design * [ ] Add collection/avatar gallery * [ ] Song selection via phi * [ ] Optimize sessionToken QR scanning * [ ] Modify settings via commands * [ ] Query Song History Constants * [ ] Score Map Tags * [ ] Adapt to TapTap International Version * [ ] ... --- ### Features Note: `#` can be replaced with `/`. Command headers are customizable. #### **User Features** | **Command** | **Description** | | :- | :- | | `#phi help` | Show help | | `#phi (gb\|cn)?bind ` | Bind sessionToken (supports CN/Global, default is CN) | | `#phi unbind` | Remove sessionToken & records | | `#phi clean` | Delete all records | | `#phi update` | Update save data | | `#phi (rks\|pgr\|b30)` | Query Rks (provides b30 results) | | `#phi x30` | Query 1Good b30 | | `#phi fc30` | Query Full Combo b30 | | `杠批比三零` | Same as above,but looks like Arcaea Online | | `#phi info(1\|2)?` | View personal stats | | `#phi lmtacc [0-100]` | Calculate Rks with minimum ACC limit | | `#phi (lvsco(re)\|scolv) ` | Get scores in range | | `#phi chap ` | Get chapter scores | | `#phi ahv [-v version]` | Get rating score table | | `#phi list <-dif difficultyRange> <-acc accRange> ` | List scores per song in range | | `#phi hisb30` | Calculate B30 changes based on history | | `#phi best1(+)` | Text-based b30 (up to b99) | | `#phi score xxx [-dif (EZ\|HD\|IN\|AT)] [-or (acc\|score\|fc\|time)] [-unrank]` | Get single score & improvement tips (parameters for score ranking, API required) | | `#phi suggest` | Get songs that can increase Rks by +0.01 | | `#phi (ranklist\|ranking) [rank]` | Rks leaderboard | | `#phi rankfind ` | Find how many users have higher RKS than the queried RKS | | `#phi data` | Check user data count | | `#phi guess` | Guess song from illustration (reply directly) | | `#phi (ltr\|letter)` | Guess song via letters (use #open/#ans) | | `#phi (tipgame\|hint)` | Guess song via hints (use #tip/#ans) | | `#phi (song\|song) xxx` | Query song info (supports aliases) | | `#phi chart [difficulty=IN]` | View chart details | | `#phi tag [difficulty=IN] ` | View chart tags, available tags shown in response, default difficulty is IN | | `#phi settag [difficulty=IN] ` | Tag a chart, recommended to use /tag to query tag list first, default difficulty is IN | | `#phi (comment\|cmt) [difficulty=IN](newline)` | Comment on songs | | `#phi mycmt` | View own cloud comments | | `#phi recmt ` | Delete comment (owner/admin) | | `#phi (table\|ratings) ` | Phigros rating table | | `#phi new` | Check new songs | | `#phi tips` | Random tips | | `#phi jrrp` | Daily luck | | `#phi alias xxx` | Query song aliases | | `#phi (rand\|random) [rating] [difficulty]` | Random song by criteria | | `#phi randclg [total] [difficulty] ([rating range])` | Random challenge (e.g., /rand 40 (IN 13-15)) | | `#phi ill xxx` | View song illustration | | `#phi search ` | Search songs by BPM/rating/notes | | `#phi theme [0-2]` | Switch themes (affects b30/update/randclg/sign/task) | | `#phi myset ` | View/modify user settings, value supports selection by number (e.g., /myset theme 1) | | `sign/sign` | Daily check-in | | `task/mytasks` | View tasks | | `retask/refresh` | Refresh tasks (20 Notes) | | `#phi (send\|give) ` | Send Notes | #### **Admin Features** | **Command** | **Description** | | :- | :- | | `#phi backup (back)?` | Backup saves (+back to send) | | `#phi restore` | Restore from backup | | `#phi(setnick) xxx ---> xxx` | Set song alias | | `#phi(delnick) xxx` | Remove alias | | `#phi(force)?(update)` | Update plugin | | `#phi repu` | Restart puppeteer | | `#download ill` | Download illustration | | `#phi get ` | Get sessionToken by rank | | `#phi del ` | Ban sessionToken | | `#phi allow ` | Unban sessionToken | | `#phi (set\|set)` | Modify settings | | `#phi ban ` | Disable features |
Ban Parameters #### `#phi ban` Parameters | Parameter | Feature | Affected Commands | | :- | :- | :- | | all | All features | All | | help | Help | /help /tkhelp | | bind | Binding | /bind /unbind | | b19 | Image queries | /pgr /update /info /list /pb30 /p30 /lmtacc /score /lvsco /chap /suggest | | wb19 | Text queries | /data /best | | song | Song info | /song /chart /ill /search /alias /rand /randclg /table /cmt /recmt /addtag /subtag /retag | | ranklist | Leaderboards | /ranklist /godlist | | fnc | Utilities | /com /tips /new | | tipgame | Hint game | /tipgame | | guessgame | Guess game | /guess | | ltrgame | Letter game | /letter /ltr | | sign | Social | /sign /send /task /retask /jrrp | | setting | Settings | /theme | | dan | Dan authentication | /dan /danupdate |
## API Feature Testing Now Open API features can be manually enabled/disabled in settings. When enabled, it automatically syncs user usage records and historical scores from Phi-Plugin applications (web, Yunzai, excluding Koishi for now) to the API server. Some features require API to be enabled. | **Command** | **Description** | :- | :- | `#phi bind ` | Enable score query API, bind API account | `#phi setApiToken ` | Set API Token | `#phi tokenList` | Get list of currently bound platforms | `#phi tokenManage (delete) (-f)?` | Delete bound platform, -f to skip confirmation | `#phi auth ` | Get sessionToken via API Token | `#phi clearApiData` | Clear API data | `#phi updateHistory` | Update historical scores from BOT to API server | `#phi updateUserToken` | **Owner command** Upload current BOT user tokens to API server #### Detailed Permission Explanation: Binding and retrieving saves only requires a score query ID. When binding with `sessionToken` for the first time, the `API Token` will be set to the `sessionToken`, and if users provide a `sessionToken` during binding, the bot will save it locally. --- ### Support Development [](https://afdian.com/a/Feijiang_) Your support is my greatest motivation! #### Sponsors Special thanks to these sponsors (list may not be fully updated):
Loser_X
@Loser_X

🌸 20 🌸
史蒂夫
@Steve~ɘvɘɈƧ
🌸 40 🌸
溯洌RIPPLE
溯洌RIPPLE
🌸 35 🌸
祈

🌸 15 🌸
茗亿
茗亿
🌸 30 🌸
...
...
🌸 50 🌸
夏夏肃炎
夏夏肃炎
🌸 5 🌸
Bluerosion
Bluerosion
🌸 52.0 🌸
Bluerosion

🌸 5 🌸
--- ### Previews | **Best30**

By [@Steve~ɘvɘɈƧ](https://github.com/S-t-e-v-e-e) | **Single Score**

Legacy Version

**Song Info**
| |:-------------------:|:------------------------:| | **Range Scores**

By [@东城Eastown](https://space.bilibili.com/171389567)
**User Stats**
| **Legacy Stats**
| --- ### Contributors ![Alt](https://repobeats.axiom.co/api/embed/3ba1307fae8ac160167cbb2556334fe324ce3065.svg "Repobeats analytics image") ### Star History Star History Chart --- ### Disclaimer 1. This plugin is intended for non-commercial use only. 2. All images/assets are from the internet and will be removed upon request. 3. Cloud save system adapted from [7aGiven/PhigrosLibrary](https://github.com/7aGiven/PhigrosLibrary) ### Related Projects
Yunzai-Bot Plugin Index Yunzai-Bot Miao-Yunzai TRSS-Yunzai