Skip to content

Commit

Permalink
🎨 改进代码样式
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 20, 2021
1 parent e812d2a commit d6f1113
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
7 changes: 4 additions & 3 deletions plugin_vtb_quotation/cron.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
13 changes: 7 additions & 6 deletions plugin_vtb_quotation/firstVtb/firstVtb.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -70,7 +72,6 @@ func DealVtbListStr(vtbListStr string) []string {
})
}
uidList = append(uidList, fc.FirstCategoryUid)

}

log.Println(uidList)
Expand Down
14 changes: 7 additions & 7 deletions plugin_vtb_quotation/secondVtb/secondVtb.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -38,7 +40,6 @@ func GetVtbStr(uid string) string {
}
log.Println(vtbListStr)
return vtbListStr

}

func DealVtbStr(vtbStr, uid string) {
Expand Down Expand Up @@ -104,5 +105,4 @@ func DealVtbStr(vtbStr, uid string) {
}
}
}

}
20 changes: 9 additions & 11 deletions plugin_vtb_quotation/vtb_quotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -124,7 +124,6 @@ func init() {
cancel()
return
}

}
}
case <-time.After(time.Second * 60):
Expand Down Expand Up @@ -156,6 +155,5 @@ func init() {
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("请欣赏"+fc.FirstCategoryName+"的《"+tc.ThirdCategoryName+"》"))
ctx.SendChain(message.Record(recordUrl))
}

})
}

0 comments on commit d6f1113

Please sign in to comment.