Skip to content

Commit

Permalink
fix runcode (#702)
Browse files Browse the repository at this point in the history
* fix runcode

* fix permission
  • Loading branch information
Jiang-Red committed Jul 17, 2023
1 parent f4add82 commit aaf659f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/Baidu-AIP/golang-sdk v1.1.1
github.com/FloatTech/AnimeAPI v1.6.1-0.20230409024643-f25135dee0da
github.com/FloatTech/AnimeAPI v1.6.1-0.20230716130052-ec46a05ce2d6
github.com/FloatTech/floatbox v0.0.0-20230331064925-9af336a84944
github.com/FloatTech/gg v1.1.3-0.20230226151425-6ea91286ba08
github.com/FloatTech/imgfactory v0.2.2-0.20230413152719-e101cc3606ef
Expand All @@ -24,7 +24,6 @@ require (
github.com/fumiama/go-base16384 v1.6.4
github.com/fumiama/go-registry v0.2.6
github.com/fumiama/gotracemoe v0.0.3
github.com/fumiama/imgsz v0.0.2
github.com/fumiama/jieba v0.0.0-20221203025406-36c17a10b565
github.com/fumiama/unibase2n v0.0.0-20221020155353-02876e777430
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
Expand Down Expand Up @@ -52,6 +51,7 @@ require (
github.com/faiface/beep v1.1.0 // indirect
github.com/fumiama/go-simple-protobuf v0.1.0 // indirect
github.com/fumiama/gofastTEA v0.0.10 // indirect
github.com/fumiama/imgsz v0.0.2 // indirect
github.com/gabriel-vasile/mimetype v1.0.4 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/Baidu-AIP/golang-sdk v1.1.1 h1:RQsAmgDSAkiq22I6n7XJ2t3afgzFeqjY46FGhv
github.com/Baidu-AIP/golang-sdk v1.1.1/go.mod h1:bXnGw7xPeKt8aF7UCELKrV6UZ/46spItONK1RQBQj1Y=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/FloatTech/AnimeAPI v1.6.1-0.20230409024643-f25135dee0da h1:QyH0zpWt3YspNNfZ+5f8+QStvtmxrzld/DoocKjF+rc=
github.com/FloatTech/AnimeAPI v1.6.1-0.20230409024643-f25135dee0da/go.mod h1:UnCPjtpIzpNBZ02yeGYp+oYVxgoi5aF2yAK2bkOVxtI=
github.com/FloatTech/AnimeAPI v1.6.1-0.20230716130052-ec46a05ce2d6 h1:dNexfRJ51d2s8mVNNlZ/9wRR12Uu75oikd51ayYxWOI=
github.com/FloatTech/AnimeAPI v1.6.1-0.20230716130052-ec46a05ce2d6/go.mod h1:fWJ5hx1ggDmLyLldO53Go97zc1JpWnDpsC5qeTOcaVw=
github.com/FloatTech/floatbox v0.0.0-20230331064925-9af336a84944 h1:/eQoMa6Aj3coF5F7yhzZe1+SzX6SItul7MW8//pl18o=
github.com/FloatTech/floatbox v0.0.0-20230331064925-9af336a84944/go.mod h1:FwQm6wk+b4wuW54KCKn3zccMX47Q5apnHD/Yakzv0fI=
github.com/FloatTech/gg v1.1.3-0.20230226151425-6ea91286ba08 h1:dPLeoiTVSBlgls+66EB/UJ2e38BaASmBN5nANaycSBU=
Expand Down
4 changes: 2 additions & 2 deletions plugin/runcode/code_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]{
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit aaf659f

Please sign in to comment.