Skip to content

Commit

Permalink
Merge branch 'FloatTech:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
shiki88 authored Sep 1, 2023
2 parents be69ede + 9676b26 commit c01c604
Show file tree
Hide file tree
Showing 68 changed files with 2,450 additions and 729 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ linters:
fast: false
enable:
- bodyclose
- depguard
#- depguard
- dogsled
- errcheck
- exportloopref
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ archives:
format: zip

nfpms:
- license: GPL 3.0
- license: AGPL 3.0
homepage: https://github.com/FloatTech/ZeroBot-Plugin
file_name_template: "zbp_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
formats:
Expand Down
141 changes: 88 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

[![go](https://goreportcard.com/badge/github.com/FloatTech/ZeroBot-Plugin?style=flat-square&logo=go)](https://goreportcard.com/badge/github.com/FloatTech/ZeroBot-Plugin)
[![onebot](https://img.shields.io/badge/onebot-v11-black?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAxQTFRF////29vbr6+vAAAAk1hCcwAAAAR0Uk5T////AEAqqfQAAAKcSURBVHja7NrbctswDATQXfD//zlpO7FlmwAWIOnOtNaTM5JwDMa8E+PNFz7g3waJ24fviyDPgfhz8fHP39cBcBL9KoJbQUxjA2iYqHL3FAnvzhL4GtVNUcoSZe6eSHizBcK5LL7dBr2AUZlev1ARRHCljzRALIEog6H3U6bCIyqIZdAT0eBuJYaGiJaHSjmkYIZd+qSGWAQnIaz2OArVnX6vrItQvbhZJtVGB5qX9wKqCMkb9W7aexfCO/rwQRBzsDIsYx4AOz0nhAtWu7bqkEQBO0Pr+Ftjt5fFCUEbm0Sbgdu8WSgJ5NgH2iu46R/o1UcBXJsFusWF/QUaz3RwJMEgngfaGGdSxJkE/Yg4lOBryBiMwvAhZrVMUUvwqU7F05b5WLaUIN4M4hRocQQRnEedgsn7TZB3UCpRrIJwQfqvGwsg18EnI2uSVNC8t+0QmMXogvbPg/xk+Mnw/6kW/rraUlvqgmFreAA09xW5t0AFlHrQZ3CsgvZm0FbHNKyBmheBKIF2cCA8A600aHPmFtRB1XvMsJAiza7LpPog0UJwccKdzw8rdf8MyN2ePYF896LC5hTzdZqxb6VNXInaupARLDNBWgI8spq4T0Qb5H4vWfPmHo8OyB1ito+AysNNz0oglj1U955sjUN9d41LnrX2D/u7eRwxyOaOpfyevCWbTgDEoilsOnu7zsKhjRCsnD/QzhdkYLBLXjiK4f3UWmcx2M7PO21CKVTH84638NTplt6JIQH0ZwCNuiWAfvuLhdrcOYPVO9eW3A67l7hZtgaY9GZo9AFc6cryjoeFBIWeU+npnk/nLE0OxCHL1eQsc1IciehjpJv5mqCsjeopaH6r15/MrxNnVhu7tmcslay2gO2Z1QfcfX0JMACG41/u0RrI9QAAAABJRU5ErkJggg==)](https://t.me/zerobotplugin)
[![zerobot](https://img.shields.io/badge/zerobot-v1.6.10-black?style=flat-square&logo=go)](https://github.com/wdvxdr1123/ZeroBot)
[![zerobot](https://img.shields.io/badge/zerobot-v1.7.4-black?style=flat-square&logo=go)](https://github.com/wdvxdr1123/ZeroBot)
[![license](https://img.shields.io/github/license/FloatTech/ZeroBot-Plugin.svg?style=flat-square&logo=gnu)](https://raw.githubusercontent.com/FloatTech/ZeroBot-Plugin/master/LICENSE)
[![tencent-qq](https://img.shields.io/badge/group-1048452984-red?style=flat-square&logo=tencent-qq)](https://jq.qq.com/?_wv=1027&k=QMb7x1mM)
[![telegram](https://img.shields.io/badge/Telegram-click%20me-informational?style=flat-square&logo=telegram)](https://t.me/zerobotplugin)
Expand All @@ -42,9 +42,10 @@
## 命令行参数
> `[]`代表是可选参数
```bash
zerobot [-h] [-n nickname] [-t token] [-u url] [-g url] [-p prefix] [-d|w] [-c|s config.json] [-l latency] [-r ringlen] [-x max process time] [qq1 qq2 qq3 ...] [&]
zerobot [-h] [-m] [-n nickname] [-t token] [-u url] [-g url] [-p prefix] [-d|w] [-c|s config.json] [-l latency] [-r ringlen] [-x max process time] [qq1 qq2 qq3 ...] [&]
```
- **-h**: 显示帮助
- **-m**: 不自动标记消息为已读
- **-n nickname**: 设置默认昵称,默认为`椛椛`
- **-t token**: 设置`AccessToken`,默认为空
- **-u url**: 设置`Url`,默认为`ws://127.0.0.1:6700`
Expand All @@ -62,27 +63,17 @@ zerobot [-h] [-n nickname] [-t token] [-u url] [-g url] [-p prefix] [-d|w] [-c|s
默认配置文件格式如下。当选择从配置文件加载时,将忽略相应命令行参数。
```json
{
"zero": {
"nickname": [
"椛椛",
"ATRI",
"atri",
"亚托莉",
"アトリ"
],
"command_prefix": "/",
"super_users": [],
"ring_len": 4096,
"latency": 233000000,
"max_process_time": 240000000000
},
"ws": [
{
"Url": "ws://127.0.0.1:6700",
"AccessToken": ""
}
],
"wss": null
"zero": {
"nickname": ["椛椛", "ATRI", "atri", "亚托莉", "アトリ"],
"command_prefix": "/",
"super_users": [],
"ring_len": 4096,
"latency": 233000000,
"max_process_time": 240000000000,
"mark_message": true
},
"ws": [{ "Url": "ws://127.0.0.1:6700", "AccessToken": "" }],
"wss": null
}
```

Expand Down Expand Up @@ -436,11 +427,11 @@ print("run[CQ:image,file="+j["img"]+"]")

</details>
<details>
<summary>百度一下</summary>
<summary>百科</summary>

`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/baidu"`

- [x] 百度下[xxx]
- [x] 百度/百科/维基/wiki[xxx]

</details>
<details>
Expand Down Expand Up @@ -559,7 +550,7 @@ print("run[CQ:image,file="+j["img"]+"]")

- [x] b站推送列表

- [x] 拉取b站推送 (使用job执行定时任务------记录在"@every 10s"触发的指令)
- [x] 拉取b站推送 (使用job执行定时任务------记录在"@every 5m"触发的指令)

</details>
<details>
Expand All @@ -571,14 +562,6 @@ print("run[CQ:image,file="+j["img"]+"]")

- [x] 随机书评

</details>
<details>
<summary>打断复读</summary>

`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/breakrepeat"`

- [x] (打断三次以上的复读)

</details>
<details>
<summary>藏头诗</summary>
Expand Down Expand Up @@ -659,6 +642,16 @@ print("run[CQ:image,file="+j["img"]+"]")

- [x] 教你一篇小作文[作文]

</details>
<details>
<summary>程序员做饭指南</summary>

`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/dish"`

- [x] 怎么做 | 烹饪[菜名]

- [x] 随机菜谱 | 随便做点菜

</details>
<details>
<summary>多功能抽签</summary>
Expand Down Expand Up @@ -727,7 +720,8 @@ print("run[CQ:image,file="+j["img"]+"]")

`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/font"`

- [x] (用[终末体|终末变体|紫罗兰体|樱酥体|Consolas体|苹方体])渲染文字xxx
- [x] (用[终末体|终末变体|紫罗兰体|樱酥体|Consolas体|粗苹方体|未来荧黑体|Gugi体|八丸体|Impact体|猫啃体|苹方体])渲染(抖动)文字xxx

</details>
<details>
<summary>每日运势</summary>
Expand Down Expand Up @@ -1247,6 +1241,7 @@ print("run[CQ:image,file="+j["img"]+"]")

- [x] 签到
- [x] 获得签到背景[@xxx] | 获得签到背景
- [x] 设置签到预设(0~3)
- [x] 查看等级排名
- 注:跨群排行
- [x] 查看我的钱包
Expand Down Expand Up @@ -1279,10 +1274,26 @@ print("run[CQ:image,file="+j["img"]+"]")

- [x] 卖萌[@xxx]

- [x] 抽老婆[@xxx]
- [x] 今日老婆[@xxx]

- [x] 黄油角色[@xxx]

</details>
<details>
<summary>steam</summary>

`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/steam"`

- [x] steam[添加|删除]订阅xxxxx

- [x] steam查询订阅

- [x] steam绑定 api key xxxxxxx

- [x] 查看apikey

- [x] 拉取steam订阅 (使用job执行定时任务------记录在"@every 1m"触发的指令)

</details>
<details>
<summary>抽塔罗牌</summary>
Expand Down Expand Up @@ -1366,7 +1377,17 @@ print("run[CQ:image,file="+j["img"]+"]")

- [x] 来份网易云热评

</details>
</details>
<details>
<summary>据意查句</summary>

`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/wantquotes"`

- [x] 据意查句 大海

- [x] 登录据意查句

</details>
<details>
<summary>星际战甲</summary>

Expand Down Expand Up @@ -1443,19 +1464,11 @@ print("run[CQ:image,file="+j["img"]+"]")

</details>
<details>
<summary>月幕galgame图</summary>

`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/ymgal"`

- [x] 随机galCG
<summary>抽老婆</summary>

- [x] 随机gal表情包

- [x] galCG[xxx]

- [x] gal表情包[xxx]
`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/wife"`

- [x] 更新gal
- [x] 抽老婆

</details>
<details>
Expand Down Expand Up @@ -1504,14 +1517,19 @@ print("run[CQ:image,file="+j["img"]+"]")

</details>
<details>
<summary>词典匹配回复</summary>
<summary>月幕galgame图</summary>

`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/thesaurus"`
`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/ymgal"`

- [x] 切换[kimo|傲娇|可爱]词库
- [x] 设置词库触发概率0.x (0<x<9)
- [x] 随机galCG

- 注:由于占用资源较大,默认注释。
- [x] 随机gal表情包

- [x] galCG[xxx]

- [x] gal表情包[xxx]

- [x] 更新gal

</details>
<details>
Expand Down Expand Up @@ -1550,6 +1568,23 @@ print("run[CQ:image,file="+j["img"]+"]")

- [x] 设置 ChatGPT api key xxx

</details>
<details>
<summary>词典匹配回复</summary>

`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/thesaurus"`

- [x] 切换[kimo|傲娇|可爱]词库
- [x] 设置词库触发概率0.x (0<x<9)

</details>
<details>
<summary>打断复读</summary>

`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/breakrepeat"`

- [x] (打断三次以上的复读)

</details>

## 三种使用方法,推荐第一种
Expand Down
2 changes: 1 addition & 1 deletion console/console_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func init() {
logrus.Warnln("VT100设置失败, 将以无色模式输出")
}

err = setConsoleTitle("ZeroBot-Blugin " + banner.Version + " " + banner.Copyright)
err = setConsoleTitle("ZeroBot-Plugin " + banner.Version + " " + banner.Copyright)
if err != nil {
panic(err)
}
Expand Down
38 changes: 18 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ go 1.20

require (
github.com/Baidu-AIP/golang-sdk v1.1.1
github.com/FloatTech/AnimeAPI v1.6.1-0.20230312042320-53aa800c2c58
github.com/FloatTech/floatbox v0.0.0-20230312033609-f3826d7c8d00
github.com/FloatTech/gg v1.1.2
github.com/FloatTech/imgfactory v0.2.2-0.20230215052637-9f7b05520ca9
github.com/FloatTech/AnimeAPI v1.6.1-0.20230827161910-7e6a3d93a0ba
github.com/FloatTech/floatbox v0.0.0-20230827160415-f0865337a824
github.com/FloatTech/gg v1.1.3-0.20230226151425-6ea91286ba08
github.com/FloatTech/imgfactory v0.2.2-0.20230413152719-e101cc3606ef
github.com/FloatTech/rendercard v0.0.10-0.20230223064326-45d29fa4ede9
github.com/FloatTech/sqlite v1.5.7
github.com/FloatTech/sqlite v1.6.2
github.com/FloatTech/ttl v0.0.0-20220715042055-15612be72f5b
github.com/FloatTech/zbpctrl v1.5.3-0.20230301071613-f2c5c97cec88
github.com/FloatTech/zbputils v1.6.2-0.20230312042148-dd8632bf31f5
github.com/FloatTech/zbpctrl v1.5.3-0.20230514154630-b74e6fcca380
github.com/FloatTech/zbputils v1.6.2-0.20230728081122-94d4d957f3bf
github.com/RomiChan/syncx v0.0.0-20221202055724-5f842c53020e
github.com/RomiChan/websocket v1.4.3-0.20220227141055-9b2c6168c9c5
github.com/antchfx/htmlquery v1.2.5
Expand All @@ -21,7 +21,7 @@ require (
github.com/disintegration/imaging v1.6.2
github.com/fumiama/ahsai v0.1.0
github.com/fumiama/cron v1.3.0
github.com/fumiama/go-base16384 v1.6.4
github.com/fumiama/go-base16384 v1.7.0
github.com/fumiama/go-registry v0.2.6
github.com/fumiama/gotracemoe v0.0.3
github.com/fumiama/jieba v0.0.0-20221203025406-36c17a10b565
Expand All @@ -32,16 +32,16 @@ require (
github.com/lithammer/fuzzysearch v1.1.5
github.com/mroth/weightedrand v1.0.0
github.com/pkg/errors v0.9.1
github.com/quic-go/quic-go v0.32.0
github.com/quic-go/quic-go v0.38.1
github.com/shirou/gopsutil/v3 v3.23.1
github.com/sirupsen/logrus v1.9.0
github.com/tidwall/gjson v1.14.4
github.com/wcharczuk/go-chart/v2 v2.1.0
github.com/wdvxdr1123/ZeroBot v1.6.10
github.com/wdvxdr1123/ZeroBot v1.7.4
gitlab.com/gomidi/midi/v2 v2.0.25
golang.org/x/image v0.3.0
golang.org/x/sys v0.4.0
golang.org/x/text v0.6.0
golang.org/x/sys v0.8.0
golang.org/x/text v0.9.0
gopkg.in/yaml.v3 v3.0.1
)

Expand All @@ -54,7 +54,7 @@ require (
github.com/fumiama/imgsz v0.0.2 // indirect
github.com/gabriel-vasile/mimetype v1.0.4 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
Expand All @@ -67,14 +67,12 @@ require (
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
github.com/onsi/ginkgo/v2 v2.2.0 // indirect
github.com/onsi/ginkgo/v2 v2.9.5 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pkumza/numcn v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-18 v0.2.0 // indirect
github.com/quic-go/qtls-go1-19 v0.2.0 // indirect
github.com/quic-go/qtls-go1-20 v0.1.0 // indirect
github.com/quic-go/qtls-go1-20 v0.3.3 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
Expand All @@ -85,9 +83,9 @@ require (
golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect
golang.org/x/exp/shiny v0.0.0-20221126150942-6ab00d035af9 // indirect
golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f // indirect
golang.org/x/mod v0.6.0 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/tools v0.2.0 // indirect
golang.org/x/mod v0.10.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/tools v0.9.1 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
modernc.org/libc v1.21.5 // indirect
modernc.org/mathutil v1.5.0 // indirect
Expand Down
Loading

0 comments on commit c01c604

Please sign in to comment.