So it was making grinding noises, and then beeping non stop, and the clothes were really wet. There was still water in the drum. I have checked the filter and there was nothing in it, and it still doesn't drain properly. Do you think it needs a new pump?
If it is a fairly modern machine, there will be a flexible (bellows) pipe connecting the drum cavity to the drain pump. If you are missing a small item from your wash (sock, hankie or similar) – then it is a fair bet that it has slipped between the drum seal and door and found its way into this pipe.
You may need to remove a panel, or tilt the machine to access the flexible pipe from the bottom opening – the pipe will be secured at either end by spring clips.
If your sink and bath are draining onto a flat roof, you need to get a plumber round to sort out the obvious bodge that someone has done. I'm not surprised your machine has failed.
Just for info- the man came over and replaced the motor of the pump and now it's okay. So the pump was worn out but he didn't have a new pump with him. He changed the motor and the weird grinding sound stopped. Hope that's it now.