There are some great old threads on this which you might like to look at
Should I go to the party, wedding, holiday get together? And what about drink after work?
(Advice for holidays, parties, weddings, etc )
First thing is to ask yourself if you really have to go? If they are close friends they would probably understand if you thought it was a genuine risk to your sobriety. If they aren’t so close, they probably won’t be that bothered!
If you want to go though, plan what you will drink. If you have a sober friend ask to stick with them. And remember it’s OK to leave early! I found having a reason to get up in the morning helped. I know I was surprised at the amount of people that take it easy and leave early. I just never noticed cos I was busy hanging out with the other people getting shitfaced