function delegateSlotCollection(){
console.log("current dialogState: "+this.event.request.dialogState);
if (this.event.request.dialogState === "STARTED") {
var updatedIntent=this.event.request.intent;
this.emit(":delegate", updatedIntent);
} else if (this.event.request.dialogState !== "COMPLETED") {
console.log("in not completed");
if (this.event.request.intent.slots.item.value) {
this.emit(":delegate");
}
else if(this.event.request.intent.slots.customername.value) {
let prompt = "Please Tell Me your Item name HELLO ";
let reprompt = "";
console.log("Printed");
this.emit(':elicitSlot', 'item', prompt, reprompt);
}
} else {
return this.event.request.intent;
}
}
好的找到了这个解决方案