I'm not sure about sentencing. But what will happen is you will have your arraignment which is where you plead guilty or not guilty, and if you need a public defender, that is the time to ask for one.
You need to have a lawyer for this. After this point, find out what evidence they have, and you can go from there. (Actually, your lawyer will look for this info.) If the only thing they have against you is the conversation earlier, then the chances of you even being convicted are slim. In fact, if that's all they have, then the judge may even decide to drop the charges.
But assuming the worst, if it did go to trial and you are found guilty, then it's really up to your lawyer as far as what will end up happening, because he/she will be able to plead that part of it for you to the judge.
So the question is this - did you actually commit the robbery or not? (You don't have to answer that openly here - just to yourself). If not, then you should be OK. If yes, then get to be good friends with your lawyer.