fix: Fixed an issue in data ranking command when multiple anchors are bound to the same group

This commit is contained in:
LWR
2024-06-30 15:44:20 +08:00
parent ad6ba2886f
commit b62c95580a
2 changed files with 4 additions and 4 deletions

View File

@@ -90,7 +90,7 @@ 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(
@@ -98,7 +98,7 @@ async def ranking(app: Ariadne,
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]

View File

@@ -80,7 +80,7 @@ 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(
@@ -88,7 +88,7 @@ async def ranking_double(app: Ariadne,
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(