update doc

This commit is contained in:
felinae98
2021-07-07 20:30:26 +08:00
parent ae59674c8c
commit de2a8bfd61
7 changed files with 86 additions and 17 deletions
+3 -1
View File
@@ -3,8 +3,10 @@ module.exports = {
description: 'Docs for Nonebot HK Reporter',
themeConfig: {
nav: [
{ text: '主页', link: '/' },
{ text: '部署与使用', link: '/usage/' },
{ text: '开发', link: '/dev/' }
{ text: '开发', link: '/dev/' },
{ text: 'Github', link: 'https://github.com/felinae98/nonebot-hk-reporter' }
]
}
}
+4 -1
View File
@@ -1,12 +1,15 @@
---
home: true
heroText: Nonebot HK Reporter
tagline: 全网跑到什么地方,比其他的....bot跑得还快
actionText: 快速部署
actionLink: /usage/
features:
- title: KISS
details: 作为插件可以Simple和Stupid,作为插件可以Simple和Stupid,作为Bot提供适用的功能
- title: 拓展性强
details: 可以快速的添加新的网站
details: 没有自己想要的网站?只要简单的爬虫知识就可以给它适配一个新的网站
- title: 通用,强大
details: 社交媒体?网站更新?游戏开服?只要能爬就都能推,还支持自定义过滤
footer: MIT Licensed
---
+45 -2
View File
@@ -2,6 +2,49 @@
sidebar: auto
---
# 部署和使用
本节将教你快速部署和使用一个nonebot-hk-reporter
本节将教你快速部署和使用一个nonebot-hk-reporter,如果你不知道要选择哪种部署方式,推荐使用[docker-compose](#docker-compose部署-推荐)
## 快速上手
## 部署
本项目可以作为单独的Bot使用,可以作为nonebot2的插件使用
### 作为Bot使用
额外提供自动同意超级用户的好友申请和同意超级用户的加群邀请的功能
#### docker-compose部署(推荐)
1. 在一个新的目录中下载[docker-compose.yml](https://raw.githubusercontent.com/felinae98/nonebot-hk-reporter/main/docker-compose.yml)
将其中的`<your QQ>`改成自己的QQ号
```bash
wget https://raw.githubusercontent.com/felinae98/nonebot-hk-reporter/main/docker-compose.yml
```
2. 运行配置cq-http
```bash
docker-compose run cq-http
```
通信方式选择:3: 反向 Websocket 通信
编辑`bot-data/config.yml`,更改下面字段:
```
account: # 账号相关
uin: <QQ号> # QQ账号
password: "<QQ密码>" # 密码为空时使用扫码登录
............
servers:
- ws-reverse:
universal: ws://nonebot:8080/cqhttp/ws # 将这个字段写为这个值
```
3. 登录cq-http
再次
```bash
docker-compose run cq-http
```
参考[cq-http文档](https://docs.go-cqhttp.org/faq/slider.html#%E6%96%B9%E6%A1%88a-%E8%87%AA%E8%A1%8C%E6%8A%93%E5%8C%85)
完成登录
4. 确定完成登录后,启动bot
```bash
docker-compose up -d
```
#### docker部署
#### 直接运行(不推荐)
### 作为插件使用
本部分假设大家会部署nonebot2
## 配置
## 使用