mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
调整讲个笑话 (#210)
This commit is contained in:
parent
6150e4c736
commit
4aaf5b0779
@ -515,7 +515,7 @@ print("run[CQ:image,file="+j["img"]+"]")
|
||||
|
||||
`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/funny"`
|
||||
|
||||
- [x] 讲个笑话[@xxx] | 讲个笑话[qq号]
|
||||
- [x] 讲个笑话[@xxx|qq号|人名] | 夸夸[@xxx|qq号|人名]
|
||||
|
||||
</details>
|
||||
<details>
|
||||
@ -918,6 +918,8 @@ print("run[CQ:image,file="+j["img"]+"]")
|
||||
|
||||
- [x] b站推送列表
|
||||
|
||||
- 注:由于需要安装Chrome,默认注释,具体看[这里](https://www.yuque.com/xiangrikuidezhongzi/zerobot/qrwxth)
|
||||
|
||||
</details>
|
||||
|
||||
### *低优先级*
|
||||
|
||||
@ -25,11 +25,11 @@ func init() {
|
||||
en := control.Register("funny", &control.Options{
|
||||
DisableOnDefault: false,
|
||||
Help: "讲个笑话\n" +
|
||||
"- 讲个笑话[@xxx] | 讲个笑话[qq号]",
|
||||
"- 讲个笑话[@xxx|qq号|人名] | 夸夸[@xxx|qq号|人名] ",
|
||||
PublicDataFolder: "Funny",
|
||||
})
|
||||
|
||||
en.OnPrefix("讲个笑话", ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool {
|
||||
en.OnPrefixGroup([]string{"讲个笑话", "夸夸"}, ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool {
|
||||
dbpath := en.DataFolder()
|
||||
db.DBPath = dbpath + "jokes.db"
|
||||
_, err := file.GetLazyData(db.DBPath, false, true)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user