mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
🐛 Fix daily note task region type error
This commit is contained in:
parent
32a5a51e05
commit
3977680cc2
@ -2,11 +2,11 @@ import base64
|
|||||||
from typing import TYPE_CHECKING, List, Optional
|
from typing import TYPE_CHECKING, List, Optional
|
||||||
|
|
||||||
from pydantic import BaseModel, validator
|
from pydantic import BaseModel, validator
|
||||||
|
from simnet import Region
|
||||||
from simnet.errors import BadRequest as SimnetBadRequest, InvalidCookies, TimedOut as SimnetTimedOut
|
from simnet.errors import BadRequest as SimnetBadRequest, InvalidCookies, TimedOut as SimnetTimedOut
|
||||||
from telegram.constants import ParseMode
|
from telegram.constants import ParseMode
|
||||||
from telegram.error import BadRequest, Forbidden
|
from telegram.error import BadRequest, Forbidden
|
||||||
|
|
||||||
from core.basemodel import RegionEnum
|
|
||||||
from core.plugin import Plugin
|
from core.plugin import Plugin
|
||||||
from core.services.task.models import Task as TaskUser, TaskStatusEnum
|
from core.services.task.models import Task as TaskUser, TaskStatusEnum
|
||||||
from core.services.task.services import TaskResinServices, TaskRealmServices, TaskExpeditionServices
|
from core.services.task.services import TaskResinServices, TaskRealmServices, TaskExpeditionServices
|
||||||
@ -147,7 +147,7 @@ class DailyNoteSystem(Plugin):
|
|||||||
client: "GenshinClient",
|
client: "GenshinClient",
|
||||||
user: DailyNoteTaskUser = None,
|
user: DailyNoteTaskUser = None,
|
||||||
) -> List[str]:
|
) -> List[str]:
|
||||||
if client.region == RegionEnum.HOYOLAB:
|
if client.region == Region.OVERSEAS:
|
||||||
notes = await client.get_genshin_notes()
|
notes = await client.get_genshin_notes()
|
||||||
else:
|
else:
|
||||||
notes = await client.get_genshin_notes_by_stoken()
|
notes = await client.get_genshin_notes_by_stoken()
|
||||||
|
Loading…
Reference in New Issue
Block a user