1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-06 12:03:50 +08:00

fix vip song.

This commit is contained in:
Mrs4s 2020-10-10 17:07:56 +08:00
parent 1d7f1cc5d5
commit a72a688a62
2 changed files with 5 additions and 4 deletions

View File

@ -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",

View File

@ -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,