mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
make commandName lowercase
This commit is contained in:
parent
02f7a13e20
commit
a83ae99f4f
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue