I have been doing something similar, except I found some references…
https://github.com/SupremoRTD/LoyaltyBot
http [colon slash slash]sourceforge.net/projects/twitchmodbot/
LoyaltyBot being the much better code base (Though it is in node.js and can be a bit difficult to read if you are just learning to program. If you do reference ModBot, please understand the code quality is crap, and that it has tons of errors.
- Monk
Edit: Apparently I can only post one link as I am a new user, sorry about the 2nd link needing some editing to follow.