Update music_selecter.go

This commit is contained in:
DawnNight 2021-04-09 19:59:24 +08:00 committed by GitHub
parent b66569aaac
commit b847ddc6dc

View File

@ -5,32 +5,32 @@ import (
"encoding/hex" "encoding/hex"
"fmt" "fmt"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
zero "github.com/wdvxdr1123/ZeroBot"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
"time" "time"
zero "github.com/wdvxdr1123/ZeroBot"
) )
func init() { func init() {
zero.OnCommand("点歌").SetBlock(true).SetPriority(50).Handle(func(ctx *zero.Ctx) { zero.OnRegex("^酷我点歌(.+?)$").SetBlock(true).SetPriority(50).Handle(func(ctx *zero.Ctx) {
ctx.Send(QQMusic(ctx.State["args"].(string))) ctx.Send(KuWo(ctx.State["regex_matched"].([]string)[1]))
return return
}) })
zero.OnCommand("酷我点歌").SetBlock(true).SetPriority(50).Handle(func(ctx *zero.Ctx) { zero.OnRegex("^酷狗点歌(.+?)$").SetBlock(true).SetPriority(50).Handle(func(ctx *zero.Ctx) {
ctx.Send(KuWo(ctx.State["args"].(string))) ctx.Send(KuGou(ctx.State["regex_matched"].([]string)[1]))
return return
}) })
zero.OnCommand("酷狗点歌").SetBlock(true).SetPriority(50).Handle(func(ctx *zero.Ctx) { zero.OnRegex("^网易点歌(.+?)$").SetBlock(true).SetPriority(50).Handle(func(ctx *zero.Ctx) {
ctx.Send(KuGou(ctx.State["args"].(string))) ctx.Send(WyCloud(ctx.State["regex_matched"].([]string)[1]))
return return
}) })
zero.OnCommand("网易点歌").SetBlock(true).SetPriority(50).Handle(func(ctx *zero.Ctx) { zero.OnRegex("^点歌(.+?)$").SetBlock(true).SetPriority(50).Handle(func(ctx *zero.Ctx) {
ctx.Send(WyCloud(ctx.State["args"].(string))) ctx.Send(QQMusic(ctx.State["regex_matched"].([]string)[1]))
return return
}) })
} }