Skip to content

Commit 4defe23

Browse files
committed
Allow eval() for every, but only on Discord for now
1 parent f376026 commit 4defe23

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmd/gatekeeper/command.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,10 +792,14 @@ func EvalBuiltinCommand(db *sql.DB, command Command, env CommandEnvironment, con
792792
env.SendMessage(fmt.Sprintf("%s deleted %s", env.AtAuthor(), name))
793793
return
794794
case "eval":
795-
if !env.IsAuthorAdmin() {
796-
env.SendMessage(env.AtAuthor() + " only for " + env.AtAdmin())
795+
if env.AsDiscord() == nil {
796+
env.SendMessage(env.AtAuthor() + " This command only works in Discord, sorry")
797797
return
798798
}
799+
// if !env.IsAuthorAdmin() {
800+
// env.SendMessage(env.AtAuthor() + " only for " + env.AtAdmin())
801+
// return
802+
// }
799803
exprs, err := ParseAllExprs(command.Args)
800804
if err != nil {
801805
env.SendMessage(fmt.Sprintf("%s could not parse expression `%s`: %s", env.AtAuthor(), command.Args, err))

0 commit comments

Comments
 (0)