It is hard to tell by your description, but your bird may have bumble foot. You need to Find an Avian Vet to examine your bird in person, there is not a way to treat this over the Internet.
Often this is caused by wooden dowel perches, that are very bad for bird's feet. We throw away the cheap perches when we get a new cage and supply some Pedicure Perches, Rope Boings and some natural wood branches.