nonebot-plugin-rikka 0.3.4.post1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. nonebot_plugin_rikka-0.3.4.post1/LICENSE +21 -0
  2. nonebot_plugin_rikka-0.3.4.post1/PKG-INFO +157 -0
  3. nonebot_plugin_rikka-0.3.4.post1/README.md +135 -0
  4. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/__init__.py +37 -0
  5. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/alconna.py +1247 -0
  6. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/config.py +34 -0
  7. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/constants.py +25 -0
  8. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/database/__init__.py +4 -0
  9. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/database/crud.py +476 -0
  10. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/database/orm_models.py +50 -0
  11. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/functions/analysis.py +62 -0
  12. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/functions/fortunate.py +105 -0
  13. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/functions/n50.py +77 -0
  14. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/functions/song_tags.py +59 -0
  15. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/migrations/09e00213edc6_add_song_alias_table.py +47 -0
  16. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/migrations/5c791c303fe1_add_maimaipy_identifier.py +39 -0
  17. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/migrations/82115b280b5c_first_revision.py +42 -0
  18. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/migrations/de4344fd6e4c_add_defalut_provider_column.py +39 -0
  19. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/migrations/f273db8f9707_add_song_table.py +49 -0
  20. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/migrations/fb6275585c59_add_divingfish_support.py +41 -0
  21. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/models/song.py +135 -0
  22. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/painters/__init__.py +14 -0
  23. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/painters/_base.py +266 -0
  24. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/painters/_config.py +53 -0
  25. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/painters/analysis.py +141 -0
  26. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/painters/b50.py +51 -0
  27. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/painters/score.py +62 -0
  28. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/painters/song.py +146 -0
  29. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/painters/utils.py +194 -0
  30. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/renderer.py +163 -0
  31. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/score/__init__.py +117 -0
  32. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/score/_base.py +85 -0
  33. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/score/_schema.py +210 -0
  34. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/score/providers/diving_fish.py +185 -0
  35. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/score/providers/lxns.py +202 -0
  36. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/score/providers/maimai.py +389 -0
  37. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/updater/__init__.py +0 -0
  38. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/updater/resources.py +42 -0
  39. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/updater/songs.py +202 -0
  40. nonebot_plugin_rikka-0.3.4.post1/nonebot_plugin_rikka/utils.py +162 -0
  41. nonebot_plugin_rikka-0.3.4.post1/pyproject.toml +60 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Muika
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,157 @@
1
+ Metadata-Version: 2.1
2
+ Name: nonebot-plugin-rikka
3
+ Version: 0.3.4.post1
4
+ Summary: 一个简简单单的舞萌机器人插件
5
+ Requires-Python: <4.0,>=3.9
6
+ Requires-Dist: nonebot2>=2.4.3
7
+ Requires-Dist: nonebot-adapter-onebot>=2.4.6
8
+ Requires-Dist: aiohttp>=3.13.1
9
+ Requires-Dist: nonebot-plugin-alconna>=0.59.4
10
+ Requires-Dist: nonebot-plugin-orm[sqlite]>=0.8.2
11
+ Requires-Dist: maimai-py>=1.3.8
12
+ Requires-Dist: pillow>=11.3.0
13
+ Requires-Dist: async-lru>=2.0.5
14
+ Requires-Dist: numpy>=2.0.2
15
+ Requires-Dist: matplotlib>=3.9.4
16
+ Provides-Extra: dev
17
+ Requires-Dist: pre-commit>=4.1.0; extra == "dev"
18
+ Requires-Dist: mypy>=1.15.0; extra == "dev"
19
+ Requires-Dist: black>=25.1.0; extra == "dev"
20
+ Requires-Dist: types-PyYAML; extra == "dev"
21
+ Description-Content-Type: text/markdown
22
+
23
+ <div align=center>
24
+ <img width=200 src="./assets/RikkaLogo.webp" alt="image"/>
25
+ <h1 align="center">Nonebot-Plugin-Rikka</h1>
26
+ <p align="center">一个简单的 NoneBot2 舞萌查询成绩插件</p>
27
+ </div>
28
+ <div align=center>
29
+ <a href="#关于️"><img src="https://img.shields.io/github/stars/Moemu/Nonebot-Plugin-Rikka" alt="Stars"></a>
30
+ <!-- <a href="https://pypi.org/project/MuiceBot/"><img src="https://img.shields.io/pypi/v/Muicebot" alt="PyPI Version"></a>
31
+ <a href="https://pypi.org/project/MuiceBot/"><img src="https://img.shields.io/pypi/dm/Muicebot" alt="PyPI Downloads" ></a> -->
32
+ <a href="https://nonebot.dev/"><img src="https://img.shields.io/badge/nonebot-2-red" alt="nonebot2"></a>
33
+ <a href="#"><img src="https://img.shields.io/badge/Code%20Style-Black-121110.svg" alt="codestyle"></a>
34
+ </div>
35
+
36
+ ## 介绍✨
37
+
38
+ 基于 [Nonebot2](https://nonebot.dev/) 的舞萌DX的查分插件
39
+
40
+ 看板娘: [Rikka](https://bot.snowy.moe/about/Rikka)
41
+
42
+ ## 功能🪄
43
+
44
+ ✅ 支持游戏: 舞萌DX(Ver.CN 1.5x), ~~中二节奏(Not Plan yet.)~~
45
+
46
+ ✅ 支持数据源: [落雪咖啡屋(未绑定的首选)](https://maimai.lxns.net/), [水鱼查分器](https://www.diving-fish.com/maimaidx/prober/)
47
+
48
+ ✅ 支持功能: 基础查分功能、拟合系数查询、曲目标签查询
49
+
50
+ ## 指令列表🕹️
51
+
52
+ 带有🚧标志的指令暂不可用或仍在开发中
53
+
54
+ | 指令 | 说明 |
55
+ | --------------------------------------- | ------------------------------------------------------ |
56
+ | `.bind lxns\|divingfish\|maimai` | [查分器相关]绑定游戏账号/查分器 |
57
+ | `.unbind lxns\|divingfish\|maimai\|all` | [查分器相关]解绑游戏账号/查分器 |
58
+ | `.source lxns\|divingfish` | [查分器相关]设置默认查分器 |
59
+ | `.b50` | [舞萌DX]生成玩家 Best50 |
60
+ | `.r50` | [舞萌DX]生成玩家 Recent 50(需绑定落雪查分器) |
61
+ | `.ap50` | [舞萌DX]生成玩家 ALL PERFECT 50 |
62
+ | `.pc50` | [舞萌DX]生成玩家游玩次数 Top50 |
63
+ | `.minfo <id\|乐曲名称\|别名>` | [舞萌DX]获取乐曲信息 |
64
+ | `.alias add <song_id> <别名>` | [舞萌DX]添加乐曲别名(不会被 update 操作覆盖) |
65
+ | `.alias update` | [舞萌DX]从落雪查分器更新乐曲别名数据库 |
66
+ | `.alias query <id\|乐曲名称\|别名>` | [舞萌DX]查询该歌曲有什么别名 |
67
+ | `.score <id\|乐曲名称\|别名>` | [舞萌DX]获取玩家游玩该乐曲的成绩 |
68
+ | `.scorelist <level\|achXX.X>` | [舞萌DX]获取玩家对应等级/达成率的成绩列表 |
69
+ | `.update maisong\|alias` | [舞萌DX]更新乐曲或别名数据库 |
70
+ | `.今日舞萌` | [舞萌DX]获取今日舞萌运势 |
71
+ | `.成分分析` | [舞萌DX]获取基于 B100 de |
72
+ | 🚧`.trend` | [舞萌DX]获取玩家的 DX Rating 趋势 (需绑定落雪查分器) |
73
+
74
+
75
+ ## 安装🪄
76
+
77
+ 你需要一个 Nonebot 项目环境,参考:[快速上手](https://nonebot.dev/docs/quick-start)
78
+
79
+ 1. 安装 `nonebot-plugin-rikka`:
80
+
81
+ - 使用源代码安装:
82
+
83
+ 定位到插件目录,执行:
84
+
85
+ ```bash
86
+ git clone https://github.com/Moemu/Nonebot-Plugin-Rikka
87
+ cd Nonebot-Plugin-Rikka
88
+ pip install .
89
+ ```
90
+
91
+ 2. 获取资源文件:下载静态资源文件,并解压到 `static` 目录中: [私人云盘](https://cloud.yuzuchan.moe/f/1bUn/Resource.7z), [OneDrive](https://yuzuai-my.sharepoint.com/:u:/g/personal/yuzu_yuzuchan_moe/EdGUKRSo-VpHjT2noa_9EroBdFZci-tqWjVZzKZRTEeZkw?e=a1TM40)
92
+
93
+ 3. 配置查分器开发者密钥,参考配置小节。
94
+
95
+ 4. 启动 Nonebot 项目并根据提示运行数据库迁移脚本
96
+
97
+ 5. 更新乐曲信息:使用 SUPERUSER 账号执行指令: `.update maisong` 和 `.alias update`
98
+
99
+ 6. (可选)如果需要支持乐曲标签,您需要自行获取来自 [DXRating](https://dxrating.net/search) 的 `combined_tags.json` 并放置在 `static` 文件夹中
100
+
101
+ ## 配置⚙️
102
+
103
+ 使用 `.env` 文件中配置以下内容
104
+
105
+ ### lxns_developer_api_key
106
+
107
+ - 说明: 落雪开发者密钥
108
+
109
+ - 类型: str
110
+
111
+ ### divingfish_developer_api_key
112
+
113
+ - 说明: 水鱼查分器开发者密钥
114
+
115
+ - 类型: Optional[str]
116
+
117
+ - 默认值: None
118
+
119
+ ### static_resource_path
120
+
121
+ - 说明: 静态资源路径(类似于 [Yuri-YuzuChaN/maimaiDX](https://github.com/Yuri-YuzuChaN/maimaiDX) 的实现,你需要从 [此处](https://cloud.yuzuchan.moe/f/1bUn/Resource.7z) 获取游戏的资源文件,这将用于 Best 50 等的渲染)
122
+
123
+ - 类型: str
124
+
125
+ - 默认值: static
126
+
127
+ ### enable_arcade_provider
128
+
129
+ - 说明: 启用 Maimai.py 的机台源查询(需要将此值设置为 True 才可以查询 PC 数)
130
+
131
+ - 类型: bool
132
+
133
+ - 默认值: False
134
+
135
+ ### arcade_provider_http_proxy
136
+
137
+ - 说明: 机台源的代理地址(部分云服务器厂商的 IP 段被华立阻断,因此需要使用家用代理绕开限制)
138
+
139
+ - 类型: Optional[str]
140
+
141
+ - 默认值: False
142
+
143
+ ## 关于🎗️
144
+
145
+ 本项目基于 [MIT License](https://github.com/Moemu/Nonebot-Plugin-Rikka/blob/main/LICENSE) 许可证提供,涉及到再分发时请保留许可文件的副本。
146
+
147
+ 本项目的产生离不开下列开发者的支持,感谢你们的贡献:
148
+
149
+ ![[Rikka 的贡献者们](https://github.com/eryajf/Moemu/Nonebot-Plugin-Rikka/contributors)](https://contrib.rocks/image?repo=Moemu/Nonebot-Plugin-Rikka)
150
+
151
+ 本项目同样是 [MuikaAI](https://github.com/MuikaAI) 的一部分
152
+
153
+ <a href="https://www.afdian.com/a/Moemu" target="_blank"><img src="https://pic1.afdiancdn.com/static/img/welcome/button-sponsorme.png" alt="afadian" style="height: 45px !important;width: 163px !important;"></a>
154
+
155
+ Star History:
156
+
157
+ [![Star History Chart](https://api.star-history.com/svg?repos=Moemu/Nonebot-Plugin-Rikka&type=Date)](https://star-history.com/#Moemu/Nonebot-Plugin-Rikka&Date)
@@ -0,0 +1,135 @@
1
+ <div align=center>
2
+ <img width=200 src="./assets/RikkaLogo.webp" alt="image"/>
3
+ <h1 align="center">Nonebot-Plugin-Rikka</h1>
4
+ <p align="center">一个简单的 NoneBot2 舞萌查询成绩插件</p>
5
+ </div>
6
+ <div align=center>
7
+ <a href="#关于️"><img src="https://img.shields.io/github/stars/Moemu/Nonebot-Plugin-Rikka" alt="Stars"></a>
8
+ <!-- <a href="https://pypi.org/project/MuiceBot/"><img src="https://img.shields.io/pypi/v/Muicebot" alt="PyPI Version"></a>
9
+ <a href="https://pypi.org/project/MuiceBot/"><img src="https://img.shields.io/pypi/dm/Muicebot" alt="PyPI Downloads" ></a> -->
10
+ <a href="https://nonebot.dev/"><img src="https://img.shields.io/badge/nonebot-2-red" alt="nonebot2"></a>
11
+ <a href="#"><img src="https://img.shields.io/badge/Code%20Style-Black-121110.svg" alt="codestyle"></a>
12
+ </div>
13
+
14
+ ## 介绍✨
15
+
16
+ 基于 [Nonebot2](https://nonebot.dev/) 的舞萌DX的查分插件
17
+
18
+ 看板娘: [Rikka](https://bot.snowy.moe/about/Rikka)
19
+
20
+ ## 功能🪄
21
+
22
+ ✅ 支持游戏: 舞萌DX(Ver.CN 1.5x), ~~中二节奏(Not Plan yet.)~~
23
+
24
+ ✅ 支持数据源: [落雪咖啡屋(未绑定的首选)](https://maimai.lxns.net/), [水鱼查分器](https://www.diving-fish.com/maimaidx/prober/)
25
+
26
+ ✅ 支持功能: 基础查分功能、拟合系数查询、曲目标签查询
27
+
28
+ ## 指令列表🕹️
29
+
30
+ 带有🚧标志的指令暂不可用或仍在开发中
31
+
32
+ | 指令 | 说明 |
33
+ | --------------------------------------- | ------------------------------------------------------ |
34
+ | `.bind lxns\|divingfish\|maimai` | [查分器相关]绑定游戏账号/查分器 |
35
+ | `.unbind lxns\|divingfish\|maimai\|all` | [查分器相关]解绑游戏账号/查分器 |
36
+ | `.source lxns\|divingfish` | [查分器相关]设置默认查分器 |
37
+ | `.b50` | [舞萌DX]生成玩家 Best50 |
38
+ | `.r50` | [舞萌DX]生成玩家 Recent 50(需绑定落雪查分器) |
39
+ | `.ap50` | [舞萌DX]生成玩家 ALL PERFECT 50 |
40
+ | `.pc50` | [舞萌DX]生成玩家游玩次数 Top50 |
41
+ | `.minfo <id\|乐曲名称\|别名>` | [舞萌DX]获取乐曲信息 |
42
+ | `.alias add <song_id> <别名>` | [舞萌DX]添加乐曲别名(不会被 update 操作覆盖) |
43
+ | `.alias update` | [舞萌DX]从落雪查分器更新乐曲别名数据库 |
44
+ | `.alias query <id\|乐曲名称\|别名>` | [舞萌DX]查询该歌曲有什么别名 |
45
+ | `.score <id\|乐曲名称\|别名>` | [舞萌DX]获取玩家游玩该乐曲的成绩 |
46
+ | `.scorelist <level\|achXX.X>` | [舞萌DX]获取玩家对应等级/达成率的成绩列表 |
47
+ | `.update maisong\|alias` | [舞萌DX]更新乐曲或别名数据库 |
48
+ | `.今日舞萌` | [舞萌DX]获取今日舞萌运势 |
49
+ | `.成分分析` | [舞萌DX]获取基于 B100 de |
50
+ | 🚧`.trend` | [舞萌DX]获取玩家的 DX Rating 趋势 (需绑定落雪查分器) |
51
+
52
+
53
+ ## 安装🪄
54
+
55
+ 你需要一个 Nonebot 项目环境,参考:[快速上手](https://nonebot.dev/docs/quick-start)
56
+
57
+ 1. 安装 `nonebot-plugin-rikka`:
58
+
59
+ - 使用源代码安装:
60
+
61
+ 定位到插件目录,执行:
62
+
63
+ ```bash
64
+ git clone https://github.com/Moemu/Nonebot-Plugin-Rikka
65
+ cd Nonebot-Plugin-Rikka
66
+ pip install .
67
+ ```
68
+
69
+ 2. 获取资源文件:下载静态资源文件,并解压到 `static` 目录中: [私人云盘](https://cloud.yuzuchan.moe/f/1bUn/Resource.7z), [OneDrive](https://yuzuai-my.sharepoint.com/:u:/g/personal/yuzu_yuzuchan_moe/EdGUKRSo-VpHjT2noa_9EroBdFZci-tqWjVZzKZRTEeZkw?e=a1TM40)
70
+
71
+ 3. 配置查分器开发者密钥,参考配置小节。
72
+
73
+ 4. 启动 Nonebot 项目并根据提示运行数据库迁移脚本
74
+
75
+ 5. 更新乐曲信息:使用 SUPERUSER 账号执行指令: `.update maisong` 和 `.alias update`
76
+
77
+ 6. (可选)如果需要支持乐曲标签,您需要自行获取来自 [DXRating](https://dxrating.net/search) 的 `combined_tags.json` 并放置在 `static` 文件夹中
78
+
79
+ ## 配置⚙️
80
+
81
+ 使用 `.env` 文件中配置以下内容
82
+
83
+ ### lxns_developer_api_key
84
+
85
+ - 说明: 落雪开发者密钥
86
+
87
+ - 类型: str
88
+
89
+ ### divingfish_developer_api_key
90
+
91
+ - 说明: 水鱼查分器开发者密钥
92
+
93
+ - 类型: Optional[str]
94
+
95
+ - 默认值: None
96
+
97
+ ### static_resource_path
98
+
99
+ - 说明: 静态资源路径(类似于 [Yuri-YuzuChaN/maimaiDX](https://github.com/Yuri-YuzuChaN/maimaiDX) 的实现,你需要从 [此处](https://cloud.yuzuchan.moe/f/1bUn/Resource.7z) 获取游戏的资源文件,这将用于 Best 50 等的渲染)
100
+
101
+ - 类型: str
102
+
103
+ - 默认值: static
104
+
105
+ ### enable_arcade_provider
106
+
107
+ - 说明: 启用 Maimai.py 的机台源查询(需要将此值设置为 True 才可以查询 PC 数)
108
+
109
+ - 类型: bool
110
+
111
+ - 默认值: False
112
+
113
+ ### arcade_provider_http_proxy
114
+
115
+ - 说明: 机台源的代理地址(部分云服务器厂商的 IP 段被华立阻断,因此需要使用家用代理绕开限制)
116
+
117
+ - 类型: Optional[str]
118
+
119
+ - 默认值: False
120
+
121
+ ## 关于🎗️
122
+
123
+ 本项目基于 [MIT License](https://github.com/Moemu/Nonebot-Plugin-Rikka/blob/main/LICENSE) 许可证提供,涉及到再分发时请保留许可文件的副本。
124
+
125
+ 本项目的产生离不开下列开发者的支持,感谢你们的贡献:
126
+
127
+ ![[Rikka 的贡献者们](https://github.com/eryajf/Moemu/Nonebot-Plugin-Rikka/contributors)](https://contrib.rocks/image?repo=Moemu/Nonebot-Plugin-Rikka)
128
+
129
+ 本项目同样是 [MuikaAI](https://github.com/MuikaAI) 的一部分
130
+
131
+ <a href="https://www.afdian.com/a/Moemu" target="_blank"><img src="https://pic1.afdiancdn.com/static/img/welcome/button-sponsorme.png" alt="afadian" style="height: 45px !important;width: 163px !important;"></a>
132
+
133
+ Star History:
134
+
135
+ [![Star History Chart](https://api.star-history.com/svg?repos=Moemu/Nonebot-Plugin-Rikka&type=Date)](https://star-history.com/#Moemu/Nonebot-Plugin-Rikka&Date)
@@ -0,0 +1,37 @@
1
+ from nonebot import require
2
+
3
+ require("nonebot_plugin_alconna")
4
+ require("nonebot_plugin_localstore")
5
+ require("nonebot_plugin_orm")
6
+
7
+ from nonebot.plugin import PluginMetadata, inherit_supported_adapters # noqa: E402
8
+
9
+ from .config import Config # noqa: E402
10
+ from .utils import init_logger # noqa: E402
11
+
12
+ init_logger()
13
+
14
+ from nonebot import get_driver # noqa: E402
15
+ from nonebot_plugin_orm import get_scoped_session # noqa: E402
16
+
17
+ from . import alconna # noqa: E402, F401
18
+ from . import database # noqa: E402, F401
19
+ from .database import MaiSongORM # noqa: E402
20
+
21
+
22
+ @get_driver().on_startup
23
+ async def initialize_song_cache():
24
+ session = get_scoped_session()
25
+ await MaiSongORM.refresh_cache(session)
26
+
27
+
28
+ __plugin_meta__ = PluginMetadata(
29
+ name="Nonebot-Plugin-Rikka",
30
+ description="一个简单的舞萌成绩查询Bot插件",
31
+ usage="使用 `.rikka` 查看指令用法",
32
+ type="application",
33
+ config=Config,
34
+ homepage="https://bot.snowy.moe/",
35
+ extra={},
36
+ supported_adapters=inherit_supported_adapters("nonebot_plugin_alconna"),
37
+ )