You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
注意:此次更新修改了较多内容,因此本轮更新的包都需要通过
@next
或写明版本号来进行安装或升级。如果担心可用性受到影响,可忽略此次更新。Notable Changes
Migration
消息元素在用法上与过去的消息段基本相同,不过存在一些差异,请参考下方的升级指南:
segment()
方法将返回一个segment
对象而不是字符串,且序列化的形式由 CQ 码更改为了 XMLsegment.join()
方法被废弃,请直接使用array.join()
代替 (过去的方法依然可用且短时间内不会移除)segment
对象的data
属性被废弃并修改为了attrs
(过去的data
属性依然可用且短时间内不会移除)segment
对象了 (过去使用return segment()
的用户无需修改代码)session.send()
,bot.sendMessage()
方法都支持传入 segment 对象了 (需要适配器支持)Message
和Session
对象将新增elements
属性,包含content
所对应的消息元素Message
和Session
对象将自带quote
属性,同时content
和elements
属性不会包含该前缀Features
Bug Fixes
unhandledRejection
错误的问题 (0fd890f)error.stack
不存在时会显示异常的问题 (fix(utils): resolve error failed when stack is undefined #787) (45064c9)Other Changes
This discussion was created from the release Koishi 4.9.0.
Beta Was this translation helpful? Give feedback.
All reactions