From a83ae99f4f3f3956904685fb58db9de9bbeb27fc Mon Sep 17 00:00:00 2001 From: lyx0 Date: Thu, 14 Oct 2021 22:22:05 +0200 Subject: [PATCH] make commandName lowercase --- pkg/handlers/command.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/handlers/command.go b/pkg/handlers/command.go index 92bf8a9..e1c2771 100644 --- a/pkg/handlers/command.go +++ b/pkg/handlers/command.go @@ -21,7 +21,7 @@ func HandleCommand(message twitch.PrivateMessage, twitchClient *twitch.Client, u utils.CommandUsed() // commandName is the actual command name without the prefix. - commandName := strings.SplitN(message.Message, " ", 3)[0][2:] + commandName := strings.ToLower(strings.SplitN(message.Message, " ", 3)[0][2:]) // cmdParams are additional command inputs. // example: @@ -61,6 +61,9 @@ func HandleCommand(message twitch.PrivateMessage, twitchClient *twitch.Client, u case "color": commands.Color(message, twitchClient) return + case "mycolor": + commands.Color(message, twitchClient) + return } }