mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-21 07:10:07 +08:00
✏️ 欢迎语支持换行,修正README
This commit is contained in:
parent
0568a5da10
commit
f2fdad9f5a
19
README.md
19
README.md
@ -84,7 +84,7 @@
|
|||||||
- **搜图** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_saucenao"`
|
- **搜图** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_saucenao"`
|
||||||
- [x] 以图搜图|搜索图片|以图识图[图片]
|
- [x] 以图搜图|搜索图片|以图识图[图片]
|
||||||
- [x] 搜图[P站图片ID]
|
- [x] 搜图[P站图片ID]
|
||||||
- **随机图片与AI点评** `github.com/FloatTech/ZeroBot-ACGImage`
|
- **随机图片与AI点评** `github.com/FloatTech/ZeroBot-Plugin/plugin_acgimage`
|
||||||
- [x] 随机图片(评级大于6的图将私发)
|
- [x] 随机图片(评级大于6的图将私发)
|
||||||
- [x] 直接随机(无r18检测,务必小心,仅管理可用)
|
- [x] 直接随机(无r18检测,务必小心,仅管理可用)
|
||||||
- [x] 设置随机图片网址[url]
|
- [x] 设置随机图片网址[url]
|
||||||
@ -96,7 +96,7 @@
|
|||||||
- [x] @BOT 小作文
|
- [x] @BOT 小作文
|
||||||
- [x] @BOT 发大病
|
- [x] @BOT 发大病
|
||||||
- [x] @BOT 教你一篇小作文[作文]
|
- [x] @BOT 教你一篇小作文[作文]
|
||||||
- **AIfalse** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_AIfalse"`
|
- **AIfalse** `import _ "github.com/FloatTech/ZeroBot-Plugin/plugin_ai_false"`
|
||||||
- [x] 查询计算机当前活跃度 [身体检查]
|
- [x] 查询计算机当前活跃度 [身体检查]
|
||||||
- [ ] 简易语音
|
- [ ] 简易语音
|
||||||
- [ ] 爬图合成 [@xxx]
|
- [ ] 爬图合成 [@xxx]
|
||||||
@ -116,11 +116,12 @@
|
|||||||
| [yyuueexxiinngg/cqhttp-mirai](https://github.com/yyuueexxiinngg/cqhttp-mirai) | [Mirai](https://github.com/mamoe/mirai) | yyuueexxiinngg | |
|
| [yyuueexxiinngg/cqhttp-mirai](https://github.com/yyuueexxiinngg/cqhttp-mirai) | [Mirai](https://github.com/mamoe/mirai) | yyuueexxiinngg | |
|
||||||
| [takayama-lily/onebot](https://github.com/takayama-lily/onebot) | [OICQ](https://github.com/takayama-lily/oicq) | takayama | |
|
| [takayama-lily/onebot](https://github.com/takayama-lily/onebot) | [OICQ](https://github.com/takayama-lily/oicq) | takayama | |
|
||||||
|
|
||||||
### 使用稳定版
|
### 使用稳定版/测试版
|
||||||
可以前往[Release](https://github.com/FloatTech/ZeroBot-Plugin/releases)页面下载对应系统的稳定版,默认开启全部插件。
|
> 需要将`data`目录放置到与编译好的可执行文件相同目录下才可正常执行。
|
||||||
|
可以前往[Release](https://github.com/FloatTech/ZeroBot-Plugin/releases)页面下载对应系统版本可执行文件,编译时开启了全部插件。
|
||||||
|
|
||||||
### 本地运行
|
### 本地运行
|
||||||
1. 下载安装 [Go](https://studygolang.com/dl/golang/go1.16.2.windows-amd64.msi) 环境
|
1. 下载安装 [Go](https://studygolang.com/dl) 环境
|
||||||
2. 下载本项目[压缩包](https://github.com/Yiwen-Chan/ZeroBot-Plugin/archive/master.zip),本地解压
|
2. 下载本项目[压缩包](https://github.com/Yiwen-Chan/ZeroBot-Plugin/archive/master.zip),本地解压
|
||||||
3. 编辑 main.go 文件,内容按需修改
|
3. 编辑 main.go 文件,内容按需修改
|
||||||
4. 双击 build.bat 文件 或 直接双击 run.bat 文件
|
4. 双击 build.bat 文件 或 直接双击 run.bat 文件
|
||||||
@ -138,7 +139,7 @@
|
|||||||
6. 啾咪~
|
6. 啾咪~
|
||||||
|
|
||||||
#### 本地编译/交叉编译
|
#### 本地编译/交叉编译
|
||||||
1. 下载安装 [Go](https://studygolang.com/dl/golang/go1.16.2.windows-amd64.msi) 环境
|
1. 下载安装 [Go](https://studygolang.com/dl) 环境
|
||||||
2. clone 并进入本项目,下载所需包
|
2. clone 并进入本项目,下载所需包
|
||||||
```bash
|
```bash
|
||||||
git clone --depth=1 https://github.com/FloatTech/ZeroBot-Plugin.git
|
git clone --depth=1 https://github.com/FloatTech/ZeroBot-Plugin.git
|
||||||
@ -152,11 +153,11 @@ go mod tidy
|
|||||||
4. 按照平台输入命令编译,下面举了两个不太常见的例子
|
4. 按照平台输入命令编译,下面举了两个不太常见的例子
|
||||||
```bash
|
```bash
|
||||||
# 本机平台
|
# 本机平台
|
||||||
go build -ldflags "-s -w -extldflags '-static-libgo'" -o zerobot
|
go build -ldflags "-s -w" -o zerobot
|
||||||
# armv6 Linux 平台 如树莓派 zero W
|
# armv6 Linux 平台 如树莓派 zero W
|
||||||
GOOS=linux GOARCH=arm GOARM=6 CGO_ENABLED=0 go build -ldflags "-s -w -extldflags '-static-libgo'" -o zerobot
|
GOOS=linux GOARCH=arm GOARM=6 CGO_ENABLED=0 go build -ldflags "-s -w" -o zerobot
|
||||||
# mips Linux 平台 如 路由器 wndr4300
|
# mips Linux 平台 如 路由器 wndr4300
|
||||||
GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags "-s -w -extldflags '-static-libgo'" -o zerobot
|
GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags "-s -w" -o zerobot
|
||||||
```
|
```
|
||||||
5. 运行 OneBot 框架,并同时运行本插件
|
5. 运行 OneBot 框架,并同时运行本插件
|
||||||
|
|
||||||
|
|||||||
@ -351,7 +351,7 @@ func init() { // 插件主体
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 设置欢迎语
|
// 设置欢迎语
|
||||||
zero.OnRegex(`^设置欢迎语(.*)$`, zero.OnlyGroup, zero.AdminPermission).SetBlock(true).SetPriority(40).
|
zero.OnRegex(`^设置欢迎语([\s\S]*)$`, zero.OnlyGroup, zero.AdminPermission).SetBlock(true).SetPriority(40).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
config.Welcome[uint64(ctx.Event.GroupID)] = ctx.State["regex_matched"].([]string)[1]
|
config.Welcome[uint64(ctx.Event.GroupID)] = ctx.State["regex_matched"].([]string)[1]
|
||||||
if saveConfig() == nil {
|
if saveConfig() == nil {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user