From 3977680cc2239571c042340d1b6f2101e95dac03 Mon Sep 17 00:00:00 2001 From: omg-xtao <100690902+omg-xtao@users.noreply.github.com> Date: Mon, 24 Jul 2023 00:43:57 +0800 Subject: [PATCH] :bug: Fix daily note task region type error --- plugins/tools/daily_note.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/tools/daily_note.py b/plugins/tools/daily_note.py index 31fa9038..1ca4d35d 100644 --- a/plugins/tools/daily_note.py +++ b/plugins/tools/daily_note.py @@ -2,11 +2,11 @@ import base64 from typing import TYPE_CHECKING, List, Optional from pydantic import BaseModel, validator +from simnet import Region from simnet.errors import BadRequest as SimnetBadRequest, InvalidCookies, TimedOut as SimnetTimedOut from telegram.constants import ParseMode from telegram.error import BadRequest, Forbidden -from core.basemodel import RegionEnum from core.plugin import Plugin from core.services.task.models import Task as TaskUser, TaskStatusEnum from core.services.task.services import TaskResinServices, TaskRealmServices, TaskExpeditionServices @@ -147,7 +147,7 @@ class DailyNoteSystem(Plugin): client: "GenshinClient", user: DailyNoteTaskUser = None, ) -> List[str]: - if client.region == RegionEnum.HOYOLAB: + if client.region == Region.OVERSEAS: notes = await client.get_genshin_notes() else: notes = await client.get_genshin_notes_by_stoken()