扩增文心AI的功能,修复猜歌的权限问题 (#471)

This commit is contained in:
方柳煜
2022-10-24 23:36:28 +08:00
committed by GitHub
parent 21712c6299
commit d43ea7df1d
5 changed files with 352 additions and 43 deletions

View File

@@ -165,7 +165,7 @@ func init() { // 插件主体
ctx.SendChain(message.Text(serviceErr, "ERROR:\n", err))
}
})
engine.OnRegex(`^猜歌(开启|关闭)(歌单|歌词)自动下载`).SetBlock(true).
engine.OnRegex(`^猜歌(开启|关闭)(歌单|歌词)自动下载`, zero.SuperUserPermission).SetBlock(true).
Handle(func(ctx *zero.Ctx) {
swtich := ctx.State["regex_matched"].([]string)[1]
option := ctx.State["regex_matched"].([]string)[1]