mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-18 20:50:12 +08:00
fix hyaku & omikuji lazy & score (#815)
This commit is contained in:
parent
a5d2e3dfc3
commit
73b879a6f4
@ -19,7 +19,7 @@ import (
|
|||||||
"github.com/wdvxdr1123/ZeroBot/message"
|
"github.com/wdvxdr1123/ZeroBot/message"
|
||||||
)
|
)
|
||||||
|
|
||||||
const bed = "https://gitea.seku.su/fumiama/OguraHyakuninIsshu/raw/branch/master"
|
const bed = "https://gitea.seku.su/fumiama/OguraHyakuninIsshu/raw/branch/master/"
|
||||||
|
|
||||||
type line struct {
|
type line struct {
|
||||||
番号, 歌人, 上の句, 下の句, 上の句ひらがな, 下の句ひらがな string
|
番号, 歌人, 上の句, 下の句, 上の句ひらがな, 下の句ひらがな string
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import (
|
|||||||
"github.com/FloatTech/zbputils/img/text"
|
"github.com/FloatTech/zbputils/img/text"
|
||||||
)
|
)
|
||||||
|
|
||||||
const bed = "https://gitea.seku.su/fumiama/senso-ji-omikuji/raw/branch/main"
|
const bed = "https://gitea.seku.su/fumiama/senso-ji-omikuji/raw/branch/main/"
|
||||||
|
|
||||||
func init() { // 插件主体
|
func init() { // 插件主体
|
||||||
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
|
engine := control.AutoRegister(&ctrl.Options[*zero.Ctx]{
|
||||||
|
|||||||
@ -52,6 +52,7 @@ var (
|
|||||||
func init() {
|
func init() {
|
||||||
cachePath := engine.DataFolder() + "cache/"
|
cachePath := engine.DataFolder() + "cache/"
|
||||||
go func() {
|
go func() {
|
||||||
|
sdb = initialize(engine.DataFolder() + "score.db")
|
||||||
ok := file.IsExist(cachePath)
|
ok := file.IsExist(cachePath)
|
||||||
if !ok {
|
if !ok {
|
||||||
err := os.MkdirAll(cachePath, 0777)
|
err := os.MkdirAll(cachePath, 0777)
|
||||||
@ -68,7 +69,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sdb = initialize(engine.DataFolder() + "score.db")
|
|
||||||
}()
|
}()
|
||||||
engine.OnRegex(`^签到\s?(\d*)$`).Limit(ctxext.LimitByUser).SetBlock(true).Handle(func(ctx *zero.Ctx) {
|
engine.OnRegex(`^签到\s?(\d*)$`).Limit(ctxext.LimitByUser).SetBlock(true).Handle(func(ctx *zero.Ctx) {
|
||||||
// 选择key
|
// 选择key
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user