The emergency pill

Sian
So I'm days away from my period and my boyfriend accidentally came during sex , I took the pill 24 hours after will it still be effective and will my period change or not come ?