microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
c3acedab068481dc35ed1b11e297eb2ddb432fcf

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

Samples/Samples.Echo/Program.cs

24lines · modecode

1using Microsoft.Teams.Apps.Activities;
2using Microsoft.Teams.Apps.Extensions;
3using Microsoft.Teams.Plugins.AspNetCore.DevTools.Extensions;
4using Microsoft.Teams.Plugins.AspNetCore.Extensions;
5
6var builder = WebApplication.CreateBuilder(args);
7builder.AddTeams().AddTeamsDevTools();
8var app = builder.Build();
9var teams = app.UseTeams();
10
11teams.OnActivity(async context =>
12{
13 context.Log.Info(context.AppId);
14 await context.Next();
15});
16
17teams.OnMessage(async context =>
18{
19 context.Log.Info("hit!");
20 await context.Typing();
21 await context.Send($"you said '{context.Activity.Text}'");
22});
23
24app.Run();