Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
go-cqhttp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
go-cqhttp
Commits
4c658596
Commit
4c658596
authored
Sep 03, 2020
by
scjtqs
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Mrs4s/go-cqhttp
# Conflicts: # coolq/cqcode.go
parents
3bd557d7
0100b85f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
coolq/cqcode.go
coolq/cqcode.go
+5
-1
No files found.
coolq/cqcode.go
View file @
4c658596
...
...
@@ -464,7 +464,11 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message.
if
len
(
aid
)
<
2
{
return
nil
,
errors
.
New
(
"song error"
)
}
json
:=
fmt
.
Sprintf
(
"{
\"
app
\"
:
\"
com.tencent.structmsg
\"
,
\"
desc
\"
:
\"
音乐
\"
,
\"
meta
\"
: {
\"
music
\"
: {
\"
desc
\"
:
\"
来自MiraiGo
\"
,
\"
jumpUrl
\"
:
\"
%s
\"
,
\"
musicUrl
\"
:
\"
%s
\"
,
\"
preview
\"
:
\"
%s
\"
,
\"
tag
\"
:
\"
QQ音乐
\"
,
\"
title
\"
:
\"
%s
\"
}},
\"
prompt
\"
:
\"
[分享]%s
\"
,
\"
ver
\"
:
\"
0.0.0.1
\"
,
\"
view
\"
:
\"
music
\"
}"
,
jumpUrl
,
purl
,
preview
,
name
,
name
)
content
:=
"来自go-cqhttp"
if
d
[
"content"
]
!=
""
{
content
=
d
[
"content"
]
}
json
:=
fmt
.
Sprintf
(
"{
\"
app
\"
:
\"
com.tencent.structmsg
\"
,
\"
desc
\"
:
\"
音乐
\"
,
\"
meta
\"
: {
\"
music
\"
: {
\"
desc
\"
:
\"
%s
\"
,
\"
jumpUrl
\"
:
\"
%s
\"
,
\"
musicUrl
\"
:
\"
%s
\"
,
\"
preview
\"
:
\"
%s
\"
,
\"
tag
\"
:
\"
QQ音乐
\"
,
\"
title
\"
:
\"
%s
\"
}},
\"
prompt
\"
:
\"
[分享]%s
\"
,
\"
ver
\"
:
\"
0.0.0.1
\"
,
\"
view
\"
:
\"
music
\"
}"
,
content
,
jumpUrl
,
purl
,
preview
,
name
,
name
)
return
message
.
NewLightApp
(
json
),
nil
}
if
d
[
"type"
]
==
"163"
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment