From b7ea2cb80819f52bc12e4f02c78aa5cbae37096a Mon Sep 17 00:00:00 2001 From: xtaodada Date: Mon, 2 Dec 2024 16:15:42 +0800 Subject: [PATCH] :bug: Fix edit normal message media in WishWaitingListPlugin --- plugins/genshin/wish_waiting_list.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/genshin/wish_waiting_list.py b/plugins/genshin/wish_waiting_list.py index 0e9489ee..431c07ab 100644 --- a/plugins/genshin/wish_waiting_list.py +++ b/plugins/genshin/wish_waiting_list.py @@ -226,10 +226,11 @@ class WishWaitingListPlugin(Plugin): user_id = user.id image = await self.render(user_id, is_avatar) - await image.edit_inline_media( - callback_query, - reply_markup=await self.get_wish_waiting_list_button(user_id, is_avatar), - ) + reply_markup = await self.get_wish_waiting_list_button(user_id, is_avatar) + if callback_query.message: + await image.edit_media(callback_query.message, reply_markup=reply_markup) + else: + await image.edit_inline_media(callback_query, reply_markup=reply_markup) async def get_inline_use_data(self) -> List[Optional[IInlineUseData]]: types = {"角色": "avatar", "武器": "weapon"}