From 03004d40e67a1634790ce0d31098e4ffedaf59f6 Mon Sep 17 00:00:00 2001 From: lyx0 <66651385+lyx0@users.noreply.github.com> Date: Tue, 19 Dec 2023 19:37:26 +0100 Subject: [PATCH] don't check banphrase for commands stored in the database --- cmd/nourybot/commands.go | 3 ++- cmd/nourybot/router.go | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/nourybot/commands.go b/cmd/nourybot/commands.go index acf90bb..35c4587 100644 --- a/cmd/nourybot/commands.go +++ b/cmd/nourybot/commands.go @@ -369,7 +369,8 @@ func (app *application) handleCommand(message twitch.PrivateMessage) { if err != nil { return } - reply = r + go app.SendNoBanphrase(target, r) + return } if reply != "" { go app.Send(target, reply, message) diff --git a/cmd/nourybot/router.go b/cmd/nourybot/router.go index a97077e..8abb4b6 100644 --- a/cmd/nourybot/router.go +++ b/cmd/nourybot/router.go @@ -29,7 +29,6 @@ func (app *application) commandsRoute(w http.ResponseWriter, r *http.Request, ps text = strings.Join(cs, "") fmt.Fprintf(w, fmt.Sprint(text)) - } func (app *application) channelCommandsRoute(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {