I was startled and I slapped at it and it stung me.
Do you mean that a bee stung you?
I was startled I didn't even know what kind of a bug it was.
It is not good to fight with a bee because they can sting you. You should try to identify a bug before slapping it.
Shit, I didn't know they could do that.
Of course it can and you need to steer clear of possible bees all of the time now.