am i pregnant?

so i've been on the pill and i've been taking it irregularly. i've missed a few and then double up on one day. i was just having sex with my boyfriend and brown looking discharge came out. what could this be. and i'm also going to take a pregnancy test today.