If you say there was an yellow discharge and swelling, then probably its an infection. I recommend that you meet your dentist
and get examined thoroughly. don't worry, even if there is infection it can be treated. probably a different antibiotics may be required or drainage
or pus may have to be done. don't worry you'll be alright.