add a couple returns

This commit is contained in:
lyx0 2021-10-14 23:05:56 +02:00
parent 3228176caf
commit f6e7a6a065

View file

@ -78,6 +78,7 @@ func HandleCommand(message twitch.PrivateMessage, twitchClient *twitch.Client, u
case "uptime": case "uptime":
if msgLen == 1 { if msgLen == 1 {
commands.Uptime(message.Channel, message.Channel, twitchClient) commands.Uptime(message.Channel, message.Channel, twitchClient)
return
} else { } else {
commands.Uptime(message.Channel, cmdParams[1], twitchClient) commands.Uptime(message.Channel, cmdParams[1], twitchClient)
return return
@ -85,14 +86,18 @@ func HandleCommand(message twitch.PrivateMessage, twitchClient *twitch.Client, u
case "godoc": case "godoc":
if msgLen == 1 { if msgLen == 1 {
twitchClient.Say(message.Channel, "Usage: ()godoc [term]") twitchClient.Say(message.Channel, "Usage: ()godoc [term]")
return
} else { } else {
commands.Godocs(message.Channel, message.Message[8:len(message.Message)], twitchClient) commands.Godocs(message.Channel, message.Message[8:len(message.Message)], twitchClient)
return
} }
case "godocs": case "godocs":
if msgLen == 1 { if msgLen == 1 {
twitchClient.Say(message.Channel, "Usage: ()godoc [term]") twitchClient.Say(message.Channel, "Usage: ()godoc [term]")
return
} else { } else {
commands.Godocs(message.Channel, message.Message[9:len(message.Message)], twitchClient) commands.Godocs(message.Channel, message.Message[9:len(message.Message)], twitchClient)
return
} }
} }