fix chunithm random
This commit is contained in:
parent
68ad2b16b1
commit
d8620c218a
1 changed files with 2 additions and 1 deletions
|
@ -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"))
|
||||||
|
|
Reference in a new issue