How long have you had the fish for?
How long ago did it get stuck to the filter?
Was the fish eating well before it got stuck to the filter?
Was the fish looking normal and not skinny before it got stuck?
If the answer is yes, then the fish has been injured when it was stuck and probably has internal damage.
What are you feeding it?
Offer it small (tiny) bits of live and frozen food and see if it can eat any thing. Newly hatched brineshrimp is small and nutritious and it should be able to eat them. if it can't then there is a major problem with the fish and you might think about euthanising it.