All Projects → cyanray → mirai-cpp-template

cyanray / mirai-cpp-template

Licence: AGPL-3.0 License
mirai-cpp-template, mirai-cpp的模板项目, 快速上手mirai-cpp。

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to mirai-cpp-template

HoshinoBot-Plugins
nonebot1 RSS、B站解析、自定义回复……
Stars: ✭ 34 (+112.5%)
Mutual labels:  mirai, qqbot
ColorMirai
一个基于mirai的机器人
Stars: ✭ 78 (+387.5%)
Mutual labels:  mirai, qqbot
FuyaoBot
A QQ bot bases on Mirai, Spring Boot, MySQL and Mybatis Plus.
Stars: ✭ 30 (+87.5%)
Mutual labels:  mirai, qqbot
Application
一个可自定义的,基于Graia和Mirai的集群管、功能、娱乐为一体的QQ插件式机器人
Stars: ✭ 55 (+243.75%)
Mutual labels:  mirai, qqbot
MShell
一个Mirai机器人插件,用来连接QQ聊天窗口和系统Shell
Stars: ✭ 23 (+43.75%)
Mutual labels:  mirai, qqbot
Mirai-Bot-Setup
Windows环境下部署qq机器人指南。A guide for building up a qqbot with Windows.
Stars: ✭ 54 (+237.5%)
Mutual labels:  mirai, qqbot
Mirai.Net
Mirai.Net是基于mirai-api-http实现的轻量级mirai社区sdk。
Stars: ✭ 132 (+725%)
Mutual labels:  mirai, qqbot
FG
基于Nonebot的QQ群机器人🤖️,特色功能是利用机器学习算法,基于每日聊天记录生成每日总结。可在酷Q/Mirai平台上运行
Stars: ✭ 74 (+362.5%)
Mutual labels:  mirai, qqbot
commspt-bot
LittleSkin Community Support QQ bot
Stars: ✭ 21 (+31.25%)
Mutual labels:  mirai, qqbot
sagiri-bot
基于Graia Ariadne和Mirai的QQ机器人 SAGIRI-BOT
Stars: ✭ 557 (+3381.25%)
Mutual labels:  mirai, qqbot
ProtobufBot
QQ机器人框架 ProtobufBot 整体介绍。看README
Stars: ✭ 45 (+181.25%)
Mutual labels:  mirai, qqbot
Black-Cat-qqbot
一个qq机器人,基于graia
Stars: ✭ 16 (+0%)
Mutual labels:  mirai, qqbot
mirai-class-notice
🥳 这是一款基于 mirai 的班级 QQ 群课程通知机器人,拥有简单的 web 管理页面,尽量实现一键安装简易操作等功能。
Stars: ✭ 25 (+56.25%)
Mutual labels:  mirai, qqbot
ABot-Graia
一个使用 Graia Ariadne 搭建的 QQ 功能性机器人。
Stars: ✭ 194 (+1112.5%)
Mutual labels:  mirai, qqbot
Go-Mirai-Client
基于MiraiGo的客户端,使用反向 websocket 收发私聊、群聊消息,消息格式类似onebot。支持多账号,很稳定
Stars: ✭ 90 (+462.5%)
Mutual labels:  mirai, qqbot
mirai-setu
一个mirai-console的简单的色图插件
Stars: ✭ 105 (+556.25%)
Mutual labels:  mirai, qqbot
WMagicBotR
基于Mirai 使用 java开发的 bot框架,在消息事件下封装了指令/权限指令 方便调用,内置公主连接/公主连结工会战功能
Stars: ✭ 40 (+150%)
Mutual labels:  mirai, qqbot
Ariadne
一个优雅且完备的 Python QQ 自动化框架,基于 Mirai API HTTP v2。 Powered by Graia Project.
Stars: ✭ 234 (+1362.5%)
Mutual labels:  mirai, qqbot
MiraiCQ
用C/C++,易语言写QQ机器人,兼容酷Q插件,支持Linux(通过Wine)
Stars: ✭ 55 (+243.75%)
Mutual labels:  mirai, qqbot
arknights-helper
mirai-console 插件开发计划
Stars: ✭ 26 (+62.5%)
Mutual labels:  qqbot

mirai-cpp-template

mirai-cpp 机器人项目模板

使用方法

使用以下指令克隆本仓库

git clone https://github.com/cyanray/mirai-cpp-template.git --recursive
cd mirai-cpp-template
# 更新 mirai-cpp 到最新
git submodule update --init --force --remote

然后使用 Visual Studio 或 Visual Studio Code 直接打开整个文件夹即可。

本模板编译目标为可执行文件,其主函数位于 src/main.cpp

头文件请添加到 include 目录中

源文件请添加到 src 目录中,并且不要忘记修改 CMakeLists.txt。(参考CMakeLists.txt中的注释进行修改)

mirai-cpp 的说明文档:使用说明

切换 mirai-cpp 版本

1. 更新到最新版 mirai-cpp

直接在 template 项目根目录执行以下指令:

# 更新 mirai-cpp 到最新
git submodule update --init --force --remote

2. 使用特定版本的 mirai-cpp

如果你目前使用的是旧版本的 mirai/mirai-console/mirai-api-http,请根据 mirai-api-http 的版本号选择对应的 mirai-cpp 版本,以保证兼容性。

例如,mirai-api-http 的版本为 1.8.4,那么请使用 mirai-cpp v1.8.4

切换方法如下:

cd mirai-cpp
git pull
git checkout v1.8.4

编译出 Linux 可执行文件、部署到服务器上

操作方法:

  1. 在 WSL 上编译出二进制可执行文件
  2. 把编译出来的二进制可执行文件复制到自己的服务器上

以下内容需要你了解 WSL (Windows Subsystem for Linux) 。

使用 Visual Studio 的 CMake 项目可以很轻松的在 WSL 上进行编译。

按照如图所示步骤,创建一个针对 WSL 平台的配置。因为我的 WSL 安装了 GCC 编译器,所以这里选择 WSL-GCC-Releas

创建WSL-GCC平台配置1

创建WSL-GCC平台配置2

之后将配置切换到刚刚创建的 WSL 平台配置,重新编译项目,编译出来的二进制文件就在 [本模板所在的目录]/out/build/WSL-Release/ 目录下了(不出意外的话,它叫做 my-qqrobot )。

把这个文件复制到你的 Linux 服务器上,可以直接运行!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].