mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
🎨 改进代码样式 (#569)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
faf00dfea7
commit
76e7f81a6c
@ -1,9 +1,10 @@
|
||||
package warframeapi
|
||||
|
||||
import (
|
||||
"github.com/davidscholberg/go-durationfmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/davidscholberg/go-durationfmt"
|
||||
)
|
||||
|
||||
// 游戏时间模拟
|
||||
|
||||
@ -4,6 +4,13 @@ package warframeapi
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/FloatTech/floatbox/binary"
|
||||
"github.com/FloatTech/floatbox/web"
|
||||
ctrl "github.com/FloatTech/zbpctrl"
|
||||
@ -12,12 +19,6 @@ import (
|
||||
"github.com/lithammer/fuzzysearch/fuzzy"
|
||||
zero "github.com/wdvxdr1123/ZeroBot"
|
||||
"github.com/wdvxdr1123/ZeroBot/message"
|
||||
"net/http"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -90,7 +91,6 @@ func init() {
|
||||
rt.enable = false
|
||||
rt.rwm.Unlock()
|
||||
}()
|
||||
|
||||
}
|
||||
})
|
||||
eng.OnFullMatch("警报").SetBlock(true).
|
||||
@ -113,11 +113,9 @@ func init() {
|
||||
"奖励:" + v.Mission.Reward.AsString,
|
||||
"剩余时间:" + v.Eta,
|
||||
}))
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
//TODO:订阅功能-等待重做
|
||||
// eng.OnRegex(`^(订阅|取消订阅)(.*)平原(.*)$`).SetBlock(true).
|
||||
@ -409,7 +407,6 @@ func itemNameFutureEvent(ctx *zero.Ctx, count int) int {
|
||||
ctx.SendChain(message.Text("请输入数字!(输入c结束会话)[", count, "]"))
|
||||
count--
|
||||
return itemNameFutureEvent(ctx, count)
|
||||
|
||||
}
|
||||
return num
|
||||
}
|
||||
@ -461,7 +458,6 @@ func updateWM() {
|
||||
|
||||
// 获取Warframe市场的售价表,并进行排序,cn_name为物品中文名称,onlyMaxRank表示只取最高等级的物品,返回物品售价表,物品信息,物品英文
|
||||
func wmItemOrders(cnName string, onlyMaxRank bool) (orders, itemsInSet, string, error) {
|
||||
|
||||
var wfapiio wfAPIItemsOrders
|
||||
data, err := web.RequestDataWithHeaders(&http.Client{}, fmt.Sprintf("https://api.warframe.market/v1/items/%s/orders?include=item", cnName), "GET", func(request *http.Request) error {
|
||||
request.Header.Add("Accept", "application/json")
|
||||
@ -483,7 +479,6 @@ func wmItemOrders(cnName string, onlyMaxRank bool) (orders, itemsInSet, string,
|
||||
} else if !onlyMaxRank {
|
||||
sellOrders = append(sellOrders, v)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// 对报价表进行排序,由低到高
|
||||
|
||||
Loading…
Reference in New Issue
Block a user