Bayern Munich midfielder Thiago Alcantara has admitted he would have stayed at Barcelona had Pep Guardiola remained at the club.