Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法接收禁言机器人的notice #72

Closed
alexskim opened this issue Dec 12, 2022 · 4 comments
Closed

无法接收禁言机器人的notice #72

alexskim opened this issue Dec 12, 2022 · 4 comments

Comments

@alexskim
Copy link

alexskim commented Dec 12, 2022

相关代码,别人被禁言可以正常触发,gocqhttp中有机器人被禁言的提示。
image
使用这种方式产生的结果一致,加上zero.OnlyToMe也一样。
image

@alexskim alexskim changed the title 无法接受禁言机器人的notice 无法接收禁言机器人的notice Dec 12, 2022
@fumiama
Copy link
Collaborator

fumiama commented Dec 12, 2022

请开debug模式给出notice的json事件。zb本身并未限制接收这类事件。如果你正在使用zbp,那么可能是这里的逻辑阻止了接收。

https://github.com/FloatTech/zbputils/blob/main/control/engine.go#L35-L41

@alexskim
Copy link
Author

image
使用的是zbp,根据json来看,确实是那一段代码阻止了,那么有办法实现接收机器人被禁言的notice吗

@alexskim
Copy link
Author

我自己试了一下,直接使用zerobot可以接收到

@fumiama
Copy link
Collaborator

fumiama commented Dec 12, 2022

是的。你可以使用zero.OnNotice替代engine。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants