🎨 改进代码样式

This commit is contained in:
github-actions[bot] 2021-11-20 05:35:43 +00:00
parent e812d2a074
commit d6f1113201
4 changed files with 27 additions and 27 deletions

View File

@ -1,12 +1,13 @@
package plugin_vtb_quotation
import (
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/firstVtb"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/model"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/secondVtb"
"github.com/fumiama/cron"
log "github.com/sirupsen/logrus"
zero "github.com/wdvxdr1123/ZeroBot"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/firstVtb"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/model"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/secondVtb"
)
var (

View File

@ -1,15 +1,17 @@
package firstVtb
import (
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/model"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/utils"
"github.com/jinzhu/gorm"
log "github.com/sirupsen/logrus"
"github.com/tidwall/gjson"
"io/ioutil"
"net/http"
"strconv"
"strings"
"github.com/jinzhu/gorm"
log "github.com/sirupsen/logrus"
"github.com/tidwall/gjson"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/model"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/utils"
)
var vtbUrl = "https://vtbkeyboard.moe/api/get_vtb_list"
@ -70,7 +72,6 @@ func DealVtbListStr(vtbListStr string) []string {
})
}
uidList = append(uidList, fc.FirstCategoryUid)
}
log.Println(uidList)

View File

@ -1,15 +1,17 @@
package secondVtb
import (
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/model"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/utils"
"github.com/jinzhu/gorm"
log "github.com/sirupsen/logrus"
"github.com/tidwall/gjson"
"io/ioutil"
"net/http"
"strconv"
"strings"
"github.com/jinzhu/gorm"
log "github.com/sirupsen/logrus"
"github.com/tidwall/gjson"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/model"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/utils"
)
func GetVtbStr(uid string) string {
@ -38,7 +40,6 @@ func GetVtbStr(uid string) string {
}
log.Println(vtbListStr)
return vtbListStr
}
func DealVtbStr(vtbStr, uid string) {
@ -104,5 +105,4 @@ func DealVtbStr(vtbStr, uid string) {
}
}
}
}

View File

@ -2,18 +2,20 @@ package plugin_vtb_quotation
import (
"fmt"
"github.com/FloatTech/ZeroBot-Plugin/control"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/model"
"github.com/jinzhu/gorm"
_ "github.com/logoove/sqlite"
log "github.com/sirupsen/logrus"
zero "github.com/wdvxdr1123/ZeroBot"
"github.com/wdvxdr1123/ZeroBot/message"
"net/url"
"regexp"
"strconv"
"strings"
"time"
"github.com/jinzhu/gorm"
_ "github.com/logoove/sqlite"
log "github.com/sirupsen/logrus"
zero "github.com/wdvxdr1123/ZeroBot"
"github.com/wdvxdr1123/ZeroBot/message"
"github.com/FloatTech/ZeroBot-Plugin/control"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/model"
)
var (
@ -73,7 +75,6 @@ func init() {
ctx.SendChain(message.Reply(e.MessageID), message.Text(SecondStepMessage))
step++
}
}
} else if step == 2 {
secondIndex, err = strconv.Atoi(e.RawMessage)
@ -93,7 +94,6 @@ func init() {
ctx.SendChain(message.Reply(e.MessageID), message.Text(ThirdStepMessage))
step++
}
}
} else if step == 3 {
thirdIndex, err = strconv.Atoi(e.RawMessage)
@ -124,7 +124,6 @@ func init() {
cancel()
return
}
}
}
case <-time.After(time.Second * 60):
@ -156,6 +155,5 @@ func init() {
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("请欣赏"+fc.FirstCategoryName+"的《"+tc.ThirdCategoryName+"》"))
ctx.SendChain(message.Record(recordUrl))
}
})
}