Considering the first nice answer of this question, for the general case of a metric space $M$, I think it suffices the $M$ to have at least two dense disjoint sets $A$ and $B$. The $A$ could play the role of $\mathbb{Q}^n$ and the other that of $\mathbb{R}^n\setminus\mathbb{Q}^n$ .The rest comes as I said like the first answer.