mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-06 15:20:22 +00:00
update deps
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
|
||||
_ "github.com/fumiama/sqlite3" // import sql
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
_ "github.com/fumiama/sqlite3" // use sql
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
_ "github.com/fumiama/sqlite3" // import sql
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
_ "github.com/fumiama/sqlite3" // use sql
|
||||
"github.com/jinzhu/gorm"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/antchfx/htmlquery"
|
||||
_ "github.com/fumiama/sqlite3" // import sql
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user