-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat(onebot11): add support for market face message #167
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Null <nullqwertyuiop@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
除非现有的几个qq客户端传过来的信息都是llob那样子,否则我不推荐你采取llob的数据格式
MarketFace 似乎没有在 OneBot11 标准中定义,目前不同协议似乎使用了不同的字段 (See Lagrange.OneBot/Message/Entity/MarketFaceSegment.cs#L10-L14),如果使用不同于 LLOneBot 的协议可能会导致无法正常解析 |
|
要不放弃ob11协议去用新的吧( |
Graia project master
你还是没按我说的改啊 搞清楚一点,avilla是跨平台框架,所有模型应该是抽象的,而不是依赖于某一具体实现 商城表情并非llonebot独属的元素,mirai协议,chronocat都有这类元素 你照着llonebot写,其他协议端怎么办? |
|
罚你重看一遍。 |
就最新的来看字段仍然不一样 或者llob那边改了 |
因为avilla的ob11还就是标准的ob11,这样能够对接更多的ob协议端。 当然差异这边,llob作者说他与lagrange已经同步了这个商城表情。你可以再等一会看看是lagrange改了还是llob改了 |
avilla 允许使用形如 avilla.onebot.llonebot 的命名空间,但 flywheel migrate还没完成。。。 |
好的,LLOneBot修改合并后我也会更新本PR保持适配。
|
Interessant... |
Warning 该表格仅展示了部分协议实现,由于 OneBot11 标准中没有编写 MarketFace 的规范,也又可能存在其他使用不同字段的协议实现。 Note
|
|
经过研究后,我建议你可以把MarketFace做成这种结构(与ob11大致一致): @dataclass
class MarketFace(Element):
"""MarketFace对象, 专门表示 QQ 中的商城表情"""
id: str # alias: emoji_id
tab_id: Optional[str] = None # alias: package_id
key: Optional[str] = None
summary: Optional[str] = None # alias: face_name |
Should work with LLOneBot/LLOneBot#205