He might be a good friend, and he might be right, but for the wrong reason. If you have a vacuum leak - that means that the engine won’t get sufficient fuel for running as it should, not to mention that Your idle was poor too and the throttle cable is not involved at idle. Start with checking all vacuum hoses connected to the engine which means any hoses not containing liquid substances. Forget the throttle cable and remember that Your friend just tried to help You.
Mind you, there can be several other reasons, both cheap and expensive, that can cause your trouble, but I’ll start with a possible vacuum leak.