// ParseCommand gots input of type "/help smth" and returns a command
ParseCommand gots input of type "/help smth" and returns a command
// ParseCommand gots input of type " / help smth " and returns a command
func ParseCommand(msg *models.Message) (Command, error) {
	splitted := strings.SplitN(msg.Text, " ", 1)
	if len(splitted) == 0 {
		return nil, ErrBadInput
	}
	cmd := splitted[0]
	arg := ""
	return getCommand(cmd, arg)
}
func ParseCommand ( msg * models . Message ) ( Command , error ) { splitted := strings . SplitN ( msg . Text , " " , 1 ) if len ( splitted ) == 0 { return nil , ErrBadInput } cmd := splitted [ 0 ] arg := " " return getCommand ( cmd , arg ) }
ParseCommand gots input of type "/help smth" and returns a command
ParseCommand gots input of type " / help smth " and returns a command