nonebot-plugin-splatoon3-nso 2.2.2__tar.gz → 2.2.6__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.
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/PKG-INFO +6 -2
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/README.md +4 -1
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/__init__.py +1 -1
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/data/data_source.py +1 -1
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/admin.py +2 -2
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/battle.py +3 -3
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/coop.py +2 -2
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/cron/report.py +5 -5
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/history.py +3 -3
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/last.py +8 -4
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/login.py +18 -16
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/my.py +28 -28
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/other.py +4 -4
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/push.py +67 -29
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/qq_md.py +1 -1
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/report.py +8 -6
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/screenshot.py +5 -3
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/send_msg.py +70 -15
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/top.py +4 -4
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/utils.py +13 -11
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/s3s/iksm.py +6 -5
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/utils/bot.py +14 -6
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/utils/utils.py +1 -1
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/pyproject.toml +2 -1
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/api/__init__.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/api/main.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/api/tools.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/config.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/data/__init__.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/data/db_sqlite.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/data/transfer.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/data/utils.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/__init__.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/b_or_c_evaluate_text.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/b_or_c_tools.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/cron/__init__.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/cron/else_cron.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/cron/event_top.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/cron/stat_ink.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/cron/user_friends.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/cron/utils.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/handle/cron/x_player.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/bot_login.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/bot_privacy.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/excuse_dictionary.csv +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/full_message_help.jpg +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/full_message_help2.jpg +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/i18n/en-GB.json +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/i18n/ja-JP.json +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/i18n/ko-KR.json +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/i18n/zh-CN.json +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/i18n/zh-TW.json +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/AREA.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/BANKARA(CHALLENGE).png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/BANKARA(OPEN).png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/BANKARA.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/CLAM.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/GOAL.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/LEAGUE.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/LOFT.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/Regular.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/Splatfest.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/TURF_WAR.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/X_MATCH.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/coop_big_run.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/coop_regular.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/coop_team.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/icons/private.png +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/md.css +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/resource/sp3bot-login.gif +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/s3s/__init__.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/s3s/splatnet_image.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/s3s/splatoon.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/s3s/stat.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/s3s/utils.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/test_s3s.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/util.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/utils/__init__.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/utils/cos_upload.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/utils/excuse_generator.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/utils/http.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/utils/keyboard.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/utils/keyboard_help.md +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/utils/redis.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/utils/short_url.py +0 -0
- {nonebot_plugin_splatoon3_nso-2.2.2 → nonebot_plugin_splatoon3_nso-2.2.6}/nonebot_plugin_splatoon3_nso/utils/time.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: nonebot-plugin-splatoon3-nso
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.6
|
|
4
4
|
Summary: 一个基于nonebot2框架的splatoon3游戏nso数据查询插件
|
|
5
5
|
Author: cypas
|
|
6
6
|
Author-email: cypas <ayano05@outlook.com>
|
|
@@ -18,6 +18,7 @@ Requires-Dist: nonebot-adapter-onebot>=2.4.6,<3
|
|
|
18
18
|
Requires-Dist: nonebot-adapter-telegram>=0.1.0b20,<0.2
|
|
19
19
|
Requires-Dist: nonebot-adapter-kaiheila>=0.3.4,<0.4
|
|
20
20
|
Requires-Dist: nonebot-adapter-qq>=1.7.1,<2
|
|
21
|
+
Requires-Dist: nonebot-adapter-discord>=1.1.9,<2
|
|
21
22
|
Requires-Dist: nonebot-plugin-apscheduler>=0.5.0,<0.6
|
|
22
23
|
Requires-Dist: nonebot-plugin-datastore>=1.3.0,<2
|
|
23
24
|
Requires-Dist: nonebot-plugin-htmlrender>=0.6.7,<0.7
|
|
@@ -72,6 +73,9 @@ _✨ splatoon3 nso查询插件 ✨_
|
|
|
72
73
|
<a href="https://github.com/nonebot/adapter-qq">
|
|
73
74
|
<img src="https://img.shields.io/badge/QQ-Adapter-lightgrey?style=social" alt="QQ">
|
|
74
75
|
</a>
|
|
76
|
+
<a href="https://github.com/nonebot/adapter-discord">
|
|
77
|
+
<img src="https://img.shields.io/badge/discord-Adapter-lightgrey?style=social&logo=discord" alt="discord">
|
|
78
|
+
</a>
|
|
75
79
|
</p>
|
|
76
80
|
|
|
77
81
|
</div>
|
|
@@ -81,7 +85,7 @@ _✨ splatoon3 nso查询插件 ✨_
|
|
|
81
85
|
- 一个基于nonebot2框架的splatoon3
|
|
82
86
|
nso查询插件,支持onebot11,onebot12,[telegram](https://github.com/nonebot/adapter-telegram)
|
|
83
87
|
协议,[kook](https://github.com/Tian-que/nonebot-adapter-kaiheila)
|
|
84
|
-
协议,[QQ官方bot](https://github.com/nonebot/adapter-qq)协议
|
|
88
|
+
协议,[QQ官方bot](https://github.com/nonebot/adapter-qq)协议,[discord](https://github.com/nonebot/adapter-discord)协议
|
|
85
89
|
- 本仓库代码是基于paul的[splatoon3-bot](https://github.com/paul-sama/splatoon3-bot)内的nso插件进行的重构版本
|
|
86
90
|
- 建议配合我做的[日程查询插件](https://github.com/Cypas/splatoon3-schedule)一起使用
|
|
87
91
|
|
|
@@ -37,6 +37,9 @@ _✨ splatoon3 nso查询插件 ✨_
|
|
|
37
37
|
<a href="https://github.com/nonebot/adapter-qq">
|
|
38
38
|
<img src="https://img.shields.io/badge/QQ-Adapter-lightgrey?style=social" alt="QQ">
|
|
39
39
|
</a>
|
|
40
|
+
<a href="https://github.com/nonebot/adapter-discord">
|
|
41
|
+
<img src="https://img.shields.io/badge/discord-Adapter-lightgrey?style=social&logo=discord" alt="discord">
|
|
42
|
+
</a>
|
|
40
43
|
</p>
|
|
41
44
|
|
|
42
45
|
</div>
|
|
@@ -46,7 +49,7 @@ _✨ splatoon3 nso查询插件 ✨_
|
|
|
46
49
|
- 一个基于nonebot2框架的splatoon3
|
|
47
50
|
nso查询插件,支持onebot11,onebot12,[telegram](https://github.com/nonebot/adapter-telegram)
|
|
48
51
|
协议,[kook](https://github.com/Tian-que/nonebot-adapter-kaiheila)
|
|
49
|
-
协议,[QQ官方bot](https://github.com/nonebot/adapter-qq)协议
|
|
52
|
+
协议,[QQ官方bot](https://github.com/nonebot/adapter-qq)协议,[discord](https://github.com/nonebot/adapter-discord)协议
|
|
50
53
|
- 本仓库代码是基于paul的[splatoon3-bot](https://github.com/paul-sama/splatoon3-bot)内的nso插件进行的重构版本
|
|
51
54
|
- 建议配合我做的[日程查询插件](https://github.com/Cypas/splatoon3-schedule)一起使用
|
|
52
55
|
|
|
@@ -21,7 +21,7 @@ __plugin_meta__ = PluginMetadata(
|
|
|
21
21
|
homepage="https://github.com/Cypas/splatoon3-nso",
|
|
22
22
|
# 发布必填。
|
|
23
23
|
config=Config,
|
|
24
|
-
supported_adapters={"~onebot.v11", "~onebot.v12", "~telegram", "~kaiheila", "~qq"},
|
|
24
|
+
supported_adapters={"~onebot.v11", "~onebot.v12", "~telegram", "~kaiheila", "~qq", "~discord"},
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
|
|
@@ -258,7 +258,7 @@ def model_get_all_active_report_user() -> list[UserTable]:
|
|
|
258
258
|
or_(
|
|
259
259
|
func.date(UserTable.last_cmd_time) == today,
|
|
260
260
|
func.date(UserTable.last_cmd_time) == yesterday,
|
|
261
|
-
func.date(UserTable.last_cmd_time) == two_before_day,
|
|
261
|
+
# func.date(UserTable.last_cmd_time) == two_before_day,
|
|
262
262
|
)
|
|
263
263
|
)
|
|
264
264
|
))
|
|
@@ -99,7 +99,7 @@ async def admin_cmd(bot: Bot, event: Event, args: Message = CommandArg()):
|
|
|
99
99
|
game_sp_id="", game_name="", nsa_id="", stat_key=admin_stat_key)
|
|
100
100
|
await bot_send(bot, event, message=f"token已恢复")
|
|
101
101
|
|
|
102
|
-
case "help":
|
|
102
|
+
case "help" | "":
|
|
103
103
|
"""指令目录"""
|
|
104
104
|
msg = "所有命令都需要加上/admin 前缀\n" \
|
|
105
105
|
"get_push 获取当前push统计\n" \
|
|
@@ -187,7 +187,7 @@ async def admin_cmd(bot: Bot, event: Event, args: Message = CommandArg()):
|
|
|
187
187
|
return False
|
|
188
188
|
# 设置别人的值
|
|
189
189
|
dict_get_or_set_user_info(platform, my_user_id, session_token=user.session_token, access_token="",
|
|
190
|
-
g_token="", bullet_token="", game_sp_id=user.game_sp_id or "",
|
|
190
|
+
g_token="", bullet_token="", game_sp_id=user.game_sp_id or "", stat_key="",
|
|
191
191
|
game_name=user.game_name or "", nsa_id=user.nsa_id or "")
|
|
192
192
|
await bot_send(bot, event,
|
|
193
193
|
message=f"已复制账号 db_id:{user.id},msg_id:{get_msg_id(user.platform, user.user_id)},\ngame_name:{user.game_name}\n还原:/admin restore_token")
|
|
@@ -167,11 +167,11 @@ async def get_battle_msg_md(b_info, battle_detail, get_equip=False, idx=0, splat
|
|
|
167
167
|
title += ('##### 奖牌:' + ' '.join(award_list) + '\n')
|
|
168
168
|
|
|
169
169
|
# 打印图例说明
|
|
170
|
-
user_create_dt = splatoon.user_db_info.create_time + timedelta(days=
|
|
171
|
-
plugin_release_dt = get_time_now_china_date(plugin_release_time) + timedelta(days=
|
|
170
|
+
user_create_dt = splatoon.user_db_info.create_time + timedelta(days=14)
|
|
171
|
+
plugin_release_dt = get_time_now_china_date(plugin_release_time) + timedelta(days=14)
|
|
172
172
|
now_dt = get_time_now_china()
|
|
173
173
|
if (now_dt < plugin_release_dt or now_dt < user_create_dt) and not push_statistics:
|
|
174
|
-
footer += f'\n###### 本注解说明会在登录
|
|
174
|
+
footer += f'\n###### 本注解说明会在登录14天后不再显示' \
|
|
175
175
|
f'</br>用户名颜色: <b>粗体黑色</b>:玩家自己,' \
|
|
176
176
|
f'<span style="color:green">绿色 </span> :已在bot登录的用户,' \
|
|
177
177
|
f'<span style="color:skyblue">浅蓝色 </span> :某个已登录用户的好友(大概率国人)' \
|
|
@@ -145,8 +145,8 @@ async def get_coop_msg_md(coop_info, coop_detail, coop_defeat=None, mask=False,
|
|
|
145
145
|
msg += f"\n##### 时间: {str_time}"
|
|
146
146
|
|
|
147
147
|
# 打印图例说明
|
|
148
|
-
user_create_dt = splatoon.user_db_info.create_time + timedelta(days=
|
|
149
|
-
plugin_release_dt = get_time_now_china_date(plugin_release_time) + timedelta(days=
|
|
148
|
+
user_create_dt = splatoon.user_db_info.create_time + timedelta(days=14)
|
|
149
|
+
plugin_release_dt = get_time_now_china_date(plugin_release_time) + timedelta(days=14)
|
|
150
150
|
now_dt = get_time_now_china()
|
|
151
151
|
if now_dt < plugin_release_dt or now_dt < user_create_dt:
|
|
152
152
|
msg += f'\n###### 本注解说明会在登录7天后不再显示' \
|
|
@@ -235,7 +235,7 @@ async def create_set_report_tasks(is_corn_job=False, is_inactive_user=False):
|
|
|
235
235
|
try:
|
|
236
236
|
phase1_splatoons = await asyncio.wait_for(
|
|
237
237
|
asyncio.gather(*phase1_tasks, return_exceptions=True),
|
|
238
|
-
timeout=
|
|
238
|
+
timeout=4 * 3600
|
|
239
239
|
)
|
|
240
240
|
# 记录失败的任务
|
|
241
241
|
for i, result in enumerate(phase1_splatoons):
|
|
@@ -244,7 +244,7 @@ async def create_set_report_tasks(is_corn_job=False, is_inactive_user=False):
|
|
|
244
244
|
msg_id = get_msg_id(platform, user_id)
|
|
245
245
|
cron_logger.error(f"阶段1任务执行失败: {msg_id}, 错误: {result}")
|
|
246
246
|
except asyncio.TimeoutError:
|
|
247
|
-
cron_logger.error("阶段1任务执行超时(
|
|
247
|
+
cron_logger.error("阶段1任务执行超时(4小时),已自动退出")
|
|
248
248
|
phase1_splatoons = []
|
|
249
249
|
|
|
250
250
|
# 标记阶段1已完成
|
|
@@ -538,12 +538,12 @@ async def send_report_task():
|
|
|
538
538
|
if not have_report:
|
|
539
539
|
continue
|
|
540
540
|
counters["new_report_count"] += 1
|
|
541
|
-
# 排除
|
|
542
|
-
if
|
|
541
|
+
# 排除 日报通知未打开的用户
|
|
542
|
+
if not user.report_notify:
|
|
543
543
|
continue
|
|
544
544
|
counters["can_send_report_count"] += 1
|
|
545
545
|
# 每次循环强制睡眠0.1s,使一分钟内不超过120次发信阈值
|
|
546
|
-
await asyncio.sleep(0.
|
|
546
|
+
await asyncio.sleep(0.2)
|
|
547
547
|
try:
|
|
548
548
|
msg = get_report(user.platform, user.user_id, _type="cron")
|
|
549
549
|
if msg:
|
|
@@ -6,14 +6,14 @@ from ..s3s.splatoon import Splatoon
|
|
|
6
6
|
from ..utils.bot import *
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
@
|
|
10
|
-
async def history(bot: Bot, event: Event,
|
|
9
|
+
@on_regex(r"^[\/.,,。]?(?:history|his)[ ]?(.*)$", priority=10, block=True).handle(parameterless=[Depends(_check_session_handler)])
|
|
10
|
+
async def history(bot: Bot, event: Event, re_tuple: Tuple = RegexGroup()):
|
|
11
11
|
"""历史记录查询"""
|
|
12
12
|
_type = 'open'
|
|
13
13
|
_type_str = '开放'
|
|
14
14
|
platform = bot.adapter.get_name()
|
|
15
15
|
user_id = event.get_user_id()
|
|
16
|
-
cmd_message =
|
|
16
|
+
cmd_message = str(re_tuple[0] or "").strip()
|
|
17
17
|
logger.debug(f'history: {cmd_message}')
|
|
18
18
|
if cmd_message:
|
|
19
19
|
cmd_lst = cmd_message.split()
|
|
@@ -15,11 +15,13 @@ from ..s3s.splatoon import Splatoon
|
|
|
15
15
|
from ..s3s.utils import SPLATNET3_URL
|
|
16
16
|
from ..utils.bot import *
|
|
17
17
|
|
|
18
|
-
matcher_last =
|
|
18
|
+
matcher_last = on_regex(
|
|
19
|
+
r"^[\/.,,。]?last(?:[ ]*((?:battle|b|coop|c|equip|e|image|i|screenshot|ss|mask|m|\d+)(?:[ ]*(?:battle|b|coop|c|equip|e|image|i|screenshot|ss|mask|m|\d+))*))?[ ]?$",
|
|
20
|
+
priority=10, block=True)
|
|
19
21
|
|
|
20
22
|
|
|
21
23
|
@matcher_last.handle(parameterless=[Depends(_check_session_handler)])
|
|
22
|
-
async def last(bot: Bot, event: Event,
|
|
24
|
+
async def last(bot: Bot, event: Event, re_tuple: Tuple = RegexGroup()):
|
|
23
25
|
"""获取上一局对战或打工数据图"""
|
|
24
26
|
platform = bot.adapter.get_name()
|
|
25
27
|
user_id = event.get_user_id()
|
|
@@ -33,7 +35,7 @@ async def last(bot: Bot, event: Event, args: Message = CommandArg()):
|
|
|
33
35
|
get_image = False
|
|
34
36
|
mask = False
|
|
35
37
|
idx = 0
|
|
36
|
-
cmd_message =
|
|
38
|
+
cmd_message = str(re_tuple[0] or "").strip()
|
|
37
39
|
logger.debug(f'last: {cmd_message}')
|
|
38
40
|
# 筛选参数
|
|
39
41
|
if cmd_message:
|
|
@@ -130,7 +132,9 @@ async def get_last_battle_or_coop(bot, event, for_push=False, get_battle=False,
|
|
|
130
132
|
|
|
131
133
|
# 如果qq平台用户的用户名还是默认值QQ群,请求接口获取真实名字
|
|
132
134
|
if isinstance(splatoon.bot, QQ_Bot) and (
|
|
133
|
-
splatoon.user_name in ["QQ群", "QQ私信"] or
|
|
135
|
+
splatoon.user_name in ["QQ群", "QQ私信"] or
|
|
136
|
+
splatoon.user_id == splatoon.user_name or
|
|
137
|
+
not splatoon.user_name):
|
|
134
138
|
user_name = await get_qq_user_name(splatoon.bot, splatoon.user_id)
|
|
135
139
|
# 更新缓存
|
|
136
140
|
if user_name:
|
|
@@ -24,7 +24,8 @@ MSG_PRIVATE = "该指令需要私信机器人才能使用"
|
|
|
24
24
|
global_login_status_dict: dict = {}
|
|
25
25
|
global_login_code_dict: dict = {}
|
|
26
26
|
|
|
27
|
-
matcher_login_in =
|
|
27
|
+
matcher_login_in = on_regex(r"^[\/.,,。]?(login|登录|nso登录|登陸|nso登陸|nso_login|nsologin)[ ]?$",
|
|
28
|
+
priority=10, block=True)
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
@matcher_login_in.handle()
|
|
@@ -168,7 +169,7 @@ async def login_in_2(bot: Bot, event: Event):
|
|
|
168
169
|
new_user_name = event_info.get('user_name', "")
|
|
169
170
|
|
|
170
171
|
# 如果qq平台用户的用户名还是默认值QQ群,请求接口获取真实名字
|
|
171
|
-
if isinstance(bot, QQ_Bot):
|
|
172
|
+
if isinstance(bot, QQ_Bot) and (new_user_name in ["QQ群", "QQ私信"] or user_id == new_user_name or not new_user_name):
|
|
172
173
|
user_name = await get_qq_user_name(bot, user_id)
|
|
173
174
|
if user_name:
|
|
174
175
|
new_user_name = user_name
|
|
@@ -233,14 +234,15 @@ async def login_in_2(bot: Bot, event: Event):
|
|
|
233
234
|
except Exception as e:
|
|
234
235
|
game_sp_id = None
|
|
235
236
|
|
|
236
|
-
_msg = f'new_login_user:{msg_id}\n会话昵称:{new_user_name}\nns_player_code:{game_sp_id}
|
|
237
|
+
_msg = f'new_login_user:{msg_id}\n会话昵称:{new_user_name}\nns_player_code:{game_sp_id}'
|
|
237
238
|
# 写登陆到文件
|
|
238
239
|
write_text = f"用户登陆:msg_id:{msg_id},会话昵称:{user.user_name},游戏昵称:{user.game_name},ns_player_code:{user.game_sp_id}"
|
|
239
240
|
write_login_text(msg_id, text=write_text)
|
|
240
241
|
await notify_to_channel(_msg)
|
|
241
242
|
|
|
242
243
|
|
|
243
|
-
@
|
|
244
|
+
@on_regex(r"^[\/.,,。]?(clear_db_info|loginout|login_out|退出登录|退出登陸)[ ]?$", priority=10,
|
|
245
|
+
block=True).handle()
|
|
244
246
|
async def clear_db_info(bot: Bot, event: Event):
|
|
245
247
|
"""清空账号数据"""
|
|
246
248
|
platform = bot.adapter.get_name()
|
|
@@ -276,7 +278,7 @@ async def clear_db_info(bot: Bot, event: Event):
|
|
|
276
278
|
global_user_info_dict.pop(msg_id)
|
|
277
279
|
|
|
278
280
|
|
|
279
|
-
@
|
|
281
|
+
@on_regex(r"^[\/.,,。]?(get_login_code|getlogincode|glc|getlc)[ ]?$", priority=10, block=True).handle(
|
|
280
282
|
parameterless=[Depends(_check_session_handler)])
|
|
281
283
|
async def get_login_code(bot: Bot, event: Event):
|
|
282
284
|
"""获取绑定码"""
|
|
@@ -313,11 +315,11 @@ async def get_login_code(bot: Bot, event: Event):
|
|
|
313
315
|
await bot_send(bot, event, message=f"/set_login {login_code}", skip_ad=True)
|
|
314
316
|
|
|
315
317
|
|
|
316
|
-
@
|
|
317
|
-
async def set_login_code(bot: Bot, event: Event):
|
|
318
|
+
@on_regex(r"^[\/.,,。]?set_login[ ]?(.+)$", priority=10, block=True).handle()
|
|
319
|
+
async def set_login_code(bot: Bot, event: Event, re_tuple: Tuple = RegexGroup()):
|
|
318
320
|
"""绑定账号"""
|
|
319
321
|
|
|
320
|
-
login_code =
|
|
322
|
+
login_code = str(re_tuple[0] or "").strip()
|
|
321
323
|
platform = bot.adapter.get_name()
|
|
322
324
|
user_id = event.get_user_id()
|
|
323
325
|
msg_id = get_msg_id(platform, user_id)
|
|
@@ -371,7 +373,7 @@ async def set_login_code(bot: Bot, event: Event):
|
|
|
371
373
|
new_user_name = event_info.get('user_name', "")
|
|
372
374
|
|
|
373
375
|
# 如果qq平台用户的用户名还是默认值QQ群,请求接口获取真实名字
|
|
374
|
-
if isinstance(bot, QQ_Bot):
|
|
376
|
+
if isinstance(bot, QQ_Bot) and (new_user_name in ["QQ群", "QQ私信"] or user_id == new_user_name or not new_user_name):
|
|
375
377
|
user_name = await get_qq_user_name(bot, user_id)
|
|
376
378
|
if user_name:
|
|
377
379
|
new_user_name = user_name
|
|
@@ -400,7 +402,7 @@ async def set_login_code(bot: Bot, event: Event):
|
|
|
400
402
|
await notify_to_channel(f"绑定账号成功: {msg_id},{new_user_name}, 旧用户为{old_msg_id},{old_user_name}")
|
|
401
403
|
|
|
402
404
|
|
|
403
|
-
matcher_set_api_key =
|
|
405
|
+
matcher_set_api_key = on_regex(r"^[\/.,,。]?(set_stat_key|set_api_key)[ ]?$", priority=10, block=True)
|
|
404
406
|
|
|
405
407
|
|
|
406
408
|
@matcher_set_api_key.handle(parameterless=[Depends(_check_session_handler)])
|
|
@@ -441,9 +443,9 @@ async def get_set_api_key(bot: Bot, event: Event):
|
|
|
441
443
|
if isinstance(bot, Tg_Bot):
|
|
442
444
|
msg = "set_api_key success, bot will check every 2 hours and post your data to stat.ink.\n" \
|
|
443
445
|
"first sync will be in minutes."
|
|
444
|
-
elif isinstance(bot, QQ_Bot):
|
|
445
|
-
|
|
446
|
-
|
|
446
|
+
# elif isinstance(bot, QQ_Bot):
|
|
447
|
+
# msg = "设置成功,bot将开始同步你当前的对战及打工数据到 stat点ink,并后续每2h自动进行一次同步\n" \
|
|
448
|
+
# "因QQ平台主动推送限制,同步成功时Bot无法主动推送消息,如需确认,请在三分钟后前往stat网站自行查看记录,kook平台bot才可以主动推送"
|
|
447
449
|
elif isinstance(bot, All_BOT):
|
|
448
450
|
msg = f"设置成功,bot将开始同步你当前的对战及打工数据到 stat.ink,并后续每2h自动进行一次同步"
|
|
449
451
|
await bot_send(bot, event, message=msg, skip_ad=True)
|
|
@@ -454,7 +456,7 @@ async def get_set_api_key(bot: Bot, event: Event):
|
|
|
454
456
|
asyncio.create_task(sync_stat_ink_func(db_user))
|
|
455
457
|
|
|
456
458
|
|
|
457
|
-
@
|
|
459
|
+
@on_regex(r"^[\/.,,。]?(sync_now|sync|syncnow|syncstat)[ ]?$", priority=10, block=True).handle(
|
|
458
460
|
parameterless=[Depends(_check_session_handler)])
|
|
459
461
|
async def sync_now(bot: Bot, event: Event):
|
|
460
462
|
platform = bot.adapter.get_name()
|
|
@@ -470,8 +472,8 @@ async def sync_now(bot: Bot, event: Event):
|
|
|
470
472
|
|
|
471
473
|
# await update_s3si_ts()
|
|
472
474
|
msg = "战绩手动同步任务已开始,请稍等..."
|
|
473
|
-
if isinstance(bot, QQ_Bot):
|
|
474
|
-
|
|
475
|
+
# if isinstance(bot, QQ_Bot):
|
|
476
|
+
# msg += "\n因QQ平台主动推送限制,同步成功时Bot无法主动推送消息,如需确认,请在三分钟后前往stat点ink网站自行查看记录,kook平台bot才可以主动推送"
|
|
475
477
|
db_user = model_get_or_set_user(platform, user_id)
|
|
476
478
|
if db_user:
|
|
477
479
|
await bot_send(bot, event, msg, skip_ad=True)
|
|
@@ -31,7 +31,7 @@ NSO_WEB_CACHE_DICT = {}
|
|
|
31
31
|
# 连坐字典 记录封禁前最后的sp_id 连坐名单保留一天
|
|
32
32
|
BAN_USER_SP_ID_LIST = []
|
|
33
33
|
|
|
34
|
-
@
|
|
34
|
+
@on_regex(r"^[\/.,,。]?me[ ]?$", priority=10, block=True).handle(parameterless=[Depends(_check_session_handler)])
|
|
35
35
|
async def me(bot: Bot, event: Event):
|
|
36
36
|
"""查询 我的"""
|
|
37
37
|
await bot_send(bot, event, message="请求个人数据中,请稍等...")
|
|
@@ -335,7 +335,7 @@ async def get_me_md(user: GlobalUserInfo, summary, total, coops, weapons, from_g
|
|
|
335
335
|
return msg
|
|
336
336
|
|
|
337
337
|
|
|
338
|
-
@
|
|
338
|
+
@on_regex(r"^[\/.,,。]?(friends?|fr)[ ]?$", priority=10, block=True).handle(
|
|
339
339
|
parameterless=[Depends(_check_session_handler)])
|
|
340
340
|
async def friends(bot: Bot, event: Event):
|
|
341
341
|
platform = bot.adapter.get_name()
|
|
@@ -375,7 +375,7 @@ async def get_friends_md(splatoon, lang='zh-CN'):
|
|
|
375
375
|
img = f'''<img height="40" src="{icon_img}"/>'''
|
|
376
376
|
if f['playerName'] and f['playerName'] != f['nickname']:
|
|
377
377
|
nickname = game_name_replace(f['nickname'])
|
|
378
|
-
n = f'{
|
|
378
|
+
n = f'{nickname}|{img}|{n}'
|
|
379
379
|
else:
|
|
380
380
|
n = f'{n}|{img}|'
|
|
381
381
|
msg += f'''|{n}| {_state}|\n'''
|
|
@@ -395,7 +395,7 @@ async def get_friends_md(splatoon, lang='zh-CN'):
|
|
|
395
395
|
return msg
|
|
396
396
|
|
|
397
397
|
|
|
398
|
-
nsfr =
|
|
398
|
+
nsfr = on_regex(r"^[\/.,,。]?(ns_friends?|ns_fr|nsfr)[ ]?$", priority=10, block=True)
|
|
399
399
|
|
|
400
400
|
|
|
401
401
|
@nsfr.handle(
|
|
@@ -520,11 +520,11 @@ async def get_ns_friends_md(splatoon: Splatoon):
|
|
|
520
520
|
return msg
|
|
521
521
|
|
|
522
522
|
|
|
523
|
-
matcher_fc =
|
|
523
|
+
matcher_fc = on_regex(r"^[\/.,,。]?(?:friend_code|friends_code|fc)[ ]?(force)?[ ]?$", priority=10, block=True)
|
|
524
524
|
|
|
525
525
|
|
|
526
526
|
@matcher_fc.handle(parameterless=[Depends(_check_session_handler)])
|
|
527
|
-
async def friend_code(bot: Bot, event: Event,
|
|
527
|
+
async def friend_code(bot: Bot, event: Event, re_tuple: Tuple = RegexGroup()):
|
|
528
528
|
"""获取ns 好友码"""
|
|
529
529
|
platform = bot.adapter.get_name()
|
|
530
530
|
user_id = event.get_user_id()
|
|
@@ -532,7 +532,7 @@ async def friend_code(bot: Bot, event: Event, args: Message = CommandArg()):
|
|
|
532
532
|
force = False # 强制从接口获取
|
|
533
533
|
msg_id = get_msg_id(platform, user_id)
|
|
534
534
|
|
|
535
|
-
if
|
|
535
|
+
if re_tuple[0]:
|
|
536
536
|
force = True
|
|
537
537
|
msg = ""
|
|
538
538
|
if user and user.ns_friend_code and not force:
|
|
@@ -643,12 +643,12 @@ def get_cn_sp3_stat(_st):
|
|
|
643
643
|
return _st
|
|
644
644
|
|
|
645
645
|
|
|
646
|
-
@
|
|
647
|
-
async def report_notify(bot: Bot, event: Event,
|
|
648
|
-
if isinstance(bot, QQ_Bot):
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
cmd =
|
|
646
|
+
@on_regex(r"^[\/.,,。]?report_notify[ ]?(open|close)?[ ]?$", block=True).handle(parameterless=[Depends(_check_session_handler)])
|
|
647
|
+
async def report_notify(bot: Bot, event: Event, re_tuple: Tuple = RegexGroup()):
|
|
648
|
+
# if isinstance(bot, QQ_Bot):
|
|
649
|
+
# await bot_send(bot, event, "QQ平台暂不支持本功能")
|
|
650
|
+
# return
|
|
651
|
+
cmd = str(re_tuple[0] or "").strip()
|
|
652
652
|
platform = bot.adapter.get_name()
|
|
653
653
|
user_id = event.get_user_id()
|
|
654
654
|
msg = f'```\n'
|
|
@@ -663,12 +663,12 @@ async def report_notify(bot: Bot, event: Event, args: Message = CommandArg()):
|
|
|
663
663
|
await bot_send(bot, event, message=msg)
|
|
664
664
|
|
|
665
665
|
|
|
666
|
-
@
|
|
667
|
-
async def stat_notify(bot: Bot, event: Event,
|
|
668
|
-
if isinstance(bot, QQ_Bot):
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
cmd =
|
|
666
|
+
@on_regex(r"^[\/.,,。]?(?:stat_notify|api_notify)[ ]?(open|close)?[ ]?$", block=True).handle(parameterless=[Depends(_check_session_handler)])
|
|
667
|
+
async def stat_notify(bot: Bot, event: Event, re_tuple: Tuple = RegexGroup()):
|
|
668
|
+
# if isinstance(bot, QQ_Bot):
|
|
669
|
+
# await bot_send(bot, event, "QQ平台暂不支持本功能")
|
|
670
|
+
# return
|
|
671
|
+
cmd = str(re_tuple[0] or "").strip()
|
|
672
672
|
platform = bot.adapter.get_name()
|
|
673
673
|
user_id = event.get_user_id()
|
|
674
674
|
msg = f'```\n'
|
|
@@ -683,15 +683,15 @@ async def stat_notify(bot: Bot, event: Event, args: Message = CommandArg()):
|
|
|
683
683
|
await bot_send(bot, event, message=msg)
|
|
684
684
|
|
|
685
685
|
|
|
686
|
-
@
|
|
687
|
-
async def my_icon(bot: Bot, event: Event,
|
|
686
|
+
@on_regex(r"^[\/.,,。]?(?:my_icon|myicon)[ ]?(force)?[ ]?$", block=True).handle(parameterless=[Depends(_check_session_handler)])
|
|
687
|
+
async def my_icon(bot: Bot, event: Event, re_tuple: Tuple = RegexGroup()):
|
|
688
688
|
platform = bot.adapter.get_name()
|
|
689
689
|
user_id = event.get_user_id()
|
|
690
690
|
user = dict_get_or_set_user_info(platform, user_id)
|
|
691
691
|
force = False # 强制从接口获取
|
|
692
692
|
msg_id = get_msg_id(platform, user_id)
|
|
693
693
|
|
|
694
|
-
if
|
|
694
|
+
if re_tuple[0]:
|
|
695
695
|
force = True
|
|
696
696
|
msg = ""
|
|
697
697
|
msg_error = "本地未缓存nso头像,请在使用一次/last 命令进行缓存后重试"
|
|
@@ -751,8 +751,8 @@ async def re_enable(bot: Bot, event: Event):
|
|
|
751
751
|
model_get_or_set_user(u.platform, u.user_id, user_agreement=1)
|
|
752
752
|
|
|
753
753
|
|
|
754
|
-
@
|
|
755
|
-
async def seed_export(bot: Bot, event: Event, matcher: Matcher
|
|
754
|
+
@on_regex(r"^[\/.,,。]?(观星导出|觀星導出)[ ]?$", block=True).handle(parameterless=[Depends(_check_session_handler)])
|
|
755
|
+
async def seed_export(bot: Bot, event: Event, matcher: Matcher):
|
|
756
756
|
platform = bot.adapter.get_name()
|
|
757
757
|
user_id = event.get_user_id()
|
|
758
758
|
net_error_msg = "bot网络错误,请稍后再试"
|
|
@@ -891,9 +891,9 @@ def clean_ban_user_sp_id_list():
|
|
|
891
891
|
"""每日清空ban_sp_id连坐列表"""
|
|
892
892
|
BAN_USER_SP_ID_LIST.clear()
|
|
893
893
|
|
|
894
|
-
@
|
|
894
|
+
@on_regex(r"^[\/.,,。]?(nso_web|nso网页版|nso網頁版|nsoweb)[ ]?$", block=True).handle(
|
|
895
895
|
parameterless=[Depends(_check_session_handler)])
|
|
896
|
-
async def nso_web(bot: Bot, event: Event, matcher: Matcher
|
|
896
|
+
async def nso_web(bot: Bot, event: Event, matcher: Matcher):
|
|
897
897
|
platform = bot.adapter.get_name()
|
|
898
898
|
user_id = event.get_user_id()
|
|
899
899
|
net_error_msg = "bot网络错误,请稍后再试"
|
|
@@ -961,8 +961,8 @@ async def nso_web(bot: Bot, event: Event, matcher: Matcher, args: Message = Comm
|
|
|
961
961
|
await bot_send(bot, event, message=msg3, skip_ad=True)
|
|
962
962
|
|
|
963
963
|
|
|
964
|
-
@
|
|
965
|
-
async def more_nso_help(bot: Bot, event: Event
|
|
964
|
+
@on_regex(r"^[\/.,,。]?更多nso指令[ ]?$", block=True).handle()
|
|
965
|
+
async def more_nso_help(bot: Bot, event: Event):
|
|
966
966
|
"""发送更多nso帮助的二级md菜单"""
|
|
967
967
|
platform = bot.adapter.get_name()
|
|
968
968
|
user_id = event.get_user_id()
|
|
@@ -135,7 +135,7 @@ async def c2c_face_image_command(bot: Bot, event: QQ_C2CME, matcher: Matcher):
|
|
|
135
135
|
matcher.stop_propagation()
|
|
136
136
|
|
|
137
137
|
|
|
138
|
-
@
|
|
138
|
+
@on_regex(r"^[\/.,,。]?(help|h|帮助|说明|文档|幫助|說明|文檔)[ ]?$", priority=10).handle()
|
|
139
139
|
async def nso_help(bot: Bot, event: Event):
|
|
140
140
|
# 帮助菜单日程插件优先模式
|
|
141
141
|
if plugin_config.splatoon3_schedule_plugin_priority_mode:
|
|
@@ -170,9 +170,10 @@ async def bot_added_event(bot: QQ_Bot, event: Event, matcher: Matcher):
|
|
|
170
170
|
await bot_send(bot, event, msg)
|
|
171
171
|
|
|
172
172
|
|
|
173
|
-
@
|
|
174
|
-
async def full_message_help(bot: Bot, event: Event, matcher: Matcher,
|
|
173
|
+
@on_regex(r"^[\/.,,。]?(?:免艾特申请|免艾特申請)[ ]?(\d*)[ ]?$", priority=10, block=True).handle()
|
|
174
|
+
async def full_message_help(bot: Bot, event: Event, matcher: Matcher, re_tuple: Tuple = RegexGroup()):
|
|
175
175
|
"""全量消息申请菜单"""
|
|
176
|
+
plain_text = str(re_tuple[0] or "").strip()
|
|
176
177
|
platform = bot.adapter.get_name()
|
|
177
178
|
user_id = event.get_user_id()
|
|
178
179
|
msg_id = get_msg_id(platform, user_id)
|
|
@@ -192,7 +193,6 @@ async def full_message_help(bot: Bot, event: Event, matcher: Matcher, args: Mess
|
|
|
192
193
|
|
|
193
194
|
bot_qq = f_config.bot_qq
|
|
194
195
|
bot_uid = f_config.bot_uid
|
|
195
|
-
plain_text = args.extract_plain_text().strip()
|
|
196
196
|
if not plain_text or not plain_text.isdigit():
|
|
197
197
|
await matcher.finish("申请命令后面请加上qq群号,如/免艾特申请 1234567890")
|
|
198
198
|
qq_group_id = plain_text
|