move runCommand function to chat-commands.js