Skip to content

Commit

Permalink
fix: Fixed an issue in data ranking command when multiple anchors are…
Browse files Browse the repository at this point in the history
… bound to the same group
  • Loading branch information
Starlwr committed Jun 30, 2024
1 parent ad6ba28 commit b62c955
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions starbot/commands/builtin/ranking/ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ async def ranking(app: Ariadne,

if length == 0:
await app.send_message(sender, MessageChain(f"{up.uname} 的房间暂无{type_map[_type][2]}数据~"), quote=source)
return
continue

if page > page_length:
await app.send_message(
sender,
MessageChain(f"{up.uname} 的房间{type_map[_type][3]}榜页码范围为 1 ~ {page_length}\n请重新输入正确的页码~"),
quote=source
)
return
continue

data = await type_map[_type][1](up.room_id, start, end)
top_count = (await type_map[_type][1](up.room_id, 0, 0))[0][1]
Expand Down
4 changes: 2 additions & 2 deletions starbot/commands/builtin/ranking/ranking_double.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ async def ranking_double(app: Ariadne,

if length == 0:
await app.send_message(sender, MessageChain(f"{up.uname} 的房间暂无{type_map[_type][2]}数据~"), quote=source)
return
continue

if page > page_length:
await app.send_message(
sender,
MessageChain(f"{up.uname} 的房间{type_map[_type][3]}榜页码范围为 1 ~ {page_length}\n请重新输入正确的页码~"),
quote=source
)
return
continue

data = await type_map[_type][1](up.room_id, start, end)
top_count = max(
Expand Down

0 comments on commit b62c955

Please sign in to comment.