diff --git a/plugin/guessmusic/apiservice.go b/plugin/guessmusic/apiservice.go index 25789fc0..98617de3 100644 --- a/plugin/guessmusic/apiservice.go +++ b/plugin/guessmusic/apiservice.go @@ -259,19 +259,7 @@ func init() { listName := ctx.State["regex_matched"].([]string)[5] ctx.SendChain(message.Text("正在校验歌单信息,请稍等")) // 是否存在该歌单 - filelist, err := getlist(cfg.MusicPath) - if err != nil { - ctx.SendChain(message.Text(serviceErr, "获取歌单列表ERROR:", err)) - return - } - ok := true - for _, listinfo := range filelist { - if listName == listinfo.Name { - ok = false - break - } - } - if ok { + if file.IsNotExist(cfg.MusicPath + listName) { ctx.SendChain(message.Text("歌单不存在,是否创建?(是/否)")) next := zero.NewFutureEvent("message", 999, false, zero.OnlyGroup, zero.RegexRule(`(是|否)`), ctx.CheckSession()) recv, cancel := next.Repeat() @@ -296,12 +284,13 @@ func init() { break } } - err = os.MkdirAll(cfg.MusicPath+listName, 0755) + err := os.MkdirAll(cfg.MusicPath+listName, 0755) if err != nil { ctx.SendChain(message.Text(serviceErr, err)) return } } + ctx.SendChain(message.Text("开始下载歌曲,需要一定时间下载,请稍等")) listID, err := strconv.ParseInt(keyword, 10, 64) if err == nil { err = downloadlist(listID, cfg.MusicPath+listName+"/") diff --git a/plugin/qqwife/command.go b/plugin/qqwife/command.go index 2e24edf8..54e015f0 100644 --- a/plugin/qqwife/command.go +++ b/plugin/qqwife/command.go @@ -471,7 +471,7 @@ func init() { fiancee := ctx.State["regex_matched"].([]string) gay, _ := strconv.ParseInt(fiancee[2]+fiancee[3], 10, 64) if gay == uid { - ctx.Send(message.ReplyWithMessage(message.At(uid), message.Text("[qqwife]你想给自己买什么礼物呢?"))) + ctx.Send(message.ReplyWithMessage(ctx.Event.MessageID, message.At(uid), message.Text("[qqwife]你想给自己买什么礼物呢?"))) return } // 获取CD @@ -504,12 +504,12 @@ func init() { // 计算钱对应的好感值 newFavor := 1 if favor > 50 { - newFavor += moneyToFavor % 10 // 礼物厌倦 + newFavor = moneyToFavor % 10 // 礼物厌倦 } else { newFavor += rand.Intn(moneyToFavor) } // 随机对方心情 - mood := rand.Intn(5) + mood := rand.Intn(2) if mood == 0 { newFavor = -newFavor } diff --git a/plugin/wenxinAI/wenxinAI.go b/plugin/wenxinAI/wenxinAI.go index bf62b5e4..a4d2e316 100644 --- a/plugin/wenxinAI/wenxinAI.go +++ b/plugin/wenxinAI/wenxinAI.go @@ -279,14 +279,14 @@ func init() { // 插件主体 "————————————————————\n" + "- 文心对联 [上联]\n" + "————————————————————\n" + - "- 文心问答 [问题]" + + "- 文心问答 [问题]\n" + "————————————————————\n" + "- 文心补全 [带“_”的填空题]\n" + "————————————————————\n" + - "- 文心自定义 [prompt]\n" + + "- 文心自定义 [prompt]\n\n" + "prompt: [问题描述] [问题类型]:[题目] [解答类型]:[解题必带内容]\n" + "指令示例:\n" + - "文心自定义 请写出下面这道题的解题过程。\\n题目:养殖场养鸭376只,养鸡的只数比鸭多258只,这个养殖场一共养鸭和鸡多少只?\\n解:\n" + + "文心自定义 请写出下面这道题的解题过程。\\n题目:养殖场养鸭376只,养鸡的只数比鸭多258只,这个养殖场一共养鸭和鸡多少只?\\n解:\n\n" + "文心自定义 1+1=?\n" + "文心自定义 歌曲名:大风车转啊转\\n歌词:", }).ApplySingle(single.New(