-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
弃用 MessageContent.Key
#1363
Comments
At类不能强制转换成PlainText类(大概 |
MessageChain.get(PlainText.Key)
得到一个编译时错误
MessageChain.get(PlainText.Key)
得到一个编译时错误MessageChain.get(PlainText.Key)
得到一个运行时错误
考虑优化报错信息 |
|
可以考虑弃用
因此我觉得可以弃用 |
MessageChain.get(PlainText.Key)
得到一个运行时错误MessageContent.Key
那么泛型约束应该做出修改 另外,想问一下是否有数据说明,单独设计 |
|
指直接用 |
似乎并没有使用? Key 是一个 companion object, 类型判断通过 reified 类型的 |
就是想问一问这种方式比直接用 |
@AdoptOSS 通常不考虑这样微小的性能优化。这是为了允许如下写法: val source = chain[MessageSource] |
For mamoe:
|
使用如下Java代码获取第一个纯文本信息的文本内容:
发生如下错误:
复现
版本
2.7-M1
2.7-M1
The text was updated successfully, but these errors were encountered: