cyanray / mirai-cpp

本项目为 mirai-api-http 的 C++ 封装,方便使用 C++ 开发基于 mirai-api-http 插件。
GNU Affero General Public License v3.0
148 stars 38 forks source link

mirai_bot.hpp不再引用所有定义和事件; #19

Closed cyanray closed 4 years ago

cyanray commented 4 years ago

简单快速的用法,引用 mirai.h 自动引入所有定义和事件:

#include <mirai.h>
using namespace Cyan;

灵活的使用方法,可以一定程度上加快编译速度(理论上):

#include <mirai_bot.hpp>
// 需要什么事件就引入什么事件:
#include <events/bot_mute_event.hpp>
#include <events/bot_unmute_event.hpp>
#include <events/bot_leave_kick.hpp>
using namespace Cyan;