Skip to content

求大神指导一下,应该怎么写,用户申请入群事件执行 #12

Answered by MR-XieXuan
yixianbaowang asked this question in Q&A
Discussion options

You must be logged in to vote

然后你webhook收到的应该是 用户入群申请(Bot需要有管理员权限)这个事件,参考文档
https://docs.mirai.mamoe.net/mirai-api-http/api/EventType.html#%E7%94%A8%E6%88%B7%E5%85%A5%E7%BE%A4%E7%94%B3%E8%AF%B7-bot%E9%9C%80%E8%A6%81%E6%9C%89%E7%AE%A1%E7%90%86%E5%91%98%E6%9D%83%E9%99%90


根据webhook组件的使用教程,当接到 type 为 MemberJoinRequestEvent 时。会调用脚本的 webhook_member_join_request_event 函数 ,并且把收到的消息原封不动的传入该函数的第一个参数。所以你应该在脚本中定义的方法为 : webhook_member_join_request_event ($e) ;

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by MR-XieXuan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants