How to read messages from chat using tmi?

OK, thanks! I’ll check it out.

Is there a way to read commands from the chat into the bot? I thought that would be the main purpose of a bot. But for some reason, the client receives nothing.