can epilepsy cause mental disorders?

I use to have epilepsy when I was younger. I went through treatment and all.