Archived
1
0
Fork 0

fix chunithm random

This commit is contained in:
多羅狼 2024-01-09 09:56:46 +08:00 committed by GitHub
parent 68ad2b16b1
commit d8620c218a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -198,6 +198,7 @@ async def _(msg: Bot.MessageSession):
if level == "": if level == "":
if diff == "": if diff == "":
music_data = (await total_list.get()).random() music_data = (await total_list.get()).random()
await msg.finish(await get_info(msg, music, Plain(f"{'/'.join(str(ds) for ds in music.ds)}")))
else: else:
raise ValueError raise ValueError
else: else:
@ -210,6 +211,6 @@ async def _(msg: Bot.MessageSession):
await msg.finish(msg.locale.t("chunithm.message.music_not_found")) await msg.finish(msg.locale.t("chunithm.message.music_not_found"))
else: else:
music = music_data.random() music = music_data.random()
await msg.finish(await get_info(msg, music, Plain(f"\n{'/'.join(str(ds) for ds in music.ds)}"))) await msg.finish(await get_info(msg, music, Plain(f"{'/'.join(str(ds) for ds in music.ds)}")))
except (ValueError, TypeError): except (ValueError, TypeError):
await msg.finish(msg.locale.t("chunithm.message.random.error")) await msg.finish(msg.locale.t("chunithm.message.random.error"))