I had pretty bad swelling in my knee back in college when I ended up with a slight tear in my meniscus after playing intramural basketball.
Couldn't straighten my leg for a few days because of the swelling.
I don't know the severity of your injury. I can just say in my experience that I went to the hospital, received crutches, was told to stay off my feet for a few days, and advised to take some over the counter medication for the pain.
Eventually the swelling subsided and I was able to straighten my leg. Didn't need surgery.