调整讲个笑话 (#210)

This commit is contained in:
莫思潋
2022-05-02 10:46:53 +08:00
committed by GitHub
parent 6150e4c736
commit 4aaf5b0779
2 changed files with 5 additions and 3 deletions

View File

@@ -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)