🐛 修复 ledger 无法查询其他月份

This commit is contained in:
xtaodada 2022-10-13 00:41:40 +08:00
parent ada56a2382
commit 3fe62c0100
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
3 changed files with 4 additions and 6 deletions

View File

@ -179,7 +179,7 @@ class Abyss(Plugin, BasePlugin):
await message.reply_chat_action(ChatAction.UPLOAD_PHOTO)
for group in ArkoWrapper(images).map(InputMediaPhoto).group(10): # 每 10 张图片分一个组
await message.reply_media_group(list(group), allow_sending_without_reply=True)
await message.reply_media_group(list(group), allow_sending_without_reply=True, write_timeout=60)
if reply_text is not None:
await reply_text.delete()

View File

@ -31,10 +31,8 @@ def check_ledger_month(context: CallbackContext) -> int:
month = now_time.month
args = get_all_args(context)
if len(args) >= 1:
month = args[0]
elif isinstance(month, int):
pass
elif re_data := re.findall(r"\d+", str(month)):
month = args[0].replace("", "")
if re_data := re.findall(r"\d+", str(month)):
month = int(re_data[0])
else:
num_dict = {"": 1, "": 2, "": 3, "": 4, "": 5, "": 6, "": 7, "": 8, "": 9, "": 10}

View File

@ -145,7 +145,7 @@ class SignJob(Plugin):
await self.sign_service.update(sign_db)
logger.info("执行自动签到完成" if context.job.name == "SignJob" else "执行自动重签完成")
if context.job.name == "SignJob":
context.job_queue.run_once(self.sign, when=datetime.time(hour=0, minute=1, second=0), name="SignAgainJob")
context.job_queue.run_once(self.sign, when=60, name="SignAgainJob")
elif context.job.name == "SignAgainJob":
text = await SignStatus.get_sign_status(self.sign_service)
await context.bot.send_message(notice_chat_id, text, parse_mode=ParseMode.HTML)