There was this cartoon episode. Something like Scooby Doo. This episode involved a villain that used old/ rusty animatronic type robots. I distinctly remember a pirate and a cowboy robot. These robots were kind of torn up and had exposed wires and mechanics. The pirate had a bandana and at one point was on some sort of raft with the cowboy after capturing the good guys... I think.
Way obscure stuff. Any help?