improve
This commit is contained in:
parent
b94ddfc17c
commit
f701796839
@ -19,9 +19,10 @@ async def answer_callback(_: Client, callback_query: CallbackQuery):
|
||||
if not data.all_char:
|
||||
return await callback_query.answer("没有可展示的角色,可能是数据未刷新", show_alert=True)
|
||||
if not char:
|
||||
await callback_query.message.edit_media(InputMediaPhoto(media=f"resources{sep}Kitsune.png",
|
||||
caption=f"请选择 {data.name} 的一个角色:"))
|
||||
return await callback_query.message.edit_reply_markup(reply_markup=data.gen_keyboard())
|
||||
return await callback_query.message.edit_media(
|
||||
InputMediaPhoto(media=f"resources{sep}Kitsune.png",
|
||||
caption=f"请选择 {data.name} 的一个角色:"),
|
||||
reply_markup=data.gen_keyboard())
|
||||
char_data = None
|
||||
for i in data.all_char:
|
||||
if i.get("name", "") == char:
|
||||
@ -29,5 +30,6 @@ async def answer_callback(_: Client, callback_query: CallbackQuery):
|
||||
break
|
||||
if not char_data:
|
||||
return await callback_query.answer("没有可展示的角色,可能是数据未刷新", show_alert=True)
|
||||
await callback_query.message.edit_media(InputMediaPhoto(media=char_data["file_id"]))
|
||||
await callback_query.message.edit_reply_markup(reply_markup=data.gen_back())
|
||||
await callback_query.message.edit_media(
|
||||
InputMediaPhoto(media=char_data["file_id"]),
|
||||
reply_markup=data.gen_back())
|
||||
|
Loading…
Reference in New Issue
Block a user