✏️ 修改错别字

This commit is contained in:
Yiwen-Chan
2021-03-29 00:19:24 +08:00
parent 996c3b20a4
commit f43d73b3e9
3 changed files with 7 additions and 8 deletions

View File

@@ -9,7 +9,6 @@ import (
)
func init() { // 插件主体
// TODO 根据PID搜图
zero.OnRegex(`^点歌(.*)$`).SetBlock(true).SetPriority(50).
Handle(func(ctx *zero.Ctx) {
music, err := utils.CloudMusic(ctx.State["regex_matched"].([]string)[1])
@@ -17,7 +16,7 @@ func init() { // 插件主体
ctx.Send(fmt.Sprintf("ERROR: %v", err))
return
}
// TODO 发送搜索结果
// 发送搜索结果
ctx.Send(
fmt.Sprintf(
"[CQ:music,type=%s,url=%s,audio=%s,title=%s,content=%s,image=%s]",

View File

@@ -16,7 +16,7 @@ func CloudMusic(name string) (music CQMusic, err error) {
client := &http.Client{}
// TODO 包装请求参数
// 包装请求参数
data := url.Values{}
data.Set("offset", "0")
data.Set("total", "true")
@@ -25,7 +25,7 @@ func CloudMusic(name string) (music CQMusic, err error) {
data.Set("s", name)
fromData := strings.NewReader(data.Encode())
// TODO 网络请求
// 网络请求
req, err := http.NewRequest("POST", api, fromData)
if err != nil {
return music, err