# Mukuro_Bot **Repository Path**: coldeggs/Mukuro_Bot ## Basic Information - **Project Name**: Mukuro_Bot - **Description**: Hoshimiya Mukuro是一款由PHP语言开发的基于go-cqhttp&Swoole机器人,完全运行在服务器端,易开发,易使用。星宫六喰是约会大作战登场精灵 - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-07-10 - **Last Updated**: 2022-11-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: PHP, Swoole ## README # [Mukuro_Bot使用手册] by Mukuro-l ## 引用Intervention\Image ### 提示:据目前为了获取api数据更稳定,Mukuro_Bot需要go-cqhttp的http服务器,默认端口为3366 仍处于开发状态的Mukuro_Bot将在未来以更强大能力与各位开发者相会 *** > 版本更新需知 1. 在新版之后插件返回执行结果时 不再需要return,直接调用send方法。 且send方法支持循环调用(但没有延时)。 2. 新支持的context方法能够获取触发者的下一条聊天信息。 3. 如果你的PHP没有安装所需的图像处理模块,请安装。 *** 加入QQ群 582662525 文档编写中…… 你好! 欢迎阅读本程序的使用文档 运行环境: - Linux (建议Ubuntu发行版) - PHP8 - swoole4.8 - 国内IP的服务器 - 仅在Ubuntu22.04,PHP8.1环境通过测试 - 通过amd\arm平台测试 - 在termux proot容器开发|测试
已实现
  

- [x] Swoole WebSocket Server  
- [x] Swoole Timer  
- [x] 图文合成  
- [x] 并发协程  
- [x] 自动文档  
- [x] 自动生成菜单  

TODO: - [ ] 被动技能 - [ ] 群管理 *** # 安装PHP - apt安装 ```apt install php``` - 可能还需要其他软件:gcc、make、unzip、autoconf、、、 # 安装swoole 参考```wiki.swoole.com``` # 获取gocq - wget方式获取 - 根据自己平台选择 ```wget https://github.com/Mrs4s/go-cqhttp/releases/download/v1.0.0-rc2/go-cqhttp_linux_amd64.tar.gz``` # 解压gocq ```tar -xzf go-cqhttp_linux_amd64.tar.gz``` - 打开上级目录```cd -``` # 克隆Mukuro_Bot ```git clone https://github.com/Mukuro-l/Mukuro_Bot.git``` # 配置Mukuro_Bot - 打开[Module]文件夹 - 在Config.php文件内配置 - ~~返回根目录,**在根目录执行:```unzip vendor.zip```**~~ # 启动 - 需先配置完毕,直接在Mukuro_Bot根目录```php run.php```即可 - ~~如果没有执行权限请```chmod 777 run```~~ # 一键部署脚本 - 请在root目录执行 - ~~```bash <(curl -s -S -L http://43.154.119.191/shell/install.sh)```~~ *** ## 开发 ```php msg == "测试"){ //返回调用send函数结果,支持array $this->send("OK"); } } } ?> ```