Sore Nipple

So, I have my nipples pierced, (been pierced since March and this is my second time having them pierced) and when I masturbate I use my phone to like stimulate my nipples because that’s how I reach my climax, anyway, my right nipple is extremely sore when I rub it sometimes and there is a cloudy discharge that comes from it sometimes. What is going on? (I also have a mirena IUD, had it for 5 months) is it the IUD?