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
-
mirai-core
2.12 带来以下主要更新:
EventChannel
到协程Flow
的对接;不兼容变更
弃用
EmptyMessageChain
,以emptyMessageChain()
函数替换 (重写消息协议层与发送消息流程 #1997)MarketFace.contentToString
现在在原本会返回空字符串的情况下会返回"[商城表情]"
(fix: MarketFace contentToString #2030 by@cssxsh)
修复
FileMessage
的序列化名称 (fix: FileMessage.Delegate SerialName #2041 by @cssxsh)Image.equals
现在会比较全部属性弃用
EventDisabled
属性 (Move event implementations toEventDispatcher
and add `EventChannel… #1911)弃用
GroupEntranceAnnouncementChangeEvent
(GroupEntranceAnnouncementChangeEvent没有广播 #1873)新特性
MessageChain
实现的性能,现在在大量调用Message.plus
构造消息链也能获得与
MessageChainBuilder
相当的性能。(重写消息协议层与发送消息流程 #1997)EventChannel.asFlow
获得事件通道的Flow<...>
(Move event implementations toEventDispatcher
and add `EventChannel… #1911)EventChannel.exceptionHandler()
(为 java 添加EventChannel.exceptionHandler( <Java 友好型空返回 lambda> )
#1953)BotConfiguration.disableAccountSecretes
关闭account.secrets
优化和修复
消息
部分的消息类型的
toString
将包含更多属性,涉及:Image
MessageSource
QuoteReply
FileMessage
Image.toString
现在将包含全部属性重写消息协议层与发送消息流程 (重写消息协议层与发送消息流程 #1997)
为
ForwardMessage.BuilderNode
实现toString
事件
EventChannel
事件异常处理机制 (Move event implementations toEventDispatcher
and add `EventChannel… #1911)nextEvent
和syncFromEvent
:Event
、EventChannel
、Listener
-Dmirai.event.trace=true
启用.mirai
的问题 (mac 官方客户端发送给Bot的图片后缀均为 .mirai #1111)其他
Bot.close
的自动登出增加超时mirai-console
新特性
CommandContext
,支持在指令中获得原消息链 (Add CommandContext and support retrieving original message chain from… #2099)JSimpleCommand
和JCompositeCommand
修改CommandArgumentContext
PluginCustomCommandSender
可供插件实现CommandSender
(PluginCustomCommandSender #1964)MiraiConsole.shutdown
来优雅地关闭 Console (插件无法主动结束进程 #1959, Improve console shutdown #2016)优化和修复
插件
文档
PluginManager.getPluginDescription
不再需要插件已被加载 (自行注册插件加载器后启用插件报错 #2052)mirai-console-gradle
新特性
runConsole
启动模拟Mirai Console
实例 (在mirai-console-gradle
中提供更好的测试环境 #2056, Support launch dev console in idea #2058)优化和修复
shadowLink
打包的依赖在其他依赖也引用时无效的问题 (shadowLink 打包依赖,在其他依赖也引用时无效 #2070)This discussion was created from the release 2.12.0-RC.
Beta Was this translation helpful? Give feedback.
All reactions