Your symptoms are more consistent with perianal abscess than thrombosed piles. As thrombosed piles usually appear as bluish painful lump, and discharge is uncommon.
Next Steps
Please get examined by a surgeon urgently. If an abscess is confirmed, incision and drainage is the definitive treatment.
Health Tips
Don’t delay the treatment as it can lead to fistula formation.