Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

mirai-cpp v2.0.2

Compare
Choose a tag to compare
@cyanray cyanray released this 20 Jul 05:34
· 92 commits to master since this release

更新说明

改动

适配 mirai-api-http v2.0.2,支持其所有消息、事件、操作。
调整最低 C++ 标准为 C++17。
使用 pimpl 隐藏实现细节,防止第三方库带入 windows.h 等奇怪的头文件。
大部分事件、消息的头文件可以选择性引用,一定程度上减少了编译时长。
使用 std::optional 包装可能为 null 的字段。

新增

新增 LostConnection 事件。
新增 EventParsingError 事件。
新增 SessionOptions 类,用来描述如何与 mirai-api-http 建立连接。

移除

移除 Verify,改用 Connect、Disconnect、Reconnect 替代。
移除 LoopEvent 函数。
移除 class MiraiBot 的构造函数,现在 class MiraiBot 只有无参数构造函数。