The problem with your sentence is that it's using
rather
which is a comparison, however, the rest of your sentence does not offer a comparison but a choice
something or something else
It's possible your sentence should maybe read
I'd rather listen to my parents than get in trouble. (comparison)
or
I'd better listen to my parents, or get in trouble. (choice)
or even
I'd rather listen to my parents then get in trouble. (sequencing)
Note that the citation of your example sentence has two other example sentences using the
rather ... than
construction. They also use "would rather" which might be more appropriate for your example than "had rather"
I would rather listen to my parents than get in trouble.