Skip to content

Commit e2e4e34

Browse files
committed
Allow eval on Discord for everybody, but on Twitch only for admins
1 parent 4defe23 commit e2e4e34

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

cmd/gatekeeper/command.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -792,14 +792,13 @@ 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.AsDiscord() == nil {
796-
env.SendMessage(env.AtAuthor() + " This command only works in Discord, sorry")
797-
return
795+
if !env.IsAuthorAdmin() {
796+
if env.AsDiscord() == nil {
797+
env.SendMessage(env.AtAuthor() + " This command only works in Discord, sorry")
798+
return
799+
}
798800
}
799-
// if !env.IsAuthorAdmin() {
800-
// env.SendMessage(env.AtAuthor() + " only for " + env.AtAdmin())
801-
// return
802-
// }
801+
803802
exprs, err := ParseAllExprs(command.Args)
804803
if err != nil {
805804
env.SendMessage(fmt.Sprintf("%s could not parse expression `%s`: %s", env.AtAuthor(), command.Args, err))

0 commit comments

Comments
 (0)