private async Task RemoveGoodTeamAsync(IDialogContext context, IAwaitable <string> result) { string team = await result; if (champs.DoesTeamExist(team)) { champs.RemoveTeam(team); await context.PostAsync($"{team} has been removed."); } else { await context.PostAsync($"The team {team} was not found"); } context.Wait(MessageReceived); }
private async Task Removeteam(IDialogContext context, LuisResult result) { string teamname = ""; EntityRecommendation rec; if (result.TryFindEntity("TeamName", out rec)) { teamname = rec.Entity; champs.RemoveTeam(teamname); await context.PostAsync($"we have removed{teamname}"); } else { await context.PostAsync("There is no team with that name"); } context.Wait(MessageReceived); }