Add event parameter to handleCommand