You want to be reading up on ON TEXT, and about the /timer command.

You might also want to read the section on User Levels, just so you don't get everybody telling the bot to do things.