mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-13 02:30:26 +00:00
添加签到,引入分数机制 (#101)
* feat:添加签到功能,引入分数机制 * feat:修lint * fix:加宽 * fix:修lint和加锁 * fix:解决冲突 * fix:二次判断
This commit is contained in:
@@ -20,7 +20,7 @@ import (
|
||||
|
||||
"github.com/FloatTech/ZeroBot-Plugin/control"
|
||||
aireply "github.com/FloatTech/ZeroBot-Plugin/plugin_ai_reply"
|
||||
fileutil "github.com/FloatTech/ZeroBot-Plugin/utils/file"
|
||||
"github.com/FloatTech/ZeroBot-Plugin/utils/file"
|
||||
"github.com/FloatTech/ZeroBot-Plugin/utils/web"
|
||||
)
|
||||
|
||||
@@ -57,7 +57,7 @@ func init() {
|
||||
syntPath := getSyntPath()
|
||||
fileName := getWav(textReply, syntPath, vocoderList[1], ctx.Event.UserID)
|
||||
// 回复
|
||||
ctx.SendChain(message.Record("file:///" + fileutil.BOTPATH + "/" + cachePath + fileName))
|
||||
ctx.SendChain(message.Record("file:///" + file.BOTPATH + "/" + cachePath + fileName))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ func getWav(text, syntPath, vocoder string, uid int64) (fileName string) {
|
||||
}
|
||||
defer res.Body.Close()
|
||||
data, _ := ioutil.ReadAll(res.Body)
|
||||
err = ioutil.WriteFile(cachePath+fileName, data, 0666)
|
||||
err = os.WriteFile(cachePath+fileName, data, 0666)
|
||||
if err != nil {
|
||||
log.Errorln("[mockingbird]:", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user