mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
feat(crypter): 添加语音 (#1197)
Some checks failed
打包最新版为 Docker Image / build docker (push) Has been cancelled
最新版 / Build binary CI (386, linux) (push) Has been cancelled
最新版 / Build binary CI (386, windows) (push) Has been cancelled
最新版 / Build binary CI (amd64, linux) (push) Has been cancelled
最新版 / Build binary CI (amd64, windows) (push) Has been cancelled
最新版 / Build binary CI (arm, linux) (push) Has been cancelled
最新版 / Build binary CI (arm64, linux) (push) Has been cancelled
PushLint / lint (push) Has been cancelled
Some checks failed
打包最新版为 Docker Image / build docker (push) Has been cancelled
最新版 / Build binary CI (386, linux) (push) Has been cancelled
最新版 / Build binary CI (386, windows) (push) Has been cancelled
最新版 / Build binary CI (amd64, linux) (push) Has been cancelled
最新版 / Build binary CI (amd64, windows) (push) Has been cancelled
最新版 / Build binary CI (arm, linux) (push) Has been cancelled
最新版 / Build binary CI (arm64, linux) (push) Has been cancelled
PushLint / lint (push) Has been cancelled
This commit is contained in:
parent
ac2d53352c
commit
fb090839d6
@ -2,6 +2,8 @@
|
|||||||
package crypter
|
package crypter
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/FloatTech/AnimeAPI/airecord"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
zero "github.com/wdvxdr1123/ZeroBot"
|
zero "github.com/wdvxdr1123/ZeroBot"
|
||||||
"github.com/wdvxdr1123/ZeroBot/message"
|
"github.com/wdvxdr1123/ZeroBot/message"
|
||||||
)
|
)
|
||||||
@ -10,7 +12,14 @@ import (
|
|||||||
func houEncryptHandler(ctx *zero.Ctx) {
|
func houEncryptHandler(ctx *zero.Ctx) {
|
||||||
text := ctx.State["regex_matched"].([]string)[1]
|
text := ctx.State["regex_matched"].([]string)[1]
|
||||||
result := encodeHou(text)
|
result := encodeHou(text)
|
||||||
ctx.SendChain(message.Text(result))
|
logrus.Infoln("[crypter] 回复内容:", result)
|
||||||
|
recCfg := airecord.GetConfig()
|
||||||
|
record := ctx.GetAIRecord(recCfg.ModelID, recCfg.Customgid, result)
|
||||||
|
if record != "" {
|
||||||
|
ctx.SendChain(message.Record(record))
|
||||||
|
} else {
|
||||||
|
ctx.SendChain(message.Text(result))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func houDecryptHandler(ctx *zero.Ctx) {
|
func houDecryptHandler(ctx *zero.Ctx) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user