title: hubot response callback called twice
body: <h2>Background</h2>
  
  <p>My team and I have been working on an automation project using hubot and vmware pyvmomi. One of the core functions I have been trying to fix is the create vm function. As a team, we determined that we want hubot to ask the user a series of questions then send a packet off to the <a href="https://github.com/EMC-Underground/vsphere-python-restapi" rel="nofollow">REST API</a> we wrote. The branch of hubot script I'm working on is found <a href="https://github.com/EMC-Underground/vsphere-commands/tree/refactor-create-vm-function" rel="nofollow">here</a>. The specific issue I'm working on is the create function is generating more responses as more vms are being created and then sending multiple packets. I've logged info about the problem in the issue tab of the repo. See the issue related to sending multiple packets.</p>
  
  <p>Looking through the issues logged with hubot's source code, I've found that other folks are also curious if hubot can be programmed to have a dialog (issue 950). So I decided to refactor the create function to allow me to contribute the dialog code back once I'm finished.</p>
  
  <h2>The problem</h2>
  
  <p>After the re-write (see the branch labeled refactor-create-vm-function), I am running into a duplicate call problem. I've posted <a href="https://github.com/EMC-Underground/vsphere-commands/issues/1" rel="nofollow">a screenshot</a> of the output when hubot responds to a create vm message.</p>
  
  <p>What I think is happening is that the function is being executed once when it's being passed and then again when it is actually responding. Not sure how to prevent the first call from happening, or if I even can prevent it. If it can't be prevented, what are suggestions about writing a hubot dialog? I'm open to both javascript and coffeescript suggestions, since hubot scripts can be either.</p>
  
  <p>Pretty new to javascript (and coffeescript for that matter), so any help would be greatly appreciated!</p>