MiraiCP

October 6, 2023 · View on GitHub

MiraiCP

API文档 · 下载 · demo

License GitHub release (latest SemVer) GitHub last commit image

中文

English

Tips~ 如有意向一起开发本项目,请联系我邮箱 ( ̄▽ ̄)"

关于MiraiCP

API文档(包含示例) · 文档库 · demo

支持的事件

这些内容可以在Config.kt看到

事件名称函数名称
机器人上线BotOnlineEvent
群聊消息GroupMessageEvent
私聊消息PrivateMessageEvent
好友申请NewFriendRequestEvent
群聊邀请GroupInviteEvent
新群成员申请MemberJoinRequestEvent
新群成员加入MemberJoinEvent
群成员离开MemberLeaveEvent
机器人加入BotJoinEvent
机器人离开BotLeaveEvent
消息撤回RecallEvent
群临时会话GroupTempMessageEvent
定时事件执行SchedulingEvent
戳一戳NugdeEvent

特性

  • C++ 17
  • 使用cmake
  • 使用jni与kt交互
  • c++ utf8编码
  • 支持termux
  • 与mirai-core同步发布(无需mah)
  • 支持3种使用方法(mcl, MiraiCP-loader 以及 MiraiCP-core)
  • [从2.7.0开始]代码集中到一个hpp文件和其他固定依赖文件,每次更新只需要更新那个文件
  • 不封装和隐藏底层实现代码,您可以自定义实现代码或通过实现代码提issue/pr

CI Test status

CI Namestatus
C++ in windows(mingw&msvc) & linux(g++)C++ Test
kotlinkotlin Test

使用声明

  1. MiraiCP是一个Mirai 的C++语言的社区SDK,基于Mirai-console和Mirai-core插件模板开发

  2. 本项目仅供学习参考,禁止用于任何商业用途(根据Mirai的AGPLv3许可协议开源)。

  3. 本项目不含有任何旨在破坏用户计算机数据和获取用户隐私的恶意代码,不含有任何跟踪、监视用户计算机功能代码,不会收集任何用户个人信息,不会泄露用户隐私。

  4. 本项目不提供任何具体功能实现,仅仅只是对项目mirai-console和mirai-core(详见mirai仓库)的二次封装。

  5. 任何单位或个人认为本项目可能涉嫌侵权,应及时提出反馈,本项目将会第一时间对违规内容给予删除等相关处理。

使用流程

startup.md

如果有其他问题,欢迎提交 issue 询问和提交 pull request 贡献

更新方式

直接拉取

可直接在模板clone下来的文件夹中git stash, git fetch, git pull, git stash pop 直接从上游拉取代码, 然后再在本项目的release中下载最新对应的jar组件和中间件替换旧的

手动替换

  1. 最新release 中下载loader/plugin的jar文件和中间件并替换

  2. 从各自的模板项目中下载 MiraiCP.hpp, MiraiCP.cpp, 替换原本的文件

调试

请参考调试文档仓库

交流方式

论坛贴: miraicp

github issue: miraicp issue

qq群: 1044565129

TODO

查看本项目的milestones里程碑

查看 issues

许可

Copyright (C) 2020-2022 Eritque arcus and contributors.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or any later version(in your opinion).

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

依赖

C++ dependencies
Dependence nameUrlAuthorLicense
JSON for modern C++https://github.com/nlohmann/jsonNiels LohmannMIT
UTF8-CPP: UTF-8 with C++ in a Portable Wayhttps://github.com/nemtrif/utfcppNemanja TrifunovicBSL-1.0
JNI HeadersNullJavaGNU General Public License version 2
Amalgamate: C++ source file amalgamationhttps://github.com/0ph1uch1/amalgamateAntares0982AGPL-3.0
PolyM is a very simple C++ message queue intended for inter-thread communicationhttps://github.com/khuttun/PolyMkhuttunMIT
Kotlin dependencies
Dependence nameUrlAuthorLicense
Jline 3https://github.com/jline/jline3Jline teamBSD-3
Miraihttps://github.com/mamoe/miraiMamoe teamAGPL-3.0
Jansihttps://github.com/fusesource/jansiFuseSource teamApache License 2.0
Mordant: Colorful styling for command-line applicationshttps://github.com/ajalt/mordantAJ AltApache License 2.0
Junit 5https://github.com/junit-team/junit5Junit teamEclipse Public License - v 2.0

Stargazers

Stargazers repo roster for @Nambers/MiraiCP