microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
Samples/Samples.Echo/Program.cs
16lines · modecode
| 1 | using Microsoft.Teams.Apps.Activities; |
| 2 | using Microsoft.Teams.Plugins.AspNetCore.Extensions; |
| 3 | |
| 4 | var builder = WebApplication.CreateBuilder(); |
| 5 | |
| 6 | builder.AddTeams(); |
| 7 | var app = builder.Build(); |
| 8 | var teamsApp = app.UseTeams(); |
| 9 | |
| 10 | teamsApp.OnMessage(async context => |
| 11 | { |
| 12 | await context.Typing(); |
| 13 | await context.Send($"you said '{context.Activity.Text}'"); |
| 14 | }); |
| 15 | |
| 16 | app.Run(); |
| 17 | |