If you want to be sure go and ask Immigration. The people there are not your enemy, but that is how you act. Are you sure you're happy in Thailand, if you're so suspicious of Thai authority figures?
Your friend was unlucky to meet an Immigration officer having a crap day. No need to be scared of requesting an extention. The same IO will not be there
Please start looking at the Thai embassy site in your country. It tells you all you need to know about the visas available, according to your circumstances. Better to come back here with questions about specific detail, rather than "tell me everything I need to know"!!