nonebot-plugin-maimaidx 3.0.8__tar.gz → 3.0.9__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.0.8 → nonebot_plugin_maimaidx-3.0.9}/PKG-INFO +1 -1
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/commands/mai_search.py +13 -13
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/commands/mai_table.py +7 -2
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx.egg-info/PKG-INFO +1 -1
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/pyproject.toml +1 -1
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/LICENSE +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/README.md +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/commands/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/commands/depend.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/commands/mai_alias.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/commands/mai_base.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/commands/mai_guess.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/commands/mai_score.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/config.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/constants.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/alias_ws_push.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/divingfish/client.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/divingfish/exceptions.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/divingfish/models/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/divingfish/models/music.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/divingfish/models/score.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/exceptions.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/http.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/lxns/client.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/lxns/exceptions.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/lxns/models/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/lxns/models/base.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/lxns/models/collection.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/lxns/models/enum.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/lxns/models/music.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/lxns/models/oauth.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/lxns/models/player.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/lxns/models/score.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/yuzuchan/client.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/yuzuchan/exceptions.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/yuzuchan/models/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/yuzuchan/models/alias.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/yuzuchan/models/enum.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/yuzuchan/models/message.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/clients/yuzuchan/models/status.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/database/qq.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/handler.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/handler_error.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/image/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/image/assets.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/image/base.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/image/best50.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/image/chart.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/image/info.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/image/plate_table.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/image/rating_table.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/image/score.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/image/song.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/image/tools.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/image/update_table.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/alias.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/alias_list.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/models/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/models/alias.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/models/best50.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/models/enum.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/models/guess.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/models/player.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/models/score.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/models/song.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/music_list.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/play_result.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/merge/player.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/service/__init__.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/service/diving_fish.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/service/lxns.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/service/yuzuchan.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/tool.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/utils/calc.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/maimaidxhelp.png +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/resources.py +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx.egg-info/SOURCES.txt +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx.egg-info/dependency_links.txt +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx.egg-info/requires.txt +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx.egg-info/top_level.txt +0 -0
- {nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/setup.cfg +0 -0
|
@@ -3,11 +3,10 @@ from re import Match
|
|
|
3
3
|
|
|
4
4
|
from nonebot import on_regex
|
|
5
5
|
from nonebot.adapters.onebot.v11 import MessageSegment
|
|
6
|
-
from nonebot.exception import FinishedException
|
|
7
6
|
from nonebot.params import Depends, RegexMatched
|
|
8
7
|
|
|
9
8
|
from ..core.clients.yuzuchan.client import YuzuChaNAPI
|
|
10
|
-
from ..core.clients.yuzuchan.models import StatusEnum
|
|
9
|
+
from ..core.clients.yuzuchan.models import AliasStatus, Songs, StatusEnum
|
|
11
10
|
from ..core.database.qq import User
|
|
12
11
|
from ..core.handler import draw_chart_info, draw_song_list
|
|
13
12
|
from ..core.merge.alias import yuzu_alias_to_alias
|
|
@@ -59,19 +58,20 @@ async def _(
|
|
|
59
58
|
# 别名
|
|
60
59
|
alias_data = mai.total_alias_list.by_alias(name)
|
|
61
60
|
if not alias_data:
|
|
61
|
+
api = YuzuChaNAPI()
|
|
62
62
|
try:
|
|
63
|
-
api = YuzuChaNAPI()
|
|
64
63
|
obj = await api.get_songs(name)
|
|
65
|
-
if obj
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
if isinstance(obj, Songs):
|
|
65
|
+
if obj.type == StatusEnum.ONGOING and isinstance(
|
|
66
|
+
obj.data[0], AliasStatus
|
|
67
|
+
):
|
|
68
|
+
msg = f"未找到别名为「{name}」的歌曲,但找到与此相同别名的投票:\n"
|
|
69
|
+
for _s in obj.data:
|
|
70
|
+
msg += f"- {_s.tag}\n ID {_s.song_id}: {_s.name}\n"
|
|
71
|
+
msg += "※ 可以使用指令「同意别名 XXXXX」进行投票"
|
|
72
|
+
await search_alias_song.finish(msg.strip(), reply_message=True)
|
|
73
|
+
else:
|
|
74
|
+
alias_data = yuzu_alias_to_alias(obj.data)
|
|
75
75
|
except Exception:
|
|
76
76
|
pass
|
|
77
77
|
|
|
@@ -21,7 +21,7 @@ from ..core.handler import (
|
|
|
21
21
|
from ..core.image.tools import image_to_base64
|
|
22
22
|
from ..core.image.update_table import UpdateTable
|
|
23
23
|
from ..core.merge.models import Category
|
|
24
|
-
from ..resources import pic_dir
|
|
24
|
+
from ..resources import pic_dir, rating_table_dir
|
|
25
25
|
from .depend import GetUserAndAuth
|
|
26
26
|
|
|
27
27
|
RATING_PATTERN = r"^([0-9]+\+?)((s+|ap|fc|fs|fdx)\+?)?\s?完成表$"
|
|
@@ -74,7 +74,12 @@ async def _(match: Match[str] = RegexMatched()):
|
|
|
74
74
|
if rating in LEVEL_LIST[:6]:
|
|
75
75
|
result = "只支持查询lv7-15的定数表。"
|
|
76
76
|
elif rating in LEVEL_LIST[6:]:
|
|
77
|
-
|
|
77
|
+
if rating == "15":
|
|
78
|
+
result = MessageSegment.image(
|
|
79
|
+
image_to_base64(Image.open(rating_table_dir / "15.png"))
|
|
80
|
+
)
|
|
81
|
+
else:
|
|
82
|
+
result = draw_rating_table_text(rating)
|
|
78
83
|
else:
|
|
79
84
|
result = "无法识别的定数。"
|
|
80
85
|
await rating_table.send(result, reply_message=True)
|
|
File without changes
|
|
File without changes
|
{nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/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
|
{nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/config.py
RENAMED
|
File without changes
|
{nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/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
|
{nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/core/tool.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nonebot_plugin_maimaidx-3.0.8 → nonebot_plugin_maimaidx-3.0.9}/nonebot_plugin_maimaidx/resources.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|