📝 写文档

This commit is contained in:
Chen_Xu233
2024-06-24 14:11:41 +08:00
parent fb3594f6d3
commit 73f909f118
3 changed files with 61 additions and 29 deletions

View File

@ -1,6 +1,6 @@
from typing import Optional, Literal, List
from nonebot import get_driver, get_plugin_config
from pydantic import BaseModel, field_validator
from pydantic import BaseModel
class ScopedConfig(BaseModel):

View File

@ -140,7 +140,12 @@ def got_rank(msg_dict: Dict[str, int]) -> List[List[Union[str, int]]]:
rank.append(list(max_key))
msg_dict.pop(max_key[0])
except ValueError:
break
logger.error(
"群内拥有聊天记录的人数不足,无法获取到长度为{}的排行榜,已将长度变化为:{}".format(
plugin_config.get_num, len(rank)
)
)
break
return rank