mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-22 08:10:09 +08:00
fix: ent->enr (#600)
This commit is contained in:
parent
f2cebcf95a
commit
e3e991e6ab
@ -64,7 +64,7 @@ func init() { // 插件主体
|
|||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("成功"))
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("成功"))
|
||||||
})
|
})
|
||||||
|
|
||||||
ent.OnRegex(`^设置\s*ChatGPT\s*api\s*key\s*(.*)$`, zero.OnlyPrivate, zero.SuperUserPermission).SetBlock(true).Handle(func(ctx *zero.Ctx) {
|
enr.OnRegex(`^设置\s*ChatGPT\s*api\s*key\s*(.*)$`, zero.OnlyPrivate, zero.SuperUserPermission).SetBlock(true).Handle(func(ctx *zero.Ctx) {
|
||||||
err := replmd.setAPIKey(ctx.State["manager"].(*ctrl.Control[*zero.Ctx]), ctx.State["regex_matched"].([]string)[1])
|
err := replmd.setAPIKey(ctx.State["manager"].(*ctrl.Control[*zero.Ctx]), ctx.State["regex_matched"].([]string)[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.SendChain(message.Text("ERROR: ", err))
|
ctx.SendChain(message.Text("ERROR: ", err))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user