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:
parent
1d7f1cc5d5
commit
a72a688a62
@ -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.
|
|||||||
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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user