luciabot on NoneBot
This tutorial demonstrates how to build a QQ robot using NoneBot and gocqhttp from scratch using the non-so-strict "Model-Control-Service" architecture. After reading the guide and trying the code, the reader should be able to deploy a mini feature-rich robot that can serve on a desktop or a server.
Project is for demo only! Do not take it seriously (i.e. relying on it on production without tweaks).
The guide advances through these chapters:
- Document 1 - 搭建可以運行的機器人
- 完成最基本的 NoneBot 和 gocqhttp 的配置,并且編寫最簡單的
ping
命令
- 完成最基本的 NoneBot 和 gocqhttp 的配置,并且編寫最簡單的
- Document 2 - 編寫插件
- 調用第三方天氣 API 實現天氣功能,使用 NoneBot 的命令機制和自然語言處理器 (jieba) 當用戶詢問時將結果返回給用戶
- Document 3 - 對接第三方數據庫
- 使用 docker-compose 打包機器人和 PostgresSQL 組件。透過 Gino Model 和 Pillow 繪圖庫搭配 NoneBot 實現簽到功能
- Document 4 - 搭建消息監控
- Document 5 - 尾聲
- 初試 NoneBot 好友請求處理器;為機器人撰寫説明命令。為教程收尾
You should read The license before proceeding.
Please email or submit an issue if you have any questions regarding licenses or copyrights.
Clone the project
git clone https://github.com/Box-s-ville/luciabot && cd luciabot
Go to gocqhttp/config.yml and modify the robot's qq and password.
A docker environment is preferred. Deploying this app using docker is easy.
docker-compose build
docker-compose up
Which are exactly the same procedures described in the guide section.
The tutorial (and the dependencies of the project) goes not guarantee to be most precise or up-to-date. If any incompatibilities, errors and bugs are present, you can submit an issue or open a pull request. Help is appreciated.