mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-22 06:17:54 +00:00
🐛 Fix wrong params passed to start_sign
function
修复签到函数传入错误的参数导致异常的问题
This commit is contained in:
parent
15d872ba35
commit
11be3f232c
@ -16,6 +16,7 @@ from core.user import UserService
|
|||||||
from plugins.genshin.sign import SignSystem, NeedChallenge
|
from plugins.genshin.sign import SignSystem, NeedChallenge
|
||||||
from plugins.system.errorhandler import notice_chat_id
|
from plugins.system.errorhandler import notice_chat_id
|
||||||
from plugins.system.sign_status import SignStatus
|
from plugins.system.sign_status import SignStatus
|
||||||
|
from utils.helpers import get_genshin_client
|
||||||
from utils.log import logger
|
from utils.log import logger
|
||||||
|
|
||||||
|
|
||||||
@ -51,8 +52,9 @@ class SignJob(Plugin):
|
|||||||
if sign_db.status in [SignStatusEnum.STATUS_SUCCESS, SignStatusEnum.ALREADY_CLAIMED]:
|
if sign_db.status in [SignStatusEnum.STATUS_SUCCESS, SignStatusEnum.ALREADY_CLAIMED]:
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
|
client = await get_genshin_client(user_id)
|
||||||
text = await self.sign_system.start_sign(
|
text = await self.sign_system.start_sign(
|
||||||
user_id, is_sleep=True, is_raise=True, title="自动签到" if context.job.name == "SignJob" else "自动重新签到"
|
client, is_sleep=True, is_raise=True, title="自动签到" if context.job.name == "SignJob" else "自动重新签到"
|
||||||
)
|
)
|
||||||
sign_db.status = SignStatusEnum.STATUS_SUCCESS
|
sign_db.status = SignStatusEnum.STATUS_SUCCESS
|
||||||
except InvalidCookies:
|
except InvalidCookies:
|
||||||
|
@ -16,6 +16,7 @@ from core.user import UserService
|
|||||||
from plugins.genshin.sign import SignSystem
|
from plugins.genshin.sign import SignSystem
|
||||||
from plugins.jobs.sign import NeedChallenge
|
from plugins.jobs.sign import NeedChallenge
|
||||||
from utils.decorators.admins import bot_admins_rights_check
|
from utils.decorators.admins import bot_admins_rights_check
|
||||||
|
from utils.helpers import get_genshin_client
|
||||||
from utils.log import logger
|
from utils.log import logger
|
||||||
|
|
||||||
|
|
||||||
@ -44,7 +45,8 @@ class SignAll(Plugin):
|
|||||||
user_id = sign_db.user_id
|
user_id = sign_db.user_id
|
||||||
old_status = sign_db.status
|
old_status = sign_db.status
|
||||||
try:
|
try:
|
||||||
text = await self.sign_system.start_sign(user_id, is_sleep=True, is_raise=True, title="自动重新签到")
|
client = await get_genshin_client(user_id)
|
||||||
|
text = await self.sign_system.start_sign(client, is_sleep=True, is_raise=True, title="自动重新签到")
|
||||||
except InvalidCookies:
|
except InvalidCookies:
|
||||||
text = "自动签到执行失败,Cookie无效"
|
text = "自动签到执行失败,Cookie无效"
|
||||||
sign_db.status = SignStatusEnum.INVALID_COOKIES
|
sign_db.status = SignStatusEnum.INVALID_COOKIES
|
||||||
|
Loading…
Reference in New Issue
Block a user