diff --git a/coolq/bot.go b/coolq/bot.go index b132998..cd4c84f 100644 --- a/coolq/bot.go +++ b/coolq/bot.go @@ -153,7 +153,11 @@ func (bot *CQBot) SendGroupMessage(groupId int64, m *message.SendingMessage) int return 0 } 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, SdkVersion: "0.0.0", PackageName: "com.tencent.qqmusic", diff --git a/coolq/cqcode.go b/coolq/cqcode.go index e04eff6..78eea64 100644 --- a/coolq/cqcode.go +++ b/coolq/cqcode.go @@ -449,9 +449,6 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message. if d["content"] != "" { content = d["content"] } - if purl == "" { - purl = "https://www.baidu.com" // fix vip song - } return &QQMusicElement{MusicElement: MusicElement{ Title: name, Summary: content,