We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca596c1 commit dd9bd13Copy full SHA for dd9bd13
plugin/music/selecter.go
@@ -61,15 +61,17 @@ func longzhu(keyword string) message.Segment {
61
// 假设 data 是包含整个 JSON 数组的字节切片
62
results := gjson.ParseBytes(data).Array()
63
for _, result := range results {
64
+ fmt.Print(result)
65
if strings.Contains(strings.ToLower(result.Get("title").String()), strings.ToLower(keyword)) {
66
if musicURL := result.Get("full_track").String(); musicURL != "" {
67
return message.Record(musicURL)
68
}
69
70
71
72
+ results = gjson.GetBytes(data, "#.full_track").Array()
73
if len(results) > 0 {
- if musicURL := results[0].Get("full_track").String(); musicURL != "" {
74
+ if musicURL := results[0].String(); musicURL != "" {
75
76
77
0 commit comments