Skip to content

LambdaYH/MigangBot_CPP

Repository files navigation

MigangBot

Codacy Badge

Based on ithewei/libhv and idealvin/cocoyaxi

父模块 子模块 模块功能 例子
Echo Echo 回声 示例
BotManage help 显示帮助信息 示例
BotManage status_info 显示系统/机器人状态 示例
BotManage feedback 用户可以给维护者发送消息,维护者也可以进行回复 示例
BotManage friend_invite 处理好友邀请事件 顾名思义
BotManage group_invite 处理入群事件 顾名思义
BotManage BandedOrKicked 处理被t和被禁言事件 顾名思义
BotManage dismiss 使用dismiss命令退群 顾名思义
TencentCloudNLP AutoSummarization 使用腾讯云NLP API进行摘要提取 示例
TencentCloudNLP KeywordsExtraction 使用腾讯云NLP API进行关键词提取 示例
EorzeaZhanbu EorzeaZhanbu 艾欧泽亚占卜 示例
BilibiliParser BilibiliParser 对群内的B站番剧/视频/直播等信息进行解析 示例
Weibo Weibo 自动推送微博,具体推送项可在configs/weibo/weibo.yml中设置 顾名思义
Weather Weather 天气查询

For User

libopencv

For Developer

Requirements

Cmake
tencentcloud-sdk-cpp

See Github Action for more Details.

Step

Debian or Ubuntu

sudo apt install git cmake build-essential default-libmysqlclient-dev libopencv-dev uuid-dev libssl-dev libcurl4-openssl-dev -y

git clone https://github.com/TencentCloud/tencentcloud-sdk-cpp.git
cd tencentcloud-sdk-cpp
mkdir build && cd build
cmake -DBUILD_SHARED_LIBS=off -DBUILD_MODULES="nlp" ..
make && sudo make install

git clone https://github.com/LambdaYH/MigangBot
cd MigangBot
git submodule update --init
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Use after build

mkdir path/to/bot/root
cp ./bin/MigangBot path/to/bot/root
cp ../resources/* path/to/bot/root -r
sudo chmod +x path/to/bot/root/MigangBot

sudo apt install mariadb-server
mysql_secure_installation
mysql -uroot
create database Your_Database_name;
CREATE USER 'Your Databse User' IDENTIFIED BY 'enter_a_password_here';
GRANT ALL ON Your_Database_name.* TO 'Your Databse User' IDENTIFIED BY 'enter_a_password_here';

sudo apt install redis-server

Todo

  • 支持配置文件
  • 实现OnebotAPI,对go-cqhttpAPI进行部分实现(以后用到了再去弄吧)
  • 添加日志
  • 添加更多功能
  • 接入mysql
  • 可以在对应功能运行中调用API获取返回内容
  • 支持汉字指令
  • 简化插件添加流程
  • 加注释
  • 支持注册各类事件
  • 加文字转图片,图片转base64
  • 实现权限控制
  • 实现only_to_me

如何添加插件

首先写一个继承自Module的类并实现其接口,该类位于modules/module_interface.h文件中。

写完后在module_list中按照样例添加即可。

About

兼容Onebot11标准的功能性QQ机器人。

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages