fix: incorrect parameter name in cqmusic #2536
Closed
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.
https://docs.go-cqhttp.org/cqcode/#%E9%9F%B3%E4%B9%90%E8%87%AA%E5%AE%9A%E4%B9%89%E5%88%86%E4%BA%AB
还有修改的这个地方上面不远处,那个subType的判断逻辑也很奇怪,先判断是否存在subType,而文档中却没有对subType字段的注释。而且subType字段如果丢失,返回的是ServiceElement (xml消息),构造xml消息不对subType进行判断,默认就是qqmusic。这一段属实给我看绕晕了,按照我自己的想法,如果用户不填写subType,应当返回的是携带默认subType为 qqmusic的MusicShareElement,而xml应当摘出去。
不好意思,以前用gocq的时候没试过发xml消息,这边逻辑确实看的有些懵