In general, you have for a compactly generated group $G  = \mathbb{R}^n \times \mathbb{Z}^n\times K$, with $K$ compact. And there is no way to embed $\mathbb{Z}$ discretely in something compact, see Deitmar-Echterhoff Principles of harmonic Analysis on page 96. These are a reasonably nice family of groups, because the Haarmeasure is $\sigma$ finite, if(f) the group is compactly generated, I guess (?).

For Lie type abelian group on page 97, you have  $G  = \mathbb{R}^n \times \mathbb{T}^n\times D$, with $D$ discrete abelian.

$D$ is finitely generated, iff $G$ is compactly generated.