fix runcode (#702)

* fix runcode

* fix permission
This commit is contained in:
Jiang-Red
2023-07-17 22:57:58 +08:00
committed by GitHub
parent f4add826ff
commit aaf659f6d4
3 changed files with 6 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ import (
"github.com/wdvxdr1123/ZeroBot/message"
)
var ro = runoob.NewRunOOB("b6365362a90ac2ac7098ba52c13e352b")
var ro = runoob.NewRunOOB("066417defb80d038228de76ec581a50a")
func init() {
control.Register("runcode", &ctrl.Options[*zero.Ctx]{
@@ -59,7 +59,7 @@ func init() {
} else {
// 运行成功
output = cutTooLong(strings.Trim(output, "\n"))
if israw {
if israw && zero.AdminPermission(ctx) {
ctx.SendChain(message.Text(output))
} else {
ctx.SendChain(