commit dfbb8bb8b6ff270875b1894cbb60e1cff4bac17e parent 57dc86ac0072796c37bb6cf4ed150fabdb2dd0b9 Author: n0tr1v <n0tr1v@protonmail.com> Date: Tue, 15 Nov 2022 13:55:07 -0500 success command for testing purpose Diffstat:
| M | pkg/web/handlers/api/v1/slashInterceptor.go | | | 11 | ++++++++++- |
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/pkg/web/handlers/api/v1/slashInterceptor.go b/pkg/web/handlers/api/v1/slashInterceptor.go @@ -72,7 +72,8 @@ func handleUserCmd(c *Command) (handled bool) { handleSha256Cmd(c) || handleSha512Cmd(c) || handleDiceCmd(c) || - handleChoiceCmd(c) + handleChoiceCmd(c) || + handleSuccessCmd(c) } func handlePrivateRoomCmd(c *Command) (handled bool) { @@ -1269,3 +1270,11 @@ func handleToggleAutocomplete(c *Command) (handled bool) { } return } + +func handleSuccessCmd(c *Command) (handled bool) { + if c.message == "/success" { + c.err = NewErrSuccess("success message") + return true + } + return +}