code: func (r *EchoResponse) RespondToIntent(name dialog.Type, intent *EchoIntent, slot *EchoSlot) *EchoResponse {
  	directive := EchoDirective{Type: name}
  	if intent != nil && name == dialog.ConfirmIntent {
  		directive.IntentToConfirm = intent.Name
  	} else {
  		directive.UpdatedIntent = intent
  	}
  
  	if slot != nil {
  		if name == dialog.ElicitSlot {
  			directive.SlotToElicit = slot.Name
  		} else if name == dialog.ConfirmSlot {
  			directive.SlotToConfirm = slot.Name
  		}
  	}
  	r.Response.Directives = append(r.Response.Directives, &directive)
  	return r
  }
docs: // RespondToIntent is used to Delegate/Elicit/Confirm a dialog or an entire intent with
  // user of alexa. The func takes in name of the dialog, updated intent/intent to confirm
  // if any and optional slot value. It prepares a Echo Response to be returned.
  // Multiple directives can be returned by calling the method in chain
  // (eg. RespondToIntent(...).RespondToIntent(...), each RespondToIntent call appends the
  // data to Directives array and will return the same at the end.