ChenXu233 / nonebot_plugin_dialectlist

看看群友能有多话唠
28 stars 4 forks source link

统计人数问题 #23

Closed F1Justin closed 1 year ago

F1Justin commented 1 year ago

配置项中是20人,可是机器人只统计五个人的( 日志如下: 04-08 22:42:21 [SUCCESS] nonebot | OneBot V11 985393579 | [message.group.normal]: Message -1411757137 from 2843657817@[群:1080353942] '本周群话痨排行榜' 04-08 22:42:21 [DEBUG] nonebot | Running PreProcessors... 04-08 22:42:21 [DEBUG] nonebot | Checking for matchers in priority 0... 04-08 22:42:21 [DEBUG] nonebot | Checking for matchers in priority 1... 04-08 22:42:21 [DEBUG] nonebot | Checking for matchers in priority 2... 04-08 22:42:21 [DEBUG] nonebot | Checking for matchers in priority 5... 04-08 22:42:21 [DEBUG] nonebot | Checking for matchers in priority 6... 04-08 22:42:21 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_dialectlist) 04-08 22:42:21 [DEBUG] nonebot | Running Matcher(type='message', module=nonebot_plugin_dialectlist) 04-08 22:42:21 [DEBUG] nonebot | Running handler Dependent(call=_group_message) 04-08 22:42:21 [DEBUG] nonebot_plugin_dialectlist | handle command from qq 04-08 22:42:21 [DEBUG] nonebot | Running handler Dependent(call=_private_message) 04-08 22:42:21 [DEBUG] nonebot | Handler Dependent(call=_private_message) skipped 04-08 22:42:21 [DEBUG] nonebot | Running handler Dependent(call=handle_message, parameterless=(Depends(Dependent(call=_key_getter)), Depends(Dependent(call=_key_parser)), Depends(Dependent(call=_key_getter)), Depends(Dependent(call=_key_parser)))) 04-08 22:42:21 [DEBUG] nonebot | OneBot V11 | Calling API get_login_info 04-08 22:42:21 [DEBUG] nonebot | Running CalledAPI hooks... 985393579 04-08 22:42:22 [INFO] nonebot_plugin_dialectlist | wow , there are 5757 msgs to count !!! 04-08 22:42:22 [DEBUG] nonebot_plugin_dialectlist | {'3481989883': 210, '57229612': 163, '1625438042': 22, '629308330': 484, '2331324496': 90, '3290805225': 384, '2081538100': 280, '2453526688': 174, '1597753348': 22, '3293876954': 179, '2927678928': 22, '2091572857': 13, '1276108923': 598, '2384554983': 16, '431277250': 53, '3099827232': 4, '1162077369': 3, '1399651432': 4, '1113126685': 3, '3122373628': 16, '3465481516': 2, '443421807': 71, '2822134995': 51, '2413923674': 8, '2932928722': 25, '1701173170': 380, '2386265512': 13, '2579390142': 5, '1017570673': 1, '289896538': 276, '1419892306': 10, '14921970': 1, '1075008236': 2, '905826685': 12, '1023620928': 25, '1290387093': 4, '2371576276': 8, '1471850534': 383, '1156802032': 6, '2082379786': 158, '1357558196': 57, '1015861268': 22, '1600059215': 4, '2843657817': 205, '2251417738': 40, '2657077247': 470, '3054176382': 2, '1120267441': 34, '2272166004': 1, '188376257': 18, '2504318245': 9, '2625169752': 20, '389375228': 6, '791935408': 2, '387841301': 10, '1174827388': 3, '323635793': 6, '1741681479': 40, '1703196046': 14, '386289445': 2, '2893324928': 1, '3468337393': 3, '3296391891': 6, '1075615782': 1, '178836241': 3, '2300375236': 2, '3553137884': 21, '3538985724': 203, '2453351195': 26, '1538239706': 3, '2661420180': 1, '1400942055': 1, '1292471257': 2, '2291842468': 1, '3320605520': 1, '3047681420': 10, '1600240663': 42, '1759978497': 23, '1209315924': 13, '3267494255': 2, '2500516595': 17, '3492119365': 2, '2521150201': 2, '2532071015': 3, '94298250': 150, '1576879881': 8, '1392883405': 32, '594656278': 1, '2671132256': 7, '1015769479': 22, '194168716': 1, '1270367970': 1} 04-08 22:42:22 [DEBUG] nonebot_plugin_dialectlist | searching member 1276108923 from group 1080353942 04-08 22:42:22 [DEBUG] nonebot | OneBot V11 | Calling API get_group_member_info 04-08 22:42:22 [DEBUG] nonebot | Running CalledAPI hooks... 04-08 22:42:22 [DEBUG] nonebot_plugin_dialectlist | searching member 629308330 from group 1080353942 04-08 22:42:22 [DEBUG] nonebot | OneBot V11 | Calling API get_group_member_info 04-08 22:42:22 [DEBUG] nonebot | Running CalledAPI hooks... 04-08 22:42:22 [DEBUG] nonebot_plugin_dialectlist | searching member 2657077247 from group 1080353942 04-08 22:42:22 [DEBUG] nonebot | OneBot V11 | Calling API get_group_member_info 04-08 22:42:22 [DEBUG] nonebot | Running CalledAPI hooks... 04-08 22:42:22 [DEBUG] nonebot_plugin_dialectlist | searching member 3290805225 from group 1080353942 04-08 22:42:22 [DEBUG] nonebot | OneBot V11 | Calling API get_group_member_info 04-08 22:42:22 [DEBUG] nonebot | Running CalledAPI hooks... 04-08 22:42:22 [DEBUG] nonebot_plugin_dialectlist | searching member 1471850534 from group 1080353942 04-08 22:42:22 [DEBUG] nonebot | OneBot V11 | Calling API get_group_member_info 04-08 22:42:22 [DEBUG] nonebot | Running CalledAPI hooks... 04-08 22:42:22 [DEBUG] nonebot_plugin_dialectlist | loaded list: [['群梅莉,时不时来群里找莲子', 598], ['群四季,时不时仰望群友', 484], ['知识的盗贼—魔理沙(看到我让我滚去学习)', 470], ['群微分算子,时不时抓群友开导', 384], ['莲子猫猫', 383]] 04-08 22:42:23 [DEBUG] nonebot_plugin_dialectlist | 第1名: 群梅莉,时不时来群里找莲子,598条消息 第2名: 群四季,时不时仰望群友,484条消息 第3名: 知识的盗贼—魔理沙(看到我让我滚去学习),470条消息 第4名: 群微分算子,时不时抓群友开导,384条消息 第5名: 莲子猫猫,383条消息

04-08 22:42:23 [DEBUG] nonebot | OneBot V11 | Calling API send_msg 04-08 22:42:24 [DEBUG] nonebot | Running CalledAPI hooks... 04-08 22:42:25 [DEBUG] nonebot | OneBot V11 | Calling API send_msg 04-08 22:42:26 [DEBUG] nonebot | Running CalledAPI hooks... 04-08 22:42:26 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_dialectlist) running complete

截屏2023-04-08 22 45 56
ChenXu233 commented 1 year ago

配置文件是写进环境venv文件里的吗?

ChenXu233 commented 1 year ago

试试下面的写法

dialectlist_string_format = '第{index}名:\n{nickname},{chatdatanum}条消息\n' #消息格式
dialectlist_string_suffix_format = '你们的职业是水群吗?————MYX\n计算花费时间:{timecost}秒' #消息后缀格式
dialectlist_get_num = 10 #获取人数数量
dialectlist_visualization = True #是否可视化
dialectlist_visualization_type = '圆环图' #可视化方案
dialectlist_font = 'SimHei'#字体格式
dialectlist_excluded_people = []#排除的人的QQ号(或频道号?(未经测试))
dialectlist_excluded_self = True #是否排除机器人自己QQ
F1Justin commented 1 year ago

谢谢,已解决