- 问题所在
闲来无事用blockly写了一个复读的插件,大概是这样的
插件名称: 复读插件
导出时间: 2024/6/17 17:41:29
-=-=-=-=--=-=-=-=- BEGIN KOISHI BLOCKLY BLOCK V1 -=-=--=-=-=--=-=--=-=-=-
H4sIAAAAAAAAA91aaXOqTNP+LZZS5YIKKipSloLivqO4fLEQUVEWRVw/5Lc/jVty
kpB4J3rOW2+ViYAz3T3dV/dcMwMSY5BQaCsZa1nX4CqBo/B/qWymsjZ88xj+8EAo
EIdv9NRBG+vG+vQLwSBE1no40seH05OTzJGii4v1670iaNONMJX4V6EY+mc7kHRq
ah6W0kWpKo/HirQTDOmiWR5fftGXVXHWqIFud5plHAGm3VTwzaXV3moUJazLk0nx
8KmvttyYb0wSBUUZCeLindGvt28MgR8EZTiWREUwBBMGMFybgimpkma+t2w5cYWU
hltdT1azlVzyjLoN7dJG2puGwFkdL22RcEbdmCeBSAjbq4q2TiJEBn6ZmeYyEQzu
drvALhzQjWkQJ0kyuJ+ZqnJugYRZ6H4yTBNUkIhZX5fuCBtH6BgSjyAsgdAsQtII
SyJxeJI9PYmcLqIISSAM9lZe8FXg+f5mH9yeRzGRJWX8xo883cKu4/lPaqF9LPtZ
ZLJspoLdExZVMGdDbaOOJON9GIYYtRkvTG1foWuTWM6MvsQDNgOodarWTRisOX+s
RlybzpQfDA0kRFQLHOMGGQU+20lISCwTGsVi+tX6vwmQWzggZDmEYay40FEkDj9B
vFgrag/ExR3angoHMez2tjop6FLdBtm5s7VNFZyGjeUXQBBPBwRAjuFUVILap1Tc
UMxob6PEjnIe7B8AAqJBImT4lJ8QnOzfhsiP9D8VNBjkZ3WHV9Vmhg6Cnk4+XKC3
0+rXsIn9DDairpmGrqyH8uS9HajoiugKCHTEkzCv1VqMVNaRqA1IToIlZS0VJxl9
cwJdArfxUjF3l48UfSqLQ1FXl59MxVijWM5NnNFaBgAsrrZJXzPaV218VG9cetXY
pn3w6HuMWktri0oMVfgGZvHerEGyIayg4g4kmTrkXzw9ELB3Gs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nxJl3hgw1h+uSs0rA1g3G4l84EqWo3a9d/aQFE9kvK60rhFRVZp3TVy
tXN2RyhXG2y2Qh5GC47Tvjbd+lWtMDNiGwU7YAe3jUlvScG9L7D8nAusJW08/OZY
T0gnIfeJdXs8N1PuqtvV8xS214XLh7ciIYXPbyrdoftLtcxmPg9Yb610/amMbu0f
++fTmjn6OGSrG1vh2F+WGH5i7SuSlCeAToHJblaUH1ctZExsxvqI4rEIzsWVGXVy
UXlRhqUC4XbnO9dW/650BCdL6xg7QRTY+Qu/K6eiontzy7UnlI5hcMNUzdAiljKH
lNLr8d769u8WjmV0Lki8p7CPDJzQjysUM6xI/ePCUT6WaAefWom8XKj5Koe03LM7
lnpbOH7+LtxzS8kSbRVm+tFwEGyqKS5LMzEw/30h+YwwNddbDehzsuBvBeboCnh/
dFGBGqLbvcX7B2m6x385i0PF8U/d9qwPcY3JmTj7VckUXocwltaiIS/N17fuL2OF
2qNCqt9Ge5ZhWqB78+wNXzu93vnFJBTPIeSZDjMW7T1r2Wxep4woRo7HOOmXhBDm
j4Sjkp+UIpg/PpIkMTwicUIkz477H6trgxNDMAAA
-=-=--=-=-=--=-=-=-=- END KOISHI BLOCKLY BLOCK V1 -=-=--=-=-=--=-=--=-=-=-
在本地测试了一下,效果很符合预期,在机器人接收到三个同样消息的时候会由百分之五十的概率回复,其中有百分之70概率回复“打断复读”,否则跟着复读。运行了一下,感觉也没有问题
然后我就导出了插件,添加到了服务器里,但是机器人没有任何相应,我改到了三次必回复后,也没任何反应,所以我怀疑是blockly-null可能接收不到我的消息
- 尝试解决
为了验证我的想法,我拼了一个插件,用来测试能不能接收消息
插件名称: 消息记录
导出时间: 2024/6/17 17:48:29
-=-=-=-=--=-=-=-=- BEGIN KOISHI BLOCKLY BLOCK V1 -=-=--=-=-=--=-=--=-=-=-
H4sIAAAAAAAAA62Wa3OiShCGf0tKpyqJN0AR8FQqq9HoqjGut3jyhRphRCI3YcbL
ftjffhpDFuNqadxThcIMPd1PvzP0DJI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Tq9C8YPk/SybsQnFMYFOAs03PRqfbqPI8EnZ2ImzfPdB8cQi
O31xnlHJf98di6hSRLIcPsg8Kj+imozKNVThUE1ElSpSPs5cjP3OUFCUQp4r4Exe
KuqZgsjxGUUuapnJVJwq8hQXZSnaU/4Dxmk3F6sLAAA=
-=-=--=-=-=--=-=-=-=- END KOISHI BLOCKLY BLOCK V1 -=-=--=-=-=--=-=--=-=-=-
同样地,在本地我进行测试是没问题的,日志会正常显示消息
然后在服务器上又不可以了,测试结果就是没有日志输出()
但是——
装在服务器上的“信息记录”插件是有返回的,说明好像还是可以接收消息的(?)
随后我对比了一下napcat日志中的消息,发现好像blockly-null只能返回零星的一点消息,大部分都没有收到
napcat日志记录的信息:
(详细看了一下日志的消息内容,貌似没有重复,换句话说感觉像blockly-null和napcat把消息瓜分了?)
我以为是blockly-null插件有问题,但重启,重装后无果,koishi重启无果
- 系统环境信息
本地:
System:
OS: Windows 11 10.0.22631
CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
Binaries:
Node: 20.12.1
Yarn: 4.0.1
Koishi:
Core: 4.17.8
Console: 5.28.4
Koishi Desktop: 1.1.1
服务器:
System:
OS: Linux 5.10 Alpine Linux
CPU: (2) x64 Intel(R) Xeon(R) Platinum
Binaries:
Node: 20.14.0
Yarn: 4.1.1
Koishi:
Core: 4.17.8
Console: 5.28.4