nonebot-plugin-osubot 6.23.1__py3-none-any.whl → 6.24.0__py3-none-any.whl
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.
Potentially problematic release.
This version of nonebot-plugin-osubot might be problematic. Click here for more details.
- nonebot_plugin_osubot/api.py +7 -5
- nonebot_plugin_osubot/draw/bmap.py +19 -21
- nonebot_plugin_osubot/draw/bp.py +1 -1
- nonebot_plugin_osubot/draw/echarts.py +8 -2
- nonebot_plugin_osubot/draw/info.py +2 -0
- nonebot_plugin_osubot/draw/map.py +5 -2
- nonebot_plugin_osubot/draw/score.py +4 -4
- nonebot_plugin_osubot/file.py +1 -12
- nonebot_plugin_osubot/mania/__init__.py +9 -10
- nonebot_plugin_osubot/matcher/bp_analyze.py +9 -9
- nonebot_plugin_osubot/matcher/guess.py +3 -3
- nonebot_plugin_osubot/matcher/map_convert.py +12 -7
- nonebot_plugin_osubot/matcher/preview.py +3 -3
- nonebot_plugin_osubot/matcher/recommend.py +7 -12
- nonebot_plugin_osubot/osufile/mods/AP.png +0 -0
- nonebot_plugin_osubot/osufile/mods/CL.png +0 -0
- nonebot_plugin_osubot/osufile/mods/DT.png +0 -0
- nonebot_plugin_osubot/osufile/mods/EZ.png +0 -0
- nonebot_plugin_osubot/osufile/mods/FI.png +0 -0
- nonebot_plugin_osubot/osufile/mods/FL.png +0 -0
- nonebot_plugin_osubot/osufile/mods/HD.png +0 -0
- nonebot_plugin_osubot/osufile/mods/HR.png +0 -0
- nonebot_plugin_osubot/osufile/mods/HT.png +0 -0
- nonebot_plugin_osubot/osufile/mods/MR.png +0 -0
- nonebot_plugin_osubot/osufile/mods/NC.png +0 -0
- nonebot_plugin_osubot/osufile/mods/NF.png +0 -0
- nonebot_plugin_osubot/osufile/mods/PF.png +0 -0
- nonebot_plugin_osubot/osufile/mods/RX.png +0 -0
- nonebot_plugin_osubot/osufile/mods/SD.png +0 -0
- nonebot_plugin_osubot/osufile/mods/SO.png +0 -0
- nonebot_plugin_osubot/osufile/mods/TD.png +0 -0
- nonebot_plugin_osubot/osufile/mods/V2.png +0 -0
- nonebot_plugin_osubot/schema/__init__.py +0 -2
- nonebot_plugin_osubot/schema/beatmapsets.py +42 -0
- nonebot_plugin_osubot/schema/score.py +1 -0
- {nonebot_plugin_osubot-6.23.1.dist-info → nonebot_plugin_osubot-6.24.0.dist-info}/METADATA +1 -1
- {nonebot_plugin_osubot-6.23.1.dist-info → nonebot_plugin_osubot-6.24.0.dist-info}/RECORD +38 -38
- nonebot_plugin_osubot/schema/sayo_beatmap.py +0 -59
- {nonebot_plugin_osubot-6.23.1.dist-info → nonebot_plugin_osubot-6.24.0.dist-info}/WHEEL +0 -0
nonebot_plugin_osubot/api.py
CHANGED
|
@@ -11,19 +11,19 @@ from nonebot import get_plugin_config
|
|
|
11
11
|
from httpx import Response
|
|
12
12
|
|
|
13
13
|
from .network.manager import network_manager
|
|
14
|
+
from .schema.beatmapsets import BeatmapSets
|
|
14
15
|
from .utils import FGM
|
|
15
16
|
from .config import Config
|
|
16
17
|
from .mods import get_mods
|
|
17
18
|
from .network import auto_retry
|
|
18
19
|
from .exceptions import NetworkError
|
|
19
20
|
from .network.first_response import get_first_response
|
|
20
|
-
from .schema import User, NewScore,
|
|
21
|
+
from .schema import User, NewScore, RecommendData
|
|
21
22
|
from .schema.score import UnifiedScore, NewStatistics, UnifiedBeatmap
|
|
22
23
|
from .schema.ppysb import InfoResponse, ScoresResponse, V2ScoresResponse
|
|
23
24
|
from .schema.user import Level, GradeCounts, UnifiedUser, UserStatistics
|
|
24
25
|
|
|
25
26
|
api = "https://osu.ppy.sh/api/v2"
|
|
26
|
-
sayoapi = "https://api.sayobot.cn"
|
|
27
27
|
cache = ExpiringDict(max_len=1, max_age_seconds=86400)
|
|
28
28
|
plugin_config = get_plugin_config(Config)
|
|
29
29
|
|
|
@@ -122,6 +122,7 @@ async def fetch_score_batch(
|
|
|
122
122
|
hp=i.beatmap.drain,
|
|
123
123
|
od=i.beatmap.accuracy,
|
|
124
124
|
stars=i.beatmap.difficulty_rating,
|
|
125
|
+
convert=i.beatmap.convert,
|
|
125
126
|
),
|
|
126
127
|
beatmapset=i.beatmapset,
|
|
127
128
|
)
|
|
@@ -413,9 +414,10 @@ async def get_random_bg() -> Optional[bytes]:
|
|
|
413
414
|
return res.content
|
|
414
415
|
|
|
415
416
|
|
|
416
|
-
async def
|
|
417
|
-
|
|
418
|
-
|
|
417
|
+
async def get_beatmapsets_info(sid) -> BeatmapSets:
|
|
418
|
+
url = f"https://osu.ppy.sh/api/v2/beatmapsets/{sid}"
|
|
419
|
+
res = await make_request(url, await get_headers(), "未查询到该谱面集(Setid)信息")
|
|
420
|
+
return BeatmapSets(**res)
|
|
419
421
|
|
|
420
422
|
|
|
421
423
|
async def get_map_bg(mapid, sid, bg_name) -> BytesIO:
|
|
@@ -4,25 +4,20 @@ from datetime import datetime, timedelta
|
|
|
4
4
|
from PIL import ImageDraw, ImageFilter, ImageEnhance
|
|
5
5
|
|
|
6
6
|
from ..file import get_projectimg
|
|
7
|
-
from ..api import
|
|
8
|
-
from ..exceptions import NetworkError
|
|
7
|
+
from ..api import get_beatmapsets_info
|
|
9
8
|
from .utils import crop_bg, stars_diff, calc_songlen
|
|
10
9
|
from .static import Image, BarImg, IconLs, Torus_SemiBold_20, Torus_SemiBold_40, Torus_SemiBold_50, extra_30, Stars
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
async def draw_bmap_info(mapid) -> BytesIO:
|
|
14
|
-
|
|
15
|
-
if sayo_info.status == -1:
|
|
16
|
-
raise NetworkError("在sayobot未查询到该地图")
|
|
17
|
-
data = sayo_info.data
|
|
18
|
-
|
|
13
|
+
data = await get_beatmapsets_info(mapid)
|
|
19
14
|
coverurl = f"https://assets.ppy.sh/beatmaps/{mapid}/covers/cover@2x.jpg"
|
|
20
15
|
cover = await get_projectimg(coverurl)
|
|
21
16
|
# 新建
|
|
22
|
-
if len(data.
|
|
17
|
+
if len(data.beatmaps) > 20:
|
|
23
18
|
im_h = 400 + 102 * 20
|
|
24
19
|
else:
|
|
25
|
-
im_h = 400 + 102 * (len(data.
|
|
20
|
+
im_h = 400 + 102 * (len(data.beatmaps) - 1)
|
|
26
21
|
im = Image.new("RGBA", (1200, im_h), (31, 41, 46, 255))
|
|
27
22
|
draw = ImageDraw.Draw(im)
|
|
28
23
|
# 背景
|
|
@@ -37,35 +32,36 @@ async def draw_bmap_info(mapid) -> BytesIO:
|
|
|
37
32
|
# mapper
|
|
38
33
|
draw.text((25, 105), f"谱面作者: {data.creator}", font=Torus_SemiBold_20, anchor="lt")
|
|
39
34
|
# rank时间
|
|
40
|
-
if data.
|
|
35
|
+
if not data.ranked_date:
|
|
41
36
|
approved_date = "谱面状态可能非ranked"
|
|
42
37
|
else:
|
|
43
|
-
datearray = datetime.
|
|
38
|
+
datearray = datetime.fromisoformat(data.ranked_date.replace("Z", ""))
|
|
44
39
|
approved_date = (datearray + timedelta(hours=8)).strftime("%Y-%m-%d %H:%M:%S")
|
|
45
40
|
draw.text((25, 140), f"上架时间: {approved_date}", font=Torus_SemiBold_20, anchor="lt")
|
|
46
41
|
# 来源
|
|
47
|
-
|
|
42
|
+
if data.source:
|
|
43
|
+
draw.text((25, 175), f"Source: {data.source}", font=Torus_SemiBold_20, anchor="lt")
|
|
48
44
|
# bpm
|
|
49
45
|
draw.text((1150, 105), f"BPM: {data.bpm}", font=Torus_SemiBold_20, anchor="rt")
|
|
50
46
|
# 曲长
|
|
51
|
-
music_len = calc_songlen(data.
|
|
47
|
+
music_len = calc_songlen(data.beatmaps[0].total_length)
|
|
52
48
|
draw.text((1150, 140), f"length: {music_len}", font=Torus_SemiBold_20, anchor="rt")
|
|
53
49
|
# Setid
|
|
54
50
|
draw.text((1150, 35), f"Setid: {mapid}", font=Torus_SemiBold_20, anchor="rt")
|
|
55
|
-
gmap = sorted(data.
|
|
51
|
+
gmap = sorted(data.beatmaps, key=lambda k: k.difficulty_rating, reverse=False)
|
|
56
52
|
for num, cmap in enumerate(gmap):
|
|
57
53
|
if num < 20:
|
|
58
54
|
h_num = 102 * num
|
|
59
55
|
# 难度
|
|
60
|
-
draw.text((20, 320 + h_num), IconLs[cmap.
|
|
56
|
+
draw.text((20, 320 + h_num), IconLs[cmap.mode_int], font=extra_30, anchor="lt")
|
|
61
57
|
# 星星
|
|
62
|
-
stars_bg = stars_diff(cmap.
|
|
58
|
+
stars_bg = stars_diff(cmap.difficulty_rating, Stars)
|
|
63
59
|
stars_img = stars_bg.resize((80, 30))
|
|
64
60
|
im.alpha_composite(stars_img, (60, 320 + h_num))
|
|
65
61
|
# diff
|
|
66
62
|
im.alpha_composite(BarImg, (10, 365 + h_num))
|
|
67
63
|
gc = ["CS", "HP", "OD", "AR"]
|
|
68
|
-
for index, i in enumerate((cmap.
|
|
64
|
+
for index, i in enumerate((cmap.cs, cmap.drain, cmap.accuracy, cmap.ar)):
|
|
69
65
|
diff_len = int(200 * i / 10) if i <= 10 else 200
|
|
70
66
|
diff_bg = Image.new("RGBA", (diff_len, 12), (255, 255, 255, 255))
|
|
71
67
|
im.alpha_composite(diff_bg, (50 + 300 * index, 365 + h_num))
|
|
@@ -90,11 +86,13 @@ async def draw_bmap_info(mapid) -> BytesIO:
|
|
|
90
86
|
anchor="lm",
|
|
91
87
|
)
|
|
92
88
|
# 难度
|
|
93
|
-
if cmap.
|
|
89
|
+
if cmap.difficulty_rating < 6.5:
|
|
94
90
|
color = (0, 0, 0, 255)
|
|
95
91
|
else:
|
|
96
92
|
color = (255, 217, 102, 255)
|
|
97
|
-
draw.text(
|
|
93
|
+
draw.text(
|
|
94
|
+
(65, 335 + h_num), f"★{cmap.difficulty_rating:.2f}", font=Torus_SemiBold_20, anchor="lm", fill=color
|
|
95
|
+
)
|
|
98
96
|
# version
|
|
99
97
|
draw.text(
|
|
100
98
|
(150, 335 + h_num),
|
|
@@ -105,14 +103,14 @@ async def draw_bmap_info(mapid) -> BytesIO:
|
|
|
105
103
|
# mapid
|
|
106
104
|
draw.text(
|
|
107
105
|
(1150, 328 + h_num),
|
|
108
|
-
f"Mapid: {cmap.
|
|
106
|
+
f"Mapid: {cmap.id}",
|
|
109
107
|
font=Torus_SemiBold_20,
|
|
110
108
|
anchor="rm",
|
|
111
109
|
)
|
|
112
110
|
# maxcb
|
|
113
111
|
draw.text(
|
|
114
112
|
(700, 328 + h_num),
|
|
115
|
-
f"Max Combo: {cmap.
|
|
113
|
+
f"Max Combo: {cmap.max_combo or 0}",
|
|
116
114
|
font=Torus_SemiBold_20,
|
|
117
115
|
anchor="lm",
|
|
118
116
|
)
|
nonebot_plugin_osubot/draw/bp.py
CHANGED
|
@@ -48,7 +48,7 @@ async def draw_bp(
|
|
|
48
48
|
# 判断是否开启lazer模式
|
|
49
49
|
if is_lazer:
|
|
50
50
|
score_info.legacy_total_score = score_info.total_score
|
|
51
|
-
if score_info.ruleset_id == 3 and not is_lazer:
|
|
51
|
+
if score_info.ruleset_id == 3 and not is_lazer and source != "ppysb":
|
|
52
52
|
score_info.accuracy = cal_legacy_acc(score_info.statistics)
|
|
53
53
|
if not is_lazer:
|
|
54
54
|
is_hidden = any(i in score_info.mods for i in (Mod(acronym="HD"), Mod(acronym="FL"), Mod(acronym="FI")))
|
|
@@ -20,8 +20,14 @@ async def draw_bpa_plot(name, pp_ls, length_ls, mod_pp_ls, mapper_pp_ls) -> byte
|
|
|
20
20
|
pic = await template_to_pic(
|
|
21
21
|
template_path,
|
|
22
22
|
template_name,
|
|
23
|
-
{
|
|
24
|
-
|
|
23
|
+
{
|
|
24
|
+
"name": name,
|
|
25
|
+
"pp_ls": pp_ls,
|
|
26
|
+
"length_ls": length_ls,
|
|
27
|
+
"mod_pp_ls": mod_pp_ls,
|
|
28
|
+
"mapper_pp_ls": mapper_pp_ls,
|
|
29
|
+
"length": len(pp_ls),
|
|
30
|
+
},
|
|
25
31
|
)
|
|
26
32
|
return pic
|
|
27
33
|
|
|
@@ -221,7 +221,9 @@ async def draw_info(uid: Union[int, str], mode: str, day: int, source: str) -> B
|
|
|
221
221
|
# 总命中
|
|
222
222
|
op, value = info_calc(statistics.total_hits, n_count)
|
|
223
223
|
t_count = f"{statistics.total_hits:,}({op}{value:,})" if value != 0 else f"{statistics.total_hits:,}"
|
|
224
|
+
avg_hit = 0 if statistics.play_count == 0 else statistics.total_hits // statistics.play_count
|
|
224
225
|
draw.text((935, 1175), t_count, font=Torus_Regular_40, anchor="rt")
|
|
226
|
+
draw.text((250, 945), f"(avg.{avg_hit:,})", font=Torus_Regular_25, anchor="lt")
|
|
225
227
|
# 游玩时间
|
|
226
228
|
sec = timedelta(seconds=statistics.play_time)
|
|
227
229
|
d_time = datetime(1, 1, 1) + sec
|
|
@@ -156,8 +156,11 @@ async def draw_map_info(mapid: int, mods: list[str], is_lazer) -> BytesIO:
|
|
|
156
156
|
if mods:
|
|
157
157
|
for mods_num, s_mods in enumerate(mods):
|
|
158
158
|
mods_bg = osufile / "mods" / f"{s_mods.acronym}.png"
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
try:
|
|
160
|
+
mods_img = Image.open(mods_bg).convert("RGBA")
|
|
161
|
+
im.alpha_composite(mods_img, (700 + 50 * mods_num, 295))
|
|
162
|
+
except FileNotFoundError:
|
|
163
|
+
pass
|
|
161
164
|
# mapper
|
|
162
165
|
icon_url = f"https://a.ppy.sh/{mapinfo.user_id}"
|
|
163
166
|
user_icon = await get_projectimg(icon_url)
|
|
@@ -107,7 +107,7 @@ async def draw_score(
|
|
|
107
107
|
map_json = await task2
|
|
108
108
|
# 判断是否开启lazer模式
|
|
109
109
|
if source == "osu":
|
|
110
|
-
score = cal_score_info(is_lazer, score)
|
|
110
|
+
score = cal_score_info(is_lazer, score, source)
|
|
111
111
|
return await draw_score_pic(score, info, map_json, "", is_lazer, source)
|
|
112
112
|
|
|
113
113
|
|
|
@@ -180,7 +180,7 @@ async def get_score_data(
|
|
|
180
180
|
user_path.mkdir(parents=True, exist_ok=True)
|
|
181
181
|
# 判断是否开启lazer模式
|
|
182
182
|
if source == "osu":
|
|
183
|
-
score = cal_score_info(is_lazer, score)
|
|
183
|
+
score = cal_score_info(is_lazer, score, source)
|
|
184
184
|
return await draw_score_pic(score, info, map_json, grank, is_lazer, source)
|
|
185
185
|
|
|
186
186
|
|
|
@@ -795,10 +795,10 @@ def cal_legacy_rank(score_info: UnifiedScore, is_hidden: bool):
|
|
|
795
795
|
return "N/A"
|
|
796
796
|
|
|
797
797
|
|
|
798
|
-
def cal_score_info(is_lazer: bool, score_info: UnifiedScore) -> UnifiedScore:
|
|
798
|
+
def cal_score_info(is_lazer: bool, score_info: UnifiedScore, source: str = "osu") -> UnifiedScore:
|
|
799
799
|
if is_lazer:
|
|
800
800
|
score_info.legacy_total_score = score_info.total_score
|
|
801
|
-
if score_info.ruleset_id == 3 and not is_lazer:
|
|
801
|
+
if score_info.ruleset_id == 3 and not is_lazer and source != "ppysb":
|
|
802
802
|
score_info.accuracy = cal_legacy_acc(score_info.statistics)
|
|
803
803
|
if not is_lazer:
|
|
804
804
|
is_hidden = any(i in score_info.mods for i in (Mod(acronym="HD"), Mod(acronym="FL"), Mod(acronym="FI")))
|
nonebot_plugin_osubot/file.py
CHANGED
|
@@ -47,18 +47,6 @@ async def download_map(setid: int) -> Optional[Path]:
|
|
|
47
47
|
return filepath
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
async def download_tmp_osu(map_id):
|
|
51
|
-
url = f"https://osu.ppy.sh/osu/{map_id}"
|
|
52
|
-
logger.info(f"开始下载谱面: <{map_id}>")
|
|
53
|
-
req = await safe_async_get(url)
|
|
54
|
-
filename = f"{map_id}.osu"
|
|
55
|
-
filepath = map_path / filename
|
|
56
|
-
chunk = req.read()
|
|
57
|
-
with open(filepath, "wb") as f:
|
|
58
|
-
f.write(chunk)
|
|
59
|
-
return filepath
|
|
60
|
-
|
|
61
|
-
|
|
62
50
|
@auto_retry
|
|
63
51
|
async def download_osu(set_id, map_id):
|
|
64
52
|
url = [
|
|
@@ -71,6 +59,7 @@ async def download_osu(set_id, map_id):
|
|
|
71
59
|
if req := await get_first_response(url):
|
|
72
60
|
filename = f"{map_id}.osu"
|
|
73
61
|
filepath = map_path / str(set_id) / filename
|
|
62
|
+
filepath.parent.mkdir(parents=True, exist_ok=True)
|
|
74
63
|
with open(filepath, "wb") as f:
|
|
75
64
|
f.write(req)
|
|
76
65
|
return filepath
|
|
@@ -25,7 +25,7 @@ from reamber.algorithms.playField.parts import (
|
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
from ..file import download_map
|
|
28
|
-
from ..schema import
|
|
28
|
+
from ..schema.beatmapsets import BeatmapSets
|
|
29
29
|
|
|
30
30
|
osu_path = Path() / "data" / "osu"
|
|
31
31
|
if not osu_path.exists():
|
|
@@ -39,7 +39,7 @@ class Options:
|
|
|
39
39
|
od: Optional[float]
|
|
40
40
|
set: Optional[int]
|
|
41
41
|
map: Optional[int] = None
|
|
42
|
-
|
|
42
|
+
beatmapsets: Optional[BeatmapSets] = None
|
|
43
43
|
nsv: bool = False
|
|
44
44
|
nln: bool = False
|
|
45
45
|
fln: bool = False
|
|
@@ -89,15 +89,14 @@ async def convert_mania_map(options: Options) -> Optional[Path]:
|
|
|
89
89
|
with ZipFile(osz_file.absolute()) as my_zip:
|
|
90
90
|
my_zip.extractall(path)
|
|
91
91
|
os.remove(osz_file)
|
|
92
|
-
if options.
|
|
93
|
-
for
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
if options.beatmapsets:
|
|
93
|
+
for file in path.rglob("*.osu"):
|
|
94
|
+
osu = OsuMap.read_file(str(file.absolute()))
|
|
95
|
+
if osu.beatmap_id == options.map:
|
|
96
|
+
audio_file_name = osu.audio_file_name
|
|
97
|
+
audio_name = osu.audio_file_name[:-4]
|
|
98
|
+
audio_type = osu.audio_file_name[-4:]
|
|
98
99
|
break
|
|
99
|
-
else:
|
|
100
|
-
raise Exception("小夜api有问题啊")
|
|
101
100
|
if options.rate:
|
|
102
101
|
if options.rate > 10:
|
|
103
102
|
options.rate = 10
|
|
@@ -42,7 +42,6 @@ async def _(event: Event, state: T_State):
|
|
|
42
42
|
f"在查找用户:{state['username']} {NGM[state['mode']]}模式 {lazer_mode}时 {str(e)}"
|
|
43
43
|
).finish(reply_to=True)
|
|
44
44
|
for score in score_ls:
|
|
45
|
-
# Filter mods outside of the iteration
|
|
46
45
|
if not state["is_lazer"] or state["source"] == "ppysb":
|
|
47
46
|
score.mods = [mod for mod in score.mods if mod.acronym != "CL"]
|
|
48
47
|
for mod in score.mods:
|
|
@@ -94,14 +93,15 @@ async def _(event: Event, state: T_State):
|
|
|
94
93
|
pp_data.append({"name": mod, "value": round(pp, 2)})
|
|
95
94
|
mapper_pp = defaultdict(int)
|
|
96
95
|
for num, i in enumerate(score_ls):
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
mapper_pp = mapper_pp[:9]
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
96
|
+
key = i.beatmap.creator if state["source"] == "ppysb" else i.beatmap.user_id
|
|
97
|
+
mapper_pp[key] += i.pp * 0.95**num
|
|
98
|
+
mapper_pp = sorted(mapper_pp.items(), key=lambda x: x[1], reverse=True)[:9]
|
|
99
|
+
if state["source"] == "ppysb":
|
|
100
|
+
mapper_pp_data = [{"name": mapper, "value": round(pp, 2)} for mapper, pp in mapper_pp]
|
|
101
|
+
else:
|
|
102
|
+
users = await get_users([i[0] for i in mapper_pp])
|
|
103
|
+
user_dic = {i.id: i.username for i in users}
|
|
104
|
+
mapper_pp_data = [{"name": user_dic.get(mapper, ""), "value": round(pp, 2)} for mapper, pp in mapper_pp]
|
|
105
105
|
if len(mapper_pp_data) > 20:
|
|
106
106
|
mapper_pp_data = mapper_pp_data[:20]
|
|
107
107
|
name = f"{state['username']} {NGM[state['mode']]} 模式 "
|
|
@@ -26,7 +26,7 @@ from ..exceptions import NetworkError
|
|
|
26
26
|
from ..database.models import UserData
|
|
27
27
|
from ..mania import generate_preview_pic
|
|
28
28
|
from ..api import safe_async_get, get_user_scores
|
|
29
|
-
from ..file import map_path,
|
|
29
|
+
from ..file import map_path, download_osu
|
|
30
30
|
from ..draw.catch_preview import draw_cath_preview
|
|
31
31
|
|
|
32
32
|
games: dict[str, NewScore] = {}
|
|
@@ -470,10 +470,10 @@ async def _(
|
|
|
470
470
|
chart_games[session_id] = selected_score
|
|
471
471
|
chart_set_timeout(matcher, session_id)
|
|
472
472
|
if mode == "3":
|
|
473
|
-
osu = await
|
|
473
|
+
osu = await download_osu(selected_score.beatmapset.id, selected_score.beatmap.id)
|
|
474
474
|
pic = await generate_preview_pic(osu)
|
|
475
475
|
elif mode == "1":
|
|
476
|
-
osu = await
|
|
476
|
+
osu = await download_osu(selected_score.beatmapset.id, selected_score.beatmap.id)
|
|
477
477
|
beatmap = parse_map(osu)
|
|
478
478
|
pic = map_to_image(beatmap)
|
|
479
479
|
else:
|
|
@@ -7,8 +7,9 @@ from nonebot import on_command, on_shell_command
|
|
|
7
7
|
from nonebot.exception import ParserExit, ActionFailed
|
|
8
8
|
from nonebot.params import CommandArg, ShellCommandArgv
|
|
9
9
|
|
|
10
|
-
from ..api import
|
|
10
|
+
from ..api import get_beatmapsets_info, osu_api
|
|
11
11
|
from ..mania import Options, convert_mania_map
|
|
12
|
+
from ..schema import Beatmap
|
|
12
13
|
|
|
13
14
|
parser = ArgumentParser("convert", description="变换mania谱面")
|
|
14
15
|
parser.add_argument("--set", type=int, help="要转换的谱面的setid")
|
|
@@ -37,9 +38,11 @@ async def _(argv: list[str] = ShellCommandArgv()):
|
|
|
37
38
|
return
|
|
38
39
|
options = Options(**vars(args))
|
|
39
40
|
if options.map:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
map_data = await osu_api("map", options.map)
|
|
42
|
+
mapinfo = Beatmap(**map_data)
|
|
43
|
+
beatmapsets_info = await get_beatmapsets_info(mapinfo.beatmapset_id)
|
|
44
|
+
options.set = mapinfo.beatmapset_id
|
|
45
|
+
options.beatmapsets = beatmapsets_info
|
|
43
46
|
if not options.set:
|
|
44
47
|
await UniMessage.text("请提供需要转换的谱面setid").finish(reply_to=True)
|
|
45
48
|
if options.nln and options.fln:
|
|
@@ -85,9 +88,11 @@ async def _(msg: Message = CommandArg()):
|
|
|
85
88
|
args = parser.parse_args(argv)
|
|
86
89
|
options = Options(**vars(args))
|
|
87
90
|
if options.map:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
map_data = await osu_api("map", options.map)
|
|
92
|
+
mapinfo = Beatmap(**map_data)
|
|
93
|
+
beatmapsets_info = await get_beatmapsets_info(mapinfo.beatmapset_id)
|
|
94
|
+
options.set = mapinfo.beatmapset_id
|
|
95
|
+
options.beatmapsets = beatmapsets_info
|
|
91
96
|
osz_path = await convert_mania_map(options)
|
|
92
97
|
if not osz_path:
|
|
93
98
|
await UniMessage.text("未找到该地图,请检查是否搞混了mapID与setID").finish(reply_to=True)
|
|
@@ -5,7 +5,7 @@ from nonebot_plugin_alconna import UniMessage
|
|
|
5
5
|
from ..utils import NGM
|
|
6
6
|
from ..api import osu_api
|
|
7
7
|
from .utils import split_msg
|
|
8
|
-
from ..file import
|
|
8
|
+
from ..file import download_osu
|
|
9
9
|
from ..exceptions import NetworkError
|
|
10
10
|
from ..mania import generate_preview_pic
|
|
11
11
|
from ..draw.catch_preview import draw_cath_preview
|
|
@@ -24,7 +24,7 @@ async def _(state: T_State):
|
|
|
24
24
|
except NetworkError as e:
|
|
25
25
|
await UniMessage.text(f"查找map_id:{osu_id} 信息时 {str(e)}").finish(reply_to=True)
|
|
26
26
|
if state["mode"] == "3":
|
|
27
|
-
osu = await
|
|
27
|
+
osu = await download_osu(data["beatmapset_id"], int(osu_id))
|
|
28
28
|
if state["_prefix"]["command"][0] == "完整预览":
|
|
29
29
|
pic = await generate_preview_pic(osu, True)
|
|
30
30
|
else:
|
|
@@ -34,7 +34,7 @@ async def _(state: T_State):
|
|
|
34
34
|
pic = await draw_cath_preview(int(osu_id), data["beatmapset_id"], state["mods"])
|
|
35
35
|
await UniMessage.image(raw=pic).finish(reply_to=True)
|
|
36
36
|
elif state["mode"] == "1":
|
|
37
|
-
osu = await
|
|
37
|
+
osu = await download_osu(data["beatmapset_id"], int(osu_id))
|
|
38
38
|
beatmap = parse_map(osu)
|
|
39
39
|
pic = map_to_image(beatmap)
|
|
40
40
|
await UniMessage.image(raw=pic).finish(reply_to=True)
|
|
@@ -2,14 +2,14 @@ import re
|
|
|
2
2
|
from random import shuffle
|
|
3
3
|
|
|
4
4
|
from nonebot import on_command
|
|
5
|
-
from nonebot.log import logger
|
|
6
5
|
from nonebot.typing import T_State
|
|
7
6
|
from expiringdict import ExpiringDict
|
|
8
7
|
from nonebot.internal.matcher import Matcher
|
|
9
8
|
from nonebot_plugin_alconna import UniMessage
|
|
10
9
|
|
|
11
10
|
from .utils import split_msg
|
|
12
|
-
from ..api import get_recommend, update_recommend,
|
|
11
|
+
from ..api import get_recommend, update_recommend, osu_api
|
|
12
|
+
from ..schema import Beatmap
|
|
13
13
|
|
|
14
14
|
recommend = on_command("推荐", priority=11, block=True, aliases={"recommend", "推荐铺面", "推荐谱面"})
|
|
15
15
|
recommend_cache = ExpiringDict(1000, 60 * 60 * 12)
|
|
@@ -41,23 +41,18 @@ async def handle_recommend(state: T_State, matcher: type[Matcher]):
|
|
|
41
41
|
break
|
|
42
42
|
else:
|
|
43
43
|
await matcher.finish("今天已经没有可以推荐的图啦,明天再来吧")
|
|
44
|
+
return None
|
|
44
45
|
bid = int(re.findall("https://osu.ppy.sh/beatmaps/(.*)", recommend_map.mapLink)[0])
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if i.bid == bid:
|
|
49
|
-
bg = i.bg
|
|
50
|
-
break
|
|
51
|
-
else:
|
|
52
|
-
bg = ""
|
|
53
|
-
logger.error(f"出现问题: 有问题的是{bid}, {sid}")
|
|
46
|
+
map_data = await osu_api("map", bid)
|
|
47
|
+
map_info = Beatmap(**map_data)
|
|
48
|
+
sid = map_info.beatmapset_id
|
|
54
49
|
s = (
|
|
55
50
|
f"推荐的铺面是{recommend_map.mapName} ⭐{round(recommend_map.difficulty, 2)}\n{''.join(recommend_map.mod)}\n"
|
|
56
51
|
f"预计pp为{round(recommend_map.predictPP, 2)}\n提升概率为{round(recommend_map.passPercent * 100, 2)}%\n"
|
|
57
52
|
f"{recommend_map.mapLink}\nhttps://kitsu.moe/api/d/{sid}\n"
|
|
58
53
|
f"https://txy1.sayobot.cn/beatmaps/download/novideo/{sid}"
|
|
59
54
|
)
|
|
60
|
-
pic_url = f"https://
|
|
55
|
+
pic_url = f"https://osu.direct/api/media/background/{bid}"
|
|
61
56
|
return pic_url, s
|
|
62
57
|
|
|
63
58
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from .user import User, Badge
|
|
2
2
|
from .match import Game, Match
|
|
3
3
|
from .alphaosu import RecommendData
|
|
4
|
-
from .sayo_beatmap import SayoBeatmap
|
|
5
4
|
from .score import Score, NewScore, BeatmapUserScore
|
|
6
5
|
from .beatmap import Beatmap, Beatmapset, SeasonalBackgrounds
|
|
7
6
|
|
|
@@ -14,7 +13,6 @@ __all__ = [
|
|
|
14
13
|
"Beatmap",
|
|
15
14
|
"Beatmapset",
|
|
16
15
|
"SeasonalBackgrounds",
|
|
17
|
-
"SayoBeatmap",
|
|
18
16
|
"RecommendData",
|
|
19
17
|
"Match",
|
|
20
18
|
"Game",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
from .basemodel import Base
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class BidData(Base):
|
|
6
|
+
id: int
|
|
7
|
+
mode_int: int
|
|
8
|
+
version: str
|
|
9
|
+
total_length: int
|
|
10
|
+
cs: float
|
|
11
|
+
ar: float
|
|
12
|
+
accuracy: float
|
|
13
|
+
drain: float
|
|
14
|
+
difficulty_rating: float
|
|
15
|
+
count_circles: int
|
|
16
|
+
count_sliders: int
|
|
17
|
+
count_spinners: int
|
|
18
|
+
max_combo: Optional[int] = None
|
|
19
|
+
playcount: int
|
|
20
|
+
passcount: int
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class BeatmapSets(Base):
|
|
24
|
+
id: int
|
|
25
|
+
ranked: int
|
|
26
|
+
title: str
|
|
27
|
+
artist: str
|
|
28
|
+
title_unicode: str
|
|
29
|
+
artist_unicode: str
|
|
30
|
+
creator: str
|
|
31
|
+
user_id: int
|
|
32
|
+
source: str
|
|
33
|
+
last_updated: str
|
|
34
|
+
ranked_date: Optional[str]
|
|
35
|
+
bpm: float
|
|
36
|
+
favourite_count: int
|
|
37
|
+
video: bool
|
|
38
|
+
storyboard: bool
|
|
39
|
+
tags: str
|
|
40
|
+
language_id: int
|
|
41
|
+
genre_id: int
|
|
42
|
+
beatmaps: list[BidData]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
nonebot_plugin_osubot/__init__.py,sha256=Q-mTTnOIdKiKG6JrVm-kqpPrAhOP9lWyiKHNRqA7gpc,1478
|
|
2
|
-
nonebot_plugin_osubot/api.py,sha256=
|
|
2
|
+
nonebot_plugin_osubot/api.py,sha256=3jJbgJdL1sJ_FcbTqJQxRPLlJueaUXhH0REfy8Ff-ps,16521
|
|
3
3
|
nonebot_plugin_osubot/beatmap_stats_moder.py,sha256=mNNTufc-gvO4NdYa3TnealSZI4-LBoiTlb599SeLBck,2915
|
|
4
4
|
nonebot_plugin_osubot/config.py,sha256=Ub2s5Ny09-d1ZwT6x8cirB6zWy0brtO-oZV3W0qEM5Q,311
|
|
5
5
|
nonebot_plugin_osubot/data/osu/1849145.osz,sha256=enbHOvDu6ZkvQBM7gtvgZBY-r0a7z87pG62Xm9hXUSI,6933013
|
|
@@ -7,8 +7,8 @@ nonebot_plugin_osubot/data/osu/1849145.zip,sha256=k957Du9QVliv1rt6ku3sKDoTIOeyJk
|
|
|
7
7
|
nonebot_plugin_osubot/database/__init__.py,sha256=7CDo9xU_DGLQ6uTj_mU_Px92phg_DMU5mP6WvgOxFLY,101
|
|
8
8
|
nonebot_plugin_osubot/database/models.py,sha256=VF_MxR70eRbiIHtqWjpE_Vea4xR38X0RJiQIO96mjsY,1595
|
|
9
9
|
nonebot_plugin_osubot/draw/__init__.py,sha256=dRELA2Vi4gTe8v48q0iHXLDOEj7Unk-_ChDXJp3qkhg,265
|
|
10
|
-
nonebot_plugin_osubot/draw/bmap.py,sha256=
|
|
11
|
-
nonebot_plugin_osubot/draw/bp.py,sha256=
|
|
10
|
+
nonebot_plugin_osubot/draw/bmap.py,sha256=AfOCYVFPtjrrUaqTi-zfl5c3_lCQvIF1XoV31H5a4ko,5123
|
|
11
|
+
nonebot_plugin_osubot/draw/bp.py,sha256=Ma-it9MFYcHiIigb5_ZzG8p7wlL7-hh3sQKgB412jfo,8970
|
|
12
12
|
nonebot_plugin_osubot/draw/catch_preview.py,sha256=uSYoTqfdxRy4anpH9Uhj8NntPo008pzw1t6xRMTBBkI,1397
|
|
13
13
|
nonebot_plugin_osubot/draw/catch_preview_templates/css/style.css,sha256=2I1VwycLhKJMxwjHj19zAV6MBkFMLu_qLunpoiRlGlM,3919
|
|
14
14
|
nonebot_plugin_osubot/draw/catch_preview_templates/js/beatmap/beatmap.js,sha256=xh6RUz3D40-HJHu0KGqac_eAIHGoAR12bF58V9ft7iQ,5784
|
|
@@ -39,12 +39,12 @@ nonebot_plugin_osubot/draw/catch_preview_templates/js/util.js,sha256=XveUlX-d0vr
|
|
|
39
39
|
nonebot_plugin_osubot/draw/catch_preview_templates/js/viewbox.js,sha256=RPsUyoKNAQub2n7oUGwWyFppZu0iVuy6DD5gggQZS3E,1641
|
|
40
40
|
nonebot_plugin_osubot/draw/catch_preview_templates/js/zip.min.js,sha256=pQmrVxuGCMeLS-XS3QsVhzjwap28fr9Ya083uPlg1sM,86405
|
|
41
41
|
nonebot_plugin_osubot/draw/catch_preview_templates/pic.html,sha256=jwPxxyYFLGpbD29h8u_j3LBY33ya7BS2R_t95EldAmk,3092
|
|
42
|
-
nonebot_plugin_osubot/draw/echarts.py,sha256=
|
|
43
|
-
nonebot_plugin_osubot/draw/info.py,sha256=
|
|
44
|
-
nonebot_plugin_osubot/draw/map.py,sha256=
|
|
42
|
+
nonebot_plugin_osubot/draw/echarts.py,sha256=0fmfxKdnGUe7FKKb_7kS6Qj_PyrUZHUam7altC0WyKg,1142
|
|
43
|
+
nonebot_plugin_osubot/draw/info.py,sha256=SkrkE-kWJmdQIZ8oKJocRf6hTrJZy-qwE3xUvz5lJpk,11344
|
|
44
|
+
nonebot_plugin_osubot/draw/map.py,sha256=Oo1s5YuNxWzNVMBIASk0gO0ISATS-pQBPg68NcbpF74,8756
|
|
45
45
|
nonebot_plugin_osubot/draw/match_history.py,sha256=GBJl6lAA27U7NSMC2isEzD_YsoIPAeG6ijDu7Oflcl0,997
|
|
46
46
|
nonebot_plugin_osubot/draw/rating.py,sha256=pA7mGLI4IujmYB6kQf_tSkR7mZGpUAVLRLyaAsZhqTM,20397
|
|
47
|
-
nonebot_plugin_osubot/draw/score.py,sha256=
|
|
47
|
+
nonebot_plugin_osubot/draw/score.py,sha256=cUD8zpdf8e43Du9Z_A6T3HIP3IxtgSF3wheaNwMBWWk,29277
|
|
48
48
|
nonebot_plugin_osubot/draw/static.py,sha256=wdlzNO3xyiauKiMLr_h-B9uAsFU7fX_Y-fOusYKZP3k,4132
|
|
49
49
|
nonebot_plugin_osubot/draw/taiko_preview.py,sha256=X2hzWewMfH_0wFLBBtAALrXwT55pdytIu7215p0Gfws,11414
|
|
50
50
|
nonebot_plugin_osubot/draw/templates/bpa_chart.html,sha256=J0YbxM2_iGHIgLKs6qBbL-wdmNJ4Fc4FAQcc22RDuD8,7019
|
|
@@ -53,31 +53,31 @@ nonebot_plugin_osubot/draw/templates/mod_chart.html,sha256=Iz71KM5v9z_Rt2vqJ5WIZ
|
|
|
53
53
|
nonebot_plugin_osubot/draw/templates/pp_rank_line_chart.html,sha256=Gyf-GR8ZBlWQTks0TlB3M8EWUBMVwiUaesFAmDISxLo,1417
|
|
54
54
|
nonebot_plugin_osubot/draw/utils.py,sha256=6QDbByPQZCxI0k_i5MsExyWZ-sHgJUw6nEWLv85IgLY,15826
|
|
55
55
|
nonebot_plugin_osubot/exceptions.py,sha256=N_FsEk-9Eu2QnuznhdfWn6OoyA1HH73Q7bUaY89gVi0,40
|
|
56
|
-
nonebot_plugin_osubot/file.py,sha256=
|
|
56
|
+
nonebot_plugin_osubot/file.py,sha256=kfnaf68q0Au54YMUqhD2nYnusEsHqjxJKy2LqPA8urI,4104
|
|
57
57
|
nonebot_plugin_osubot/info/__init__.py,sha256=I7YlMQiuHExEeJWqyzZb2I-Vl2uql3Py2LdhSH2Z9N0,136
|
|
58
58
|
nonebot_plugin_osubot/info/bg.py,sha256=Icua4bS38k0c-WbLUjhfS4IXOF83bgyu_oa2HwX4ZEQ,1541
|
|
59
59
|
nonebot_plugin_osubot/info/bind.py,sha256=b2ua625hbYym7rpb-kLBB-VDP5YWFdmT5RweM58ggWw,4934
|
|
60
|
-
nonebot_plugin_osubot/mania/__init__.py,sha256=
|
|
60
|
+
nonebot_plugin_osubot/mania/__init__.py,sha256=t5-24nd2FiZTKvMFvNg8ZV9Lp_OFSHjhj_gWUV3s1es,5560
|
|
61
61
|
nonebot_plugin_osubot/matcher/__init__.py,sha256=yID7QcdQF6_Mouwbej3JwYUBbKSU3VQdrjq6B1Fz9P8,1331
|
|
62
62
|
nonebot_plugin_osubot/matcher/bind.py,sha256=QQJc2S7XFo5tu4CPloIET6fKaeiQixgb8M7QvULV6E0,2834
|
|
63
63
|
nonebot_plugin_osubot/matcher/bp.py,sha256=GidJfuZ9lJ7LwMq126DDOwMksNUOz4Bkab83OlKg8t8,3983
|
|
64
|
-
nonebot_plugin_osubot/matcher/bp_analyze.py,sha256=
|
|
64
|
+
nonebot_plugin_osubot/matcher/bp_analyze.py,sha256=xi40HVOcTvmHWR4WNLm706126CulfpV5UP0500FNiD8,4159
|
|
65
65
|
nonebot_plugin_osubot/matcher/getbg.py,sha256=Ar2yIST556MYRxzuXCLSDAMAmESRENN1fCty-kdH7PI,699
|
|
66
|
-
nonebot_plugin_osubot/matcher/guess.py,sha256=
|
|
66
|
+
nonebot_plugin_osubot/matcher/guess.py,sha256=Bv4Rt11eB65hdsPu6KhCjmEP1AacFUwA0uu5AytNB68,24192
|
|
67
67
|
nonebot_plugin_osubot/matcher/history.py,sha256=ZYkVJHdXuVJmhovRhwxFdqNp0o2uJJOACAZhhutyS3w,1577
|
|
68
68
|
nonebot_plugin_osubot/matcher/info.py,sha256=8CJHTOMTx_nzJ4ZwXo6ZfBwCuO3DtLprRX7jnMtPilk,858
|
|
69
69
|
nonebot_plugin_osubot/matcher/map.py,sha256=sFpOoFv63y-NOkCJhE6aW0DRYDl_8SoQOPsdq50QxT0,1404
|
|
70
|
-
nonebot_plugin_osubot/matcher/map_convert.py,sha256=
|
|
70
|
+
nonebot_plugin_osubot/matcher/map_convert.py,sha256=Q3oNK8NvOUE56mOXQ0PvRQkZZ0nLbtFrAp9wxqw-7Ak,5973
|
|
71
71
|
nonebot_plugin_osubot/matcher/match.py,sha256=uyrm8I_WgHK2ya1q46AUxNk_cQiKKh7GKlUzrrG1o7w,472
|
|
72
72
|
nonebot_plugin_osubot/matcher/medal.py,sha256=LZf8hlXGHy8mdK2l97SsYCChfYYovEDBGNbUPO3AOsw,2967
|
|
73
73
|
nonebot_plugin_osubot/matcher/mu.py,sha256=l3Ebz47o46EvN2nvo9-zzQI4CTaLMcd5XW0qljqSGIM,445
|
|
74
74
|
nonebot_plugin_osubot/matcher/osu_help.py,sha256=64rOkYEOETvU8AF__0xLZjVRs3cTac0D1XEultPK_kM,728
|
|
75
75
|
nonebot_plugin_osubot/matcher/osudl.py,sha256=yLEblYnLprTf2T00FiRWJ8CuCd0IHyUY9Ka68yAKOXo,872
|
|
76
76
|
nonebot_plugin_osubot/matcher/pr.py,sha256=xGjQvEJHmIZkq9luu8TtbjBB8FykGI4Wzi_-eXghOjQ,4951
|
|
77
|
-
nonebot_plugin_osubot/matcher/preview.py,sha256=
|
|
77
|
+
nonebot_plugin_osubot/matcher/preview.py,sha256=olEvSgdIzqSpNH-PjOeu48iiX-TeRJqptOeQqrIo6b4,1940
|
|
78
78
|
nonebot_plugin_osubot/matcher/rank.py,sha256=sFEim3cR_vswzLmbagjqy-ypolcprAxQpawiSEcFqEI,3619
|
|
79
79
|
nonebot_plugin_osubot/matcher/rating.py,sha256=JY1Q1ELU3Y1FhQ7kVWVkgVsYEVxkAcxjsoMcwC_u234,450
|
|
80
|
-
nonebot_plugin_osubot/matcher/recommend.py,sha256=
|
|
80
|
+
nonebot_plugin_osubot/matcher/recommend.py,sha256=DChL83UNSi_XDHUm1ksPwUgQE12PI_EHaxXkJQoZ5Oc,2521
|
|
81
81
|
nonebot_plugin_osubot/matcher/score.py,sha256=Nk6dpDlszKJKdboTSQRBf-wMGioHIPqKSVWrnT0Xbns,1212
|
|
82
82
|
nonebot_plugin_osubot/matcher/update.py,sha256=MHpxoJmU0hKW82XuM9YpyCxUUjjiNKwejnRgYwueR4Q,3168
|
|
83
83
|
nonebot_plugin_osubot/matcher/update_mode.py,sha256=0Wy6Y1-rN7XcqBZyo37mYFdixq-4HxCwZftUaiYhZqE,1602
|
|
@@ -357,24 +357,24 @@ nonebot_plugin_osubot/osufile/mods/6K.png,sha256=umRQwUCqGtRxL1J0OK4fEfPgda-sKTy
|
|
|
357
357
|
nonebot_plugin_osubot/osufile/mods/7K.png,sha256=zkeacf2WSDywv0zt4QCVTa4A54wbLI5_APvQZhnd0qY,970
|
|
358
358
|
nonebot_plugin_osubot/osufile/mods/8K.png,sha256=-NFuLd08N-7NiDV-blOprSP56Xx5kLBusmyvYVPdXKE,1045
|
|
359
359
|
nonebot_plugin_osubot/osufile/mods/9K.png,sha256=jMgg_a16eRrVV-a8wx4cTHyD9BozUzwibOhNIG4dQ-Y,1368
|
|
360
|
-
nonebot_plugin_osubot/osufile/mods/AP.png,sha256=
|
|
361
|
-
nonebot_plugin_osubot/osufile/mods/CL.png,sha256=
|
|
362
|
-
nonebot_plugin_osubot/osufile/mods/DT.png,sha256=
|
|
363
|
-
nonebot_plugin_osubot/osufile/mods/EZ.png,sha256=
|
|
364
|
-
nonebot_plugin_osubot/osufile/mods/FI.png,sha256=
|
|
365
|
-
nonebot_plugin_osubot/osufile/mods/FL.png,sha256=
|
|
366
|
-
nonebot_plugin_osubot/osufile/mods/HD.png,sha256=
|
|
367
|
-
nonebot_plugin_osubot/osufile/mods/HR.png,sha256=
|
|
368
|
-
nonebot_plugin_osubot/osufile/mods/HT.png,sha256=
|
|
369
|
-
nonebot_plugin_osubot/osufile/mods/MR.png,sha256=
|
|
370
|
-
nonebot_plugin_osubot/osufile/mods/NC.png,sha256=
|
|
371
|
-
nonebot_plugin_osubot/osufile/mods/NF.png,sha256=
|
|
372
|
-
nonebot_plugin_osubot/osufile/mods/PF.png,sha256=
|
|
373
|
-
nonebot_plugin_osubot/osufile/mods/RX.png,sha256=
|
|
374
|
-
nonebot_plugin_osubot/osufile/mods/SD.png,sha256=
|
|
375
|
-
nonebot_plugin_osubot/osufile/mods/SO.png,sha256=
|
|
376
|
-
nonebot_plugin_osubot/osufile/mods/TD.png,sha256=
|
|
377
|
-
nonebot_plugin_osubot/osufile/mods/V2.png,sha256=
|
|
360
|
+
nonebot_plugin_osubot/osufile/mods/AP.png,sha256=Fr1ip8Mxp-4FGInKRNSaEh-UOjjwBmFOn622P3bh7Js,1777
|
|
361
|
+
nonebot_plugin_osubot/osufile/mods/CL.png,sha256=d6umxTJ9Ukxr6qpuK0C_K49eDXpIupk_gLvmCyLulcQ,1595
|
|
362
|
+
nonebot_plugin_osubot/osufile/mods/DT.png,sha256=SKG0ueXlp1LkNBN7jYZLqFgFgAellleag_OTmCq7u_Q,1621
|
|
363
|
+
nonebot_plugin_osubot/osufile/mods/EZ.png,sha256=2v8urESIhNVuYHwfpw2DHjC2VuvuOo_fd0QIV6YpWSY,1303
|
|
364
|
+
nonebot_plugin_osubot/osufile/mods/FI.png,sha256=NPBvNd12oE4zrXtqfmK6swxJ-qe5Ao38edBldzCDnfM,1249
|
|
365
|
+
nonebot_plugin_osubot/osufile/mods/FL.png,sha256=CKx3ITzByhbJ4uDNoZ6c7RpjNcJlicI879pTVTLxvRY,1288
|
|
366
|
+
nonebot_plugin_osubot/osufile/mods/HD.png,sha256=67aJOk_HMuRpwRVu3bTsGOxRAGaMj218YYoQSYxw-RA,2159
|
|
367
|
+
nonebot_plugin_osubot/osufile/mods/HR.png,sha256=OwDFQTPbQIIwxymwGgyoGCS3RTkzPt0tdtk4238CnHc,1389
|
|
368
|
+
nonebot_plugin_osubot/osufile/mods/HT.png,sha256=I7E8Y87rtfsKzto_clVf4GiIu7CHYrP7FGmeZi89oKU,1404
|
|
369
|
+
nonebot_plugin_osubot/osufile/mods/MR.png,sha256=ksEwedL_bEBm34VIBt9IDfBFuB20VBn3C3F4sfyrhTs,1290
|
|
370
|
+
nonebot_plugin_osubot/osufile/mods/NC.png,sha256=CWo_Xkdmgsp1YOi-TamevcNdpYgq_1lAVDXZ5cGFqEQ,1365
|
|
371
|
+
nonebot_plugin_osubot/osufile/mods/NF.png,sha256=7C6rZp7ZbAo1SUC3uHUrd73OY_2Mn7KpofCM4SmGBG0,1634
|
|
372
|
+
nonebot_plugin_osubot/osufile/mods/PF.png,sha256=XbJt5JnqRUktT0kLXkCn6Iv9sLj1TFycQRsOmGnJjRE,1304
|
|
373
|
+
nonebot_plugin_osubot/osufile/mods/RX.png,sha256=tc6MTF1oDcji1P_wuEZjGORa4Ah3GaCQLM9ABatNg00,1265
|
|
374
|
+
nonebot_plugin_osubot/osufile/mods/SD.png,sha256=FQaNUkSCt92kAeEo5GVG4neWMN0TUdC637g8FMWbjuw,1695
|
|
375
|
+
nonebot_plugin_osubot/osufile/mods/SO.png,sha256=Fiz7A8x0MklH9PUsMz9vX9GYOp1p7o9pCcdhsZSmEkI,1512
|
|
376
|
+
nonebot_plugin_osubot/osufile/mods/TD.png,sha256=rWej0qHVNPxQJOztx_AYacYhJHnFlddO8X3xGwSLReQ,1498
|
|
377
|
+
nonebot_plugin_osubot/osufile/mods/V2.png,sha256=pyXx83YcJaimJL6i3DfrX8XdJ_3UmL8RgtP6ua0v7wM,1205
|
|
378
378
|
nonebot_plugin_osubot/osufile/pfm_ctb.png,sha256=9JJu8J1gR_nQhb1EWOuJUOjNitYK_gcH6MRGiYtvsGI,53451
|
|
379
379
|
nonebot_plugin_osubot/osufile/pfm_mania.png,sha256=PKlAezcKALo0UMnrYvTCL3pd-oJNEU76qLVPhfDLFdk,52208
|
|
380
380
|
nonebot_plugin_osubot/osufile/pfm_std.png,sha256=ts7e7IUeoalLuw0Pww0X3trXUpZwnWRsOqdQ1RzcdFM,57032
|
|
@@ -397,16 +397,16 @@ nonebot_plugin_osubot/osufile/work/stars.png,sha256=zifMmxxjOGzSZAm1tr-3ky_yy18p
|
|
|
397
397
|
nonebot_plugin_osubot/osufile/work/stars_expertplus.png,sha256=cmfpErs-flPxHEhVmS9H8vy8H7mrChvV_Q4A77oSVFY,517
|
|
398
398
|
nonebot_plugin_osubot/osufile/work/suppoter.png,sha256=4V4eNhB8_8KIXsQ1jzFyHUkicKPb5LPehoIcri4h8E4,16061
|
|
399
399
|
nonebot_plugin_osubot/pp.py,sha256=PSWGLWERr4vVtE9H5D2EBm-_hM5HOU3PQvv1cC4rqmQ,3175
|
|
400
|
-
nonebot_plugin_osubot/schema/__init__.py,sha256=
|
|
400
|
+
nonebot_plugin_osubot/schema/__init__.py,sha256=iC4BTSW_uPyH5-1xk3ByYa5kCicnOFWqxhuTmQKn2ik,411
|
|
401
401
|
nonebot_plugin_osubot/schema/alphaosu.py,sha256=7cJLIwl4X-dshYsXMi8hHgcp7Ly6BiI3pqwXENhMaX0,693
|
|
402
402
|
nonebot_plugin_osubot/schema/basemodel.py,sha256=aZI1rdOHx-kmMXohazq1s5tYdtR-2WRzfYQATmWd6a4,99
|
|
403
403
|
nonebot_plugin_osubot/schema/beatmap.py,sha256=UnobfZEHq1V2HG-A4j3BECubO-dB1JzTMA2_QIXttNM,1960
|
|
404
|
+
nonebot_plugin_osubot/schema/beatmapsets.py,sha256=rEbkmZHYXqmRtg9CyV0hzxc5kZFGm9OWoOv_laYripQ,780
|
|
404
405
|
nonebot_plugin_osubot/schema/match.py,sha256=lR3pGNVR9K_5GZAdOLG6Ki-W3fwJvgMlNhYOzKNE3lg,494
|
|
405
406
|
nonebot_plugin_osubot/schema/ppysb/__init__.py,sha256=JK2Z4n44gUJPVKdETMJYJ5uIw-4a8T50y6j5n-YrlYM,1375
|
|
406
|
-
nonebot_plugin_osubot/schema/
|
|
407
|
-
nonebot_plugin_osubot/schema/score.py,sha256=gxF_RVSUOyj7EF_q3XeHhNj5qg19MW-B1aePjnTmi08,3233
|
|
407
|
+
nonebot_plugin_osubot/schema/score.py,sha256=o32jKDESzFwOFPZnzjKqxNIj0MPUL9mFvBqgaZARHac,3269
|
|
408
408
|
nonebot_plugin_osubot/schema/user.py,sha256=sxNmqymG_kIVuGuzfchSv9UML6NPG70cqo2_h5xDIpM,2250
|
|
409
409
|
nonebot_plugin_osubot/utils/__init__.py,sha256=pyv8XxBcCOeQVDj1E4dgvktzcefgQXfKBlarsYGx1sg,815
|
|
410
|
-
nonebot_plugin_osubot-6.
|
|
411
|
-
nonebot_plugin_osubot-6.
|
|
412
|
-
nonebot_plugin_osubot-6.
|
|
410
|
+
nonebot_plugin_osubot-6.24.0.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
|
|
411
|
+
nonebot_plugin_osubot-6.24.0.dist-info/METADATA,sha256=wNBfSWq-1OB76NivPUP2ZuXxJlbILx1enIhGNnngGDs,4476
|
|
412
|
+
nonebot_plugin_osubot-6.24.0.dist-info/RECORD,,
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
from typing import Optional
|
|
2
|
-
|
|
3
|
-
from .basemodel import Base
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class BidData(Base):
|
|
7
|
-
bid: int
|
|
8
|
-
mode: int
|
|
9
|
-
version: str
|
|
10
|
-
length: int
|
|
11
|
-
CS: float
|
|
12
|
-
AR: float
|
|
13
|
-
OD: float
|
|
14
|
-
HP: float
|
|
15
|
-
star: float
|
|
16
|
-
aim: float
|
|
17
|
-
speed: float
|
|
18
|
-
hit300window: float
|
|
19
|
-
pp: float
|
|
20
|
-
pp_aim: float
|
|
21
|
-
pp_speed: float
|
|
22
|
-
pp_acc: float
|
|
23
|
-
circles: int
|
|
24
|
-
sliders: int
|
|
25
|
-
spinners: int
|
|
26
|
-
maxcombo: int
|
|
27
|
-
playcount: int
|
|
28
|
-
passcount: int
|
|
29
|
-
bg: str
|
|
30
|
-
audio: str
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class MapInfo(Base):
|
|
34
|
-
sid: int
|
|
35
|
-
local_update: int
|
|
36
|
-
bids_amount: int
|
|
37
|
-
approved: int
|
|
38
|
-
title: str
|
|
39
|
-
artist: str
|
|
40
|
-
titleU: str
|
|
41
|
-
artistU: str
|
|
42
|
-
creator: str
|
|
43
|
-
creator_id: int
|
|
44
|
-
source: str
|
|
45
|
-
last_update: int
|
|
46
|
-
approved_date: int
|
|
47
|
-
bpm: float
|
|
48
|
-
favourite_count: int
|
|
49
|
-
video: int
|
|
50
|
-
storyboard: int
|
|
51
|
-
tags: str
|
|
52
|
-
language: int
|
|
53
|
-
genre: int
|
|
54
|
-
bid_data: list[BidData]
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class SayoBeatmap(Base):
|
|
58
|
-
status: int
|
|
59
|
-
data: Optional[MapInfo] = None
|
|
File without changes
|