When others complain

I am considered a “good listener” which really means I have listened to my friends complain. A lot. I realize I’ve done this to attempt to manipulate how they think about me & so they will like me. I am ready to be truthful and stop attempting to manipulate how they think of me. Do I just change the subject when the complaining starts happening? Do I say jokingly, “Oh, how about if we limit complaining to 5 minutes?” Any suggestions would be much appreciated.