Skip to content

Box-s-ville/luciabot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

luciabot on NoneBot

License Python Docker

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 命令
  • Document 2 - 編寫插件
    • 調用第三方天氣 API 實現天氣功能,使用 NoneBot 的命令機制和自然語言處理器 (jieba) 當用戶詢問時將結果返回給用戶
  • Document 3 - 對接第三方數據庫
  • Document 4 - 搭建消息監控
    • 運用 NoneBot 自帶的 Quartasyncio 編寫消息傳遞機制來實現實時更新的 HTML 監控面板。同時實現交互複雜的 tty 命令
  • Document 5 - 尾聲
    • 初試 NoneBot 好友請求處理器;為機器人撰寫説明命令。為教程收尾

Licensing

You should read The license before proceeding.

Please email or submit an issue if you have any questions regarding licenses or copyrights.

Running the project

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.

Inaccuracies

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.