Not to be too pedantic, but Joy and Happiness are synonymous.
More to the point though, there's no one or right way to write a happy ending. No "template" to follow. Nor does a happy ending stop you from exploring dark themes. A happy ending can be anything from a sweet, sappy love story where the main couple live happily ever after, or a happy ending could come after a character breaks away from a troubled or abusive relationship. Happy endings can be bittersweet, or hard fought for and still be happy depending on how it's framed.
Dark themes are absolutely worth exploring and taking seriously, but you can also make beautiful art that isn't solely dark. Art, and games are art, runs the whole spectrum of human emotion and can just as easily be used to evoke discomfort, fear, rage, or disgust as it can evoke joy, sympathy, laughter or love. And if I may wax poetic a bit, the best art often blends a mix of both positive and negative emotions.
Finally, you aren't being meaningfully restricted by the requirement of having just one ending that isn't dour or negative. You're being encouraged to think about how you approach the idea of a "happy ending" and how you apply those ideas to your art.