From a982f69a687990571dea7f36b262d689e8a13aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Thu, 7 Jul 2022 10:11:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20`DailyNote`=20=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/daily_note.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/daily_note.py b/plugins/daily_note.py index e2c7a4f1..62c87886 100644 --- a/plugins/daily_note.py +++ b/plugins/daily_note.py @@ -46,7 +46,7 @@ class DailyNote(BasePlugins): ) return [daily_note_handler] - async def _get_daily_note_data(self, user_info_data: UserInfoData, game_service: ServiceEnum) -> bytes: + async def _get_daily_note(self, user_info_data: UserInfoData, game_service: ServiceEnum) -> bytes: if game_service == ServiceEnum.HYPERION: client = genshin.ChineseClient(cookies=user_info_data.mihoyo_cookie) uid = user_info_data.mihoyo_game_uid @@ -134,7 +134,7 @@ class DailyNote(BasePlugins): else: await update.message.reply_chat_action(ChatAction.TYPING) try: - png_data = await self._start_get_daily_note(user_info, user_info.service) + png_data = await self._get_daily_note(user_info, user_info.service) except DataNotPublic: reply_message = await update.message.reply_text("查询失败惹,可能是便签功能被禁用了?") if filters.ChatType.GROUPS.filter(message): @@ -159,7 +159,7 @@ class DailyNote(BasePlugins): service = ServiceEnum.HOYOLAB else: return ConversationHandler.END - png_data = await self._start_get_daily_note(get_user_command_data.user_info, service) + png_data = await self._get_daily_note(get_user_command_data.user_info, service) await query.message.reply_chat_action(ChatAction.UPLOAD_PHOTO) await query.message.reply_photo(png_data, filename=f"{get_user_command_data.user_info.user_id}.png", allow_sending_without_reply=True)