make commandName lowercase

This commit is contained in:
lyx0 2021-10-14 22:22:05 +02:00
parent 02f7a13e20
commit a83ae99f4f

View file

@ -21,7 +21,7 @@ func HandleCommand(message twitch.PrivateMessage, twitchClient *twitch.Client, u
utils.CommandUsed() utils.CommandUsed()
// commandName is the actual command name without the prefix. // 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. // cmdParams are additional command inputs.
// example: // example:
@ -61,6 +61,9 @@ func HandleCommand(message twitch.PrivateMessage, twitchClient *twitch.Client, u
case "color": case "color":
commands.Color(message, twitchClient) commands.Color(message, twitchClient)
return return
case "mycolor":
commands.Color(message, twitchClient)
return
} }
} }