Commit a72a688a authored by Mrs4s's avatar Mrs4s

fix vip song.

parent 1d7f1cc5
...@@ -153,7 +153,11 @@ func (bot *CQBot) SendGroupMessage(groupId int64, m *message.SendingMessage) int ...@@ -153,7 +153,11 @@ func (bot *CQBot) SendGroupMessage(groupId int64, m *message.SendingMessage) int
return 0 return 0
} }
if i, ok := elem.(*QQMusicElement); ok { if i, ok := elem.(*QQMusicElement); ok {
ret, err := bot.Client.SendGroupRichMessage(groupId, 100497308, 1, 4, client.RichClientInfo{ var msgStyle uint32 = 4
if i.MusicUrl == "" {
msgStyle = 0 // fix vip song
}
ret, err := bot.Client.SendGroupRichMessage(groupId, 100497308, 1, msgStyle, client.RichClientInfo{
Platform: 1, Platform: 1,
SdkVersion: "0.0.0", SdkVersion: "0.0.0",
PackageName: "com.tencent.qqmusic", PackageName: "com.tencent.qqmusic",
......
...@@ -449,9 +449,6 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message. ...@@ -449,9 +449,6 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message.
if d["content"] != "" { if d["content"] != "" {
content = d["content"] content = d["content"]
} }
if purl == "" {
purl = "https://www.baidu.com" // fix vip song
}
return &QQMusicElement{MusicElement: MusicElement{ return &QQMusicElement{MusicElement: MusicElement{
Title: name, Title: name,
Summary: content, Summary: content,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment