Update
This commit is contained in:
parent
f16d245723
commit
c2b033097b
2 changed files with 11 additions and 7 deletions
|
@ -211,16 +211,16 @@ async def _(msg: Bot.MessageSession, plate: str, username: str = None):
|
|||
await msg.finish(msg.locale.t("maimai.message.no_username"))
|
||||
payload = {'username': username}
|
||||
|
||||
if plate == '真将':
|
||||
if plate == '真将' or (plate[1] == '者' and plate[0] != '霸'):
|
||||
await msg.finish(msg.locale.t('maimai.message.plate.plate_not_found'))
|
||||
|
||||
output, songs_diff, songs = await get_plate_process(msg, payload, plate)
|
||||
output, get_img = await get_plate_process(msg, payload, plate)
|
||||
|
||||
if songs <= 10 or songs >= 50 or songs_diff <= 10 or songs_diff >= 50:
|
||||
await msg.finish(output.strip())
|
||||
else:
|
||||
if get_img:
|
||||
img = await msgchain2image([Plain(output)])
|
||||
await msg.finish([BImage(img)])
|
||||
else:
|
||||
await msg.finish(output.strip())
|
||||
|
||||
|
||||
@mai.handle('process <level> <goal> [<username>] {{maimai.help.process}}')
|
||||
|
|
|
@ -383,6 +383,8 @@ async def get_plate_process(msg, payload, plate):
|
|||
if verlist[record_index]['fs']:
|
||||
self_record = syncRank[sync_rank.index(verlist[record_index]['fs'])]
|
||||
output += f"{s[0]}\u200B. {s[1]}{' (DX)' if s[4] == 'DX' else ''} {s[2]} {s[3]} {self_record}".strip() + '\n'
|
||||
if len(song_remain_difficult) > 10:
|
||||
get_img = True
|
||||
else:
|
||||
output += msg.locale.t('maimai.message.plate.greater_13p', song_remain=len(song_remain_difficult))
|
||||
elif len(song_remain) > 0:
|
||||
|
@ -406,9 +408,11 @@ async def get_plate_process(msg, payload, plate):
|
|||
if verlist[record_index]['fs']:
|
||||
self_record = syncRank[sync_rank.index(verlist[record_index]['fs'])]
|
||||
output += f"{m.id}\u200B. {m.title}{' (DX)' if m.type == 'DX' else ''} {diffs[s[1]]} {m.ds[s[1]]} {self_record}".strip() + '\n'
|
||||
if len(song_remain) > 10:
|
||||
get_img = True
|
||||
else:
|
||||
output += msg.locale.t('maimai.message.plate.greater_13p.complete')
|
||||
else:
|
||||
output += msg.locale.t('maimai.message.plate.completed')
|
||||
output += msg.locale.t('maimai.message.plate.completed', plate=plate)
|
||||
|
||||
return output, len(song_remain_difficult), len(song_remain)
|
||||
return output, get_img
|
Reference in a new issue