Some progress on beforeChatMessage

Commands are also in 3.0.0-dev for now. This'll help with organising the
main script.