Taking unsafe medicine while breastfeeding

If I take a pill that I’m not sure is safe for breastfeeding how long after taking the pill can I breast fed again. Also should I pump and dump.