mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-21 20:20:05 +08:00
查看词条的id范围判断少了个等号
This commit is contained in:
@@ -247,7 +247,7 @@ async def _(bot: Bot, event: GroupMessageEvent, arg: Message = CommandArg()):
|
|||||||
not is_number(id_)
|
not is_number(id_)
|
||||||
or int(id_) < 0
|
or int(id_) < 0
|
||||||
or int(id_)
|
or int(id_)
|
||||||
> len(await WordBank.get_group_all_problem(event.group_id))
|
>= len(await WordBank.get_group_all_problem(event.group_id))
|
||||||
):
|
):
|
||||||
await show_word_matcher.finish("id必须为数字且在范围内")
|
await show_word_matcher.finish("id必须为数字且在范围内")
|
||||||
id_ = int(id_)
|
id_ = int(id_)
|
||||||
@@ -257,7 +257,7 @@ async def _(bot: Bot, event: GroupMessageEvent, arg: Message = CommandArg()):
|
|||||||
not is_number(gid)
|
not is_number(gid)
|
||||||
or int(gid) < 0
|
or int(gid) < 0
|
||||||
or int(gid)
|
or int(gid)
|
||||||
> len(await WordBank.get_problem_by_scope(0))
|
>= len(await WordBank.get_problem_by_scope(0))
|
||||||
):
|
):
|
||||||
await show_word_matcher.finish("gid必须为数字且在范围内")
|
await show_word_matcher.finish("gid必须为数字且在范围内")
|
||||||
gid = int(gid)
|
gid = int(gid)
|
||||||
|
|||||||
Reference in New Issue
Block a user