feat: 新增 OneBot 应用端 WebSocket 模式#48
Open
Admilkk wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
type: 7连接类型:OneBot应用端ws。message/notice/request/meta_event上报后,转换为 Yunzai 的Bot.em(...)事件。type: 1/type: 2的行为,避免影响已有用法。get_group_member_list请求。package.json未声明的依赖:lodash、yaml、chokidar。使用方式
连接 OneBot 实现端时使用
type: 7,例如:其中参数含义为:
和原有类型的区别
type: 1:ws-plugin 作为 OneBot 实现端,主动连接 OneBot 应用端。type: 2:ws-plugin 作为 OneBot 实现端,本地监听 OneBot 应用端连接。type: 7:ws-plugin 作为 OneBot 应用端,主动连接 OneBot 实现端。验证
node --check。post_type: message能转换为 Yunzai 的message.group.normal事件。