mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 02:00:24 +00:00
🎨 优化 ERROR 格式
This commit is contained in:
@@ -35,12 +35,12 @@ func init() { // 插件主体
|
||||
}.Encode()
|
||||
body, err := netGet(api.String(), header)
|
||||
if err != nil {
|
||||
ctx.SendChain(message.Text("ERROR:", err))
|
||||
ctx.SendChain(message.Text("ERROR: ", err))
|
||||
}
|
||||
// 解析请求
|
||||
info := gjson.ParseBytes(body)
|
||||
if info.Get("total_count").Int() == 0 {
|
||||
ctx.SendChain(message.Text("ERROR:没有找到这样的仓库"))
|
||||
ctx.SendChain(message.Text("ERROR: 没有找到这样的仓库"))
|
||||
return
|
||||
}
|
||||
repo := info.Get("items.0")
|
||||
|
||||
Reference in New Issue
Block a user