blog/从零开始搭建一个自动回复qq机器人.md

69 lines
1.5 KiB
Markdown
Raw Normal View History

2023-07-12 07:08:58 +00:00
---
title: 从零开始搭建一个自动回复qq机器人
tags:
- bot
- go
categories: bot
date: 2021-08-22 20:23:05
summary: 只需简单几个步骤即可搭建一个功能众多的qq机器人。
---
## 1. 下载leafBotPlugin
+ #### 打开[leafBotPlugin](https://github.com/huoxue1/leafBotPlugin/releases)
+ #### 选择最新的版本下载leafBotPlugin_windows_amd64.exe
+ #### 选择一个合适的文件夹放置该文件
+ #### 双击打开leafBotPlugin_windows_amd64.exe,在黑窗口中输入自己的机器人qq号
+ #### 会在当前目录的config目录下生成两个文件分别是congfig.json和config.yml
## 2. 下载go-cqhttp
+ #### 打开[go-cqhttp](https://github.com/Mrs4s/go-cqhttp/releases)
+ #### 选择最新版本下载go-cqhttp_windows_amd64.exe将其重命名为go-cqhttp.exe
+ #### 选择一个空文件夹放置文件将刚才生成的config,yml移动到当前文件夹
+ #### 创建一个文本文件,输入以下内容
+ ```
./go-cqhttp.exe
```
+ #### 将其重命名为start.bat双击打开文件待其出现验证码后使用手机qq进行扫码登录
+ #### 此时继续打开leafBotPlugin_windows_amd64.exe
## 3. 验证
##### 使用qq向机器人qq发送
```
/echo 123
```
###### 如果机器人回复
```
123
```
###### 证明机器人搭建成功
## 4.更多命令
[机器人帮助](https://vtsqr.xyz/leafBotPlugin/Features)
需要更多功能欢迎联系邮箱3343780376@qq.com
或直接在github提交issue
<https://github.com/huoxue1/leafBotPlugin>