All I know about Diogenes is that he lived in a trash can and told Alexander to move because he was blocking the sun. What's this story you're referring to?
You may be thinking of Cleitus. The Diogenes and Alexander story usually ends with Alexander telling his entourage, "If I were not Alexander, I would be Diogenes."