mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-06 15:20:22 +00:00
🎨 优化 ERROR 格式
This commit is contained in:
@@ -141,7 +141,7 @@ func cloud163(keyword string) (msg message.MessageSegment) {
|
||||
requestURL := "https://music.cyrilstudio.top/search?keywords=" + url.QueryEscape(keyword)
|
||||
data, err := web.GetData(requestURL)
|
||||
if err != nil {
|
||||
msg = message.Text("ERROR:", err)
|
||||
msg = message.Text("ERROR: ", err)
|
||||
return
|
||||
}
|
||||
msg = message.Music("163", gjson.ParseBytes(data).Get("result.songs.0.id").Int())
|
||||
@@ -153,7 +153,7 @@ func qqmusic(keyword string) (msg message.MessageSegment) {
|
||||
requestURL := "https://c.y.qq.com/soso/fcgi-bin/client_search_cp?w=" + url.QueryEscape(keyword)
|
||||
data, err := web.RequestDataWith(web.NewDefaultClient(), requestURL, "GET", "", web.RandUA())
|
||||
if err != nil {
|
||||
msg = message.Text("ERROR:", err)
|
||||
msg = message.Text("ERROR: ", err)
|
||||
return
|
||||
}
|
||||
info := gjson.ParseBytes(data[9 : len(data)-1]).Get("data.song.list.0")
|
||||
|
||||
Reference in New Issue
Block a user