0
是否有可能使用resumAfter
DeleteStateForUser
一個表單生成對話框後離開目前的對話框?C#BOT框架 - DeleteStateForUser在resumeafter
context.Call(searchFormDialog, this.ResumeAfterBuildSatisfactionForm);
private IForm<SatisfactionQuery> BuildSatisfactionForm()
{
OnCompletionAsyncDelegate<SatisfactionQuery> processSearch = async (context, state) =>
{
await context.PostAsync($"Thx");
};
return new FormBuilder<SatisfactionQuery>()
//.Message("")
.AddRemainingFields()
.OnCompletion(processSearch)
.Build();
}
private async Task ResumeAfterBuildSatisfactionForm(IDialogContext context, IAwaitable<SatisfactionQuery> result)
{
//but i don't have Activity here :-(
activity.GetStateClient().BotState.DeleteStateForUser(activity.ChannelId,activity.From.Id);
}
THX這麼多@EricDahlvang我解決......這項工作很好:-) – thefox
對不起@EricDahlvang你知道我怎麼能發送FormBuilder查詢與博特帳戶等context.MakeMessage()從= ChannelAccount(ID:ContextConstants.BotId,名稱:ContextConstants.BotName); ? – thefox