update deps

This commit is contained in:
源文雨
2022-12-02 17:54:11 +08:00
parent 11c01af9da
commit cbbae11fcd
11 changed files with 31 additions and 32 deletions

View File

@@ -5,7 +5,6 @@ import (
"github.com/FloatTech/floatbox/binary"
"github.com/FloatTech/floatbox/web"
_ "github.com/fumiama/sqlite3" // use sql
"github.com/jinzhu/gorm"
"github.com/tidwall/gjson"
)

View File

@@ -4,7 +4,6 @@ import (
"encoding/json"
"os"
_ "github.com/fumiama/sqlite3" // import sql
"github.com/jinzhu/gorm"
)

View File

@@ -4,7 +4,6 @@ import (
"fmt"
"os"
_ "github.com/fumiama/sqlite3" // use sql
"github.com/jinzhu/gorm"
)

View File

@@ -4,7 +4,6 @@ import (
"os"
"time"
_ "github.com/fumiama/sqlite3" // import sql
"github.com/jinzhu/gorm"
)

View File

@@ -4,7 +4,6 @@ import (
"os"
"time"
_ "github.com/fumiama/sqlite3" // use sql
"github.com/jinzhu/gorm"
log "github.com/sirupsen/logrus"
)

View File

@@ -34,13 +34,18 @@ func init() {
if gid == 0 {
gid = -ctx.Event.UserID
}
var err error
switch ctx.State["regex_matched"].([]string)[1] {
case "kimo":
c.SetData(gid, TYPKIMO)
err = c.SetData(gid, tKIMO)
case "傲娇":
c.SetData(gid, TYPDERE)
err = c.SetData(gid, tDERE)
case "可爱":
c.SetData(gid, TYPKAWA)
err = c.SetData(gid, tKAWA)
}
if err != nil {
ctx.SendChain(message.Text("ERROR: ", err))
return
}
})
go func() {
@@ -86,13 +91,13 @@ func init() {
}
logrus.Infoln("[thesaurus]加载", len(chatListD), "条傲娇词库", len(chatListK), "条可爱词库")
engine.OnMessage(canmatch(TYPKIMO),
engine.OnMessage(canmatch(tKIMO),
ctxext.JiebaFullMatch(seg, getmsg, chatList...),
).SetBlock(false).Handle(randreply(kimomap))
engine.OnMessage(canmatch(TYPDERE),
engine.OnMessage(canmatch(tDERE),
ctxext.JiebaFullMatch(seg, getmsg, chatListD...),
).SetBlock(false).Handle(randreply(sm.D))
engine.OnMessage(canmatch(TYPKAWA),
engine.OnMessage(canmatch(tKAWA),
ctxext.JiebaFullMatch(seg, getmsg, chatListK...),
).SetBlock(false).Handle(randreply(sm.K))
}()
@@ -130,9 +135,9 @@ func (f *mockfile) Close() error {
}
const (
TYPKIMO = iota
TYPDERE
TYPKAWA
tKIMO = iota
tDERE
tKAWA
)
func canmatch(typ int64) zero.Rule {

View File

@@ -10,7 +10,6 @@ import (
"strings"
"github.com/FloatTech/floatbox/web"
_ "github.com/fumiama/sqlite3" // import sql
"github.com/jinzhu/gorm"
log "github.com/sirupsen/logrus"
"github.com/tidwall/gjson"

View File

@@ -13,7 +13,6 @@ import (
"strings"
"time"
_ "github.com/fumiama/sqlite3" // use sql
zero "github.com/wdvxdr1123/ZeroBot"
"github.com/wdvxdr1123/ZeroBot/message"
"github.com/wdvxdr1123/ZeroBot/utils/helper"

View File

@@ -11,7 +11,6 @@ import (
"time"
"github.com/antchfx/htmlquery"
_ "github.com/fumiama/sqlite3" // import sql
"github.com/jinzhu/gorm"
)