KarisAya / nonebot_plugin_matcher_block

通用指令阻断
MIT License
14 stars 2 forks source link

冷却无法生效 #6

Open Sevenyine opened 9 months ago

Sevenyine commented 9 months ago
11-26 14:45:42 [SUCCESS] nonebot | OneBot V11 | [message.group.normal]: Message -541372738 from @[群:] '.添加阻断 nbnhhsh 冷却 10'
11-26 14:45:42 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.word_analyze, lineno=56)
11-26 14:45:42 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.word_analyze, lineno=56) running complete
11-26 14:45:42 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.auto_ban, lineno=18)
11-26 14:45:42 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.img_check, lineno=16)
11-26 14:45:42 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.auto_ban, lineno=18) running is cancelled
11-26 14:45:42 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.img_check, lineno=16) running is cancelled
11-26 14:45:42 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_matcher_block, lineno=129)
11-26 14:45:42 [INFO] nonebot_plugin_matcher_block | 指令【nbnhhsh】已在xxx设置冷却:10s
11-26 14:45:43 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_matcher_block, lineno=129) running complete

11-26 14:46:17 [SUCCESS] nonebot | OneBot V11 | [message.group.normal]: Message -1043481626 from@[群:] '.添加阻断 .nbnhhsh 冷却 10'
11-26 14:46:17 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.word_analyze, lineno=56)
11-26 14:46:17 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.word_analyze, lineno=56) running complete
11-26 14:46:17 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.auto_ban, lineno=18)
11-26 14:46:17 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.img_check, lineno=16)
11-26 14:46:17 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.auto_ban, lineno=18) running is cancelled
11-26 14:46:17 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.img_check, lineno=16) running is cancelled
11-26 14:46:17 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_matcher_block, lineno=129)
11-26 14:46:17 [INFO] nonebot_plugin_matcher_block | 指令【.nbnhhsh】已在xxx设置冷却:10s
11-26 14:46:18 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_matcher_block, lineno=129) running complete

开始测试 两次间隔时间小于10s但无法触发冷却(同一个人)

似乎是根本没有触发matcher_block这个插件?但是之前的设置冷却都成功了

11-26 14:46:22 [SUCCESS] nonebot | OneBot V11 | [message.group.normal]: Message 801364682 from@[群:] '.nbnhhsh nb'
11-26 14:46:22 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.word_analyze, lineno=56)
11-26 14:46:22 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.word_analyze, lineno=56) running complete
11-26 14:46:22 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_hammer_nbnhhsh.handler, lineno=12)
11-26 14:46:24 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_hammer_nbnhhsh.handler, lineno=12) running complete
11-26 14:46:24 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.auto_ban, lineno=18)
11-26 14:46:24 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.img_check, lineno=16)
11-26 14:46:24 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.auto_ban, lineno=18) running is cancelled
11-26 14:46:24 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.img_check, lineno=16) running is cancelled
11-26 14:46:27 [SUCCESS] nonebot | OneBot V11 | [message.group.normal]: Message -962560001 from@[群:] '.nbnhhsh nb'
11-26 14:46:27 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.word_analyze, lineno=56)
11-26 14:46:27 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.word_analyze, lineno=56) running complete
11-26 14:46:27 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_hammer_nbnhhsh.handler, lineno=12)
11-26 14:46:29 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_hammer_nbnhhsh.handler, lineno=12) running complete
11-26 14:46:29 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.auto_ban, lineno=18)
11-26 14:46:29 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.img_check, lineno=16)
11-26 14:46:29 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.auto_ban, lineno=18) running is cancelled
11-26 14:46:29 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.img_check, lineno=16) running is cancelled
Sevenyine commented 9 months ago

我想到可能是后面的参数问题,但是如果只是.nbnhhsh这个命令也无法正常阻断:

11-26 14:50:11 [SUCCESS] nonebot | OneBot V11 | [message.group.normal]: Message 682499795 from@[群:] '.nbnhhsh'
11-26 14:50:11 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.word_analyze, lineno=56)
11-26 14:50:11 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.word_analyze, lineno=56) running complete
11-26 14:50:11 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_hammer_nbnhhsh.handler, lineno=12)
11-26 14:50:12 [SUCCESS] nonebot | OneBot V11 | [message.group.normal]: Message 1604922949 from@[群:] '.nbnhhsh'
11-26 14:50:12 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.word_analyze, lineno=56)
11-26 14:50:12 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.word_analyze, lineno=56) running complete
11-26 14:50:13 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_hammer_nbnhhsh.handler, lineno=12)
11-26 14:50:13 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_hammer_nbnhhsh.handler, lineno=12) running complete
11-26 14:50:13 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.auto_ban, lineno=18)
11-26 14:50:13 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.img_check, lineno=16)
11-26 14:50:13 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.auto_ban, lineno=18) running is cancelled
11-26 14:50:13 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.img_check, lineno=16) running is cancelled
11-26 14:50:15 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_hammer_nbnhhsh.handler, lineno=12) running complete
11-26 14:50:15 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.auto_ban, lineno=18)
11-26 14:50:15 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_admin.img_check, lineno=16)
11-26 14:50:15 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.auto_ban, lineno=18) running is cancelled
11-26 14:50:15 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_admin.img_check, lineno=16) running is cancelled
youlanan commented 1 month ago

这是因为阻断前会先判断发送者权限,当您并非普通成员时将不会触发冷却😹