mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
fix(scheduler_admin): 修复定时任务列表页码显示逻辑
- 在格式化定时任务列表图像时,添加对当前页码的可用性判断 - 如果页码不可用,则将当前页码默认设置为 1,避免显示错误的页码信息
This commit is contained in:
parent
3deffcb46c
commit
31467ce36e
@ -76,7 +76,9 @@ async def handle_view(
|
|||||||
await schedule_cmd.finish("没有找到任何相关的定时任务。")
|
await schedule_cmd.finish("没有找到任何相关的定时任务。")
|
||||||
|
|
||||||
img = await presenters.format_schedule_list_as_image(
|
img = await presenters.format_schedule_list_as_image(
|
||||||
schedules=schedules, title=title, current_page=page.result
|
schedules=schedules,
|
||||||
|
title=title,
|
||||||
|
current_page=page.result if page.available else 1
|
||||||
)
|
)
|
||||||
await MessageUtils.build_message(img).send(reply_to=True)
|
await MessageUtils.build_message(img).send(reply_to=True)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user