Don't try to split empty strings
This commit is contained in:
3
main.go
3
main.go
@ -258,6 +258,9 @@ func reactToMessage(reaction string) {
|
|||||||
}
|
}
|
||||||
func handleInput(g *gocui.Gui) error {
|
func handleInput(g *gocui.Gui) error {
|
||||||
inputString, _ := getInputString(g)
|
inputString, _ := getInputString(g)
|
||||||
|
if inputString == "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
command := strings.Split(inputString, " ")
|
command := strings.Split(inputString, " ")
|
||||||
|
|
||||||
switch strings.ToLower(command[0]) {
|
switch strings.ToLower(command[0]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user