Can anyone tell me please that if you are having an endoscopy do you have to stop taking any medication for a few days in advance?

I'm really bad with anxiety and was told that I would have to stop taking any medication before they would do an endoscopy. I'm worried that if I am sent for one I wouldn't cope for that long without medication as I'm struggling as it is trying to withdraw from my anti depressant.