mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-24 15:19:20 +00:00
🐛 修复 ledger 无法查询其他月份
This commit is contained in:
parent
ada56a2382
commit
3fe62c0100
@ -179,7 +179,7 @@ class Abyss(Plugin, BasePlugin):
|
|||||||
await message.reply_chat_action(ChatAction.UPLOAD_PHOTO)
|
await message.reply_chat_action(ChatAction.UPLOAD_PHOTO)
|
||||||
|
|
||||||
for group in ArkoWrapper(images).map(InputMediaPhoto).group(10): # 每 10 张图片分一个组
|
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:
|
if reply_text is not None:
|
||||||
await reply_text.delete()
|
await reply_text.delete()
|
||||||
|
@ -31,10 +31,8 @@ def check_ledger_month(context: CallbackContext) -> int:
|
|||||||
month = now_time.month
|
month = now_time.month
|
||||||
args = get_all_args(context)
|
args = get_all_args(context)
|
||||||
if len(args) >= 1:
|
if len(args) >= 1:
|
||||||
month = args[0]
|
month = args[0].replace("月", "")
|
||||||
elif isinstance(month, int):
|
if re_data := re.findall(r"\d+", str(month)):
|
||||||
pass
|
|
||||||
elif re_data := re.findall(r"\d+", str(month)):
|
|
||||||
month = int(re_data[0])
|
month = int(re_data[0])
|
||||||
else:
|
else:
|
||||||
num_dict = {"一": 1, "二": 2, "三": 3, "四": 4, "五": 5, "六": 6, "七": 7, "八": 8, "九": 9, "十": 10}
|
num_dict = {"一": 1, "二": 2, "三": 3, "四": 4, "五": 5, "六": 6, "七": 7, "八": 8, "九": 9, "十": 10}
|
||||||
|
@ -145,7 +145,7 @@ class SignJob(Plugin):
|
|||||||
await self.sign_service.update(sign_db)
|
await self.sign_service.update(sign_db)
|
||||||
logger.info("执行自动签到完成" if context.job.name == "SignJob" else "执行自动重签完成")
|
logger.info("执行自动签到完成" if context.job.name == "SignJob" else "执行自动重签完成")
|
||||||
if context.job.name == "SignJob":
|
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":
|
elif context.job.name == "SignAgainJob":
|
||||||
text = await SignStatus.get_sign_status(self.sign_service)
|
text = await SignStatus.get_sign_status(self.sign_service)
|
||||||
await context.bot.send_message(notice_chat_id, text, parse_mode=ParseMode.HTML)
|
await context.bot.send_message(notice_chat_id, text, parse_mode=ParseMode.HTML)
|
||||||
|
Loading…
Reference in New Issue
Block a user