nonebot-plugin-maimaidx 3.1.1__tar.gz → 3.1.2__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_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/PKG-INFO +1 -1
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/alias_sse_push.py +8 -10
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/utils/calc.py +6 -6
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx.egg-info/PKG-INFO +1 -1
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/pyproject.toml +1 -1
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/LICENSE +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/README.md +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/commands/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/commands/depend.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/commands/mai_alias.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/commands/mai_base.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/commands/mai_guess.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/commands/mai_score.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/commands/mai_search.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/commands/mai_table.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/commands/oauth_message.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/config.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/constants.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/divingfish/client.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/divingfish/exceptions.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/divingfish/models/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/divingfish/models/music.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/divingfish/models/oauth.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/divingfish/models/score.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/divingfish/oauth.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/exceptions.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/http.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/lxns/client.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/lxns/exceptions.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/lxns/models/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/lxns/models/base.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/lxns/models/collection.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/lxns/models/enum.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/lxns/models/music.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/lxns/models/oauth.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/lxns/models/player.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/lxns/models/score.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/yuzuchan/client.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/yuzuchan/exceptions.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/yuzuchan/models/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/yuzuchan/models/alias.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/yuzuchan/models/enum.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/yuzuchan/models/message.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/yuzuchan/models/sse.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/clients/yuzuchan/models/status.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/database/qq.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/divingfish_oauth.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/handler.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/handler_error.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/image/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/image/assets.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/image/base.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/image/best50.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/image/chart.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/image/info.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/image/plate_table.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/image/rating_table.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/image/score.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/image/song.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/image/tools.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/image/update_table.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/lxns_oauth.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/alias.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/alias_list.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/models/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/models/alias.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/models/best50.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/models/enum.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/models/guess.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/models/player.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/models/score.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/models/song.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/music_list.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/play_result.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/merge/player.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/pending_binding.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/service/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/service/diving_fish.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/service/lxns.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/service/yuzuchan.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/tool.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/maimaidxhelp.png +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/resources.py +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx.egg-info/SOURCES.txt +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx.egg-info/dependency_links.txt +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx.egg-info/requires.txt +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx.egg-info/top_level.txt +0 -0
- {nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/setup.cfg +0 -0
|
@@ -76,16 +76,16 @@ async def push_alias(push: PushAliasStatus):
|
|
|
76
76
|
return
|
|
77
77
|
group_list = await bot.get_group_list()
|
|
78
78
|
group_ids: set[int] = set({g["group_id"] for g in group_list})
|
|
79
|
-
message = [
|
|
80
|
-
|
|
79
|
+
message = [
|
|
80
|
+
MessageSegment.text(
|
|
81
|
+
"检测到新的别名申请,可使用同意别名指令进行投票,点击下方链接查看详情:"
|
|
82
|
+
f"「{VOTE_URL}」\n如果不需要接收推送消息,请使用「关闭别名推送」指令关闭推送"
|
|
83
|
+
)
|
|
84
|
+
]
|
|
85
|
+
for item in push.status:
|
|
81
86
|
song_id = item.song_id
|
|
82
87
|
alias_name = item.apply_alias
|
|
83
88
|
song = mai.total_list.by_id(song_id)
|
|
84
|
-
if num == 0 and push.type == "Apply":
|
|
85
|
-
message.append(
|
|
86
|
-
"检测到新的别名申请,可使用同意别名指令进行投票,点击下方链接查看详情:"
|
|
87
|
-
f"「{VOTE_URL}」\n如果不需要接收推送消息,请使用「关闭别名推送」指令关闭推送"
|
|
88
|
-
)
|
|
89
89
|
if push.type == "Apply":
|
|
90
90
|
message.append(
|
|
91
91
|
dedent(f"""\
|
|
@@ -96,8 +96,6 @@ async def push_alias(push: PushAliasStatus):
|
|
|
96
96
|
""").strip()
|
|
97
97
|
+ await draw_chart_info(song)
|
|
98
98
|
)
|
|
99
|
-
if not message:
|
|
100
|
-
return
|
|
101
99
|
forward = [MessageSegment.node_custom(bot.self_id, "Bot", msg) for msg in message]
|
|
102
100
|
for gid in group_ids:
|
|
103
101
|
if gid in alias.push.disable:
|
|
@@ -106,7 +104,7 @@ async def push_alias(push: PushAliasStatus):
|
|
|
106
104
|
await bot.send_group_forward_msg(group_id=gid, message=forward)
|
|
107
105
|
await asyncio.sleep(5)
|
|
108
106
|
except Exception:
|
|
109
|
-
|
|
107
|
+
log.exception(f"群:「{gid}」推送消息失败")
|
|
110
108
|
|
|
111
109
|
|
|
112
110
|
async def sse_alias_server():
|
|
@@ -25,7 +25,7 @@ def calc_ds(rating: float, achievements: float) -> float:
|
|
|
25
25
|
return round(rating / (a * get_base_ra(achievements)), 1)
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
def dx_score(dx:
|
|
28
|
+
def dx_score(dx: float) -> int:
|
|
29
29
|
"""
|
|
30
30
|
获取DX评分星星数量
|
|
31
31
|
|
|
@@ -34,15 +34,15 @@ def dx_score(dx: int) -> int:
|
|
|
34
34
|
Returns:
|
|
35
35
|
`int` 返回星星数量
|
|
36
36
|
"""
|
|
37
|
-
if dx
|
|
37
|
+
if dx < 85:
|
|
38
38
|
result = 0
|
|
39
|
-
elif dx
|
|
39
|
+
elif dx < 90:
|
|
40
40
|
result = 1
|
|
41
|
-
elif dx
|
|
41
|
+
elif dx < 93:
|
|
42
42
|
result = 2
|
|
43
|
-
elif dx
|
|
43
|
+
elif dx < 95:
|
|
44
44
|
result = 3
|
|
45
|
-
elif dx
|
|
45
|
+
elif dx < 97:
|
|
46
46
|
result = 4
|
|
47
47
|
else:
|
|
48
48
|
result = 5
|
|
File without changes
|
|
File without changes
|
{nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/config.py
RENAMED
|
File without changes
|
{nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/constants.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/core/tool.py
RENAMED
|
File without changes
|
|
File without changes
|
{nonebot_plugin_maimaidx-3.1.1 → nonebot_plugin_maimaidx-3.1.2}/nonebot_plugin_maimaidx/resources.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|