-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# chattyDiaryBot | ||
|
||
## 概述 | ||
一个可以用来写日记的bot后端 | ||
支持多用户同时使用(大概) | ||
接入go-cqhttp | ||
|
||
## 部署 | ||
|
||
### 数据库 | ||
项目正常运行需要mysql和redis两个数据库 | ||
如果只是下载下来玩玩的话,可以使用docker迅速部署mysql和redis | ||
|
||
### 配置 | ||
将config/config-template.yaml改名为config.yaml,并按照文件里的提示进行配置 | ||
bot的图像搜索功能需要bing的图像搜索API,获取方法请自行搜索 | ||
|
||
### 运行 | ||
在终端进入`chattyDiaryBot`文件夹内,执行 | ||
```bash | ||
./chattyDiaryBot | ||
``` | ||
然后bot就会跑起来啦 | ||
|
||
### 使用 | ||
bot的所有功能都在私聊里面实现 | ||
- `/r num` 查询近num天的日记 | ||
- `/d xxxxxxx` 记录日记 | ||
- `/s xxxxxxx` 搜索图片并随机返回一张 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
host: #设置自身的监听端口 | ||
port: "5701" | ||
|
||
server: #设置go-cqhttp的监听端口 | ||
addr: "localhost" | ||
port: "5700" | ||
|
||
logConfig: #日志配置 | ||
logPath: "./deploy/logs" | ||
maxAge: 1 | ||
rotateTime: 3 | ||
|
||
database: #设置数据库 | ||
mysql: | ||
username: "" | ||
password: "" | ||
host: "localhost" | ||
port: "3306" | ||
dbName: "" | ||
timeout: "10s" | ||
redis: | ||
redisAddr: "localhost:6379" | ||
redisPassword: "" | ||
redisDB: 0 #0 is the default db | ||
|
||
bot: #设置bot日记提醒的时间以及bing图片搜索的APIkey | ||
remindHour: 23 | ||
bingAPIKey: "" | ||
|
||
users: #设置每日日记提醒的qq号 | ||
- 114514 | ||
- 1919810 |