mirror of
https://github.com/yawaflua/Telegram.Net.git
synced 2025-12-10 12:39:32 +02:00
Create project
This commit is contained in:
14
Examples/Telegram.Examples/Program.cs
Normal file
14
Examples/Telegram.Examples/Program.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Telegram.Net;
|
||||
|
||||
var webHost = Host.CreateDefaultBuilder()
|
||||
.ConfigureServices(k =>
|
||||
{
|
||||
k.ConnectTelegram(new("YOUR-TOKEN")
|
||||
{
|
||||
errorHandler = async (client, exception, ctx) =>
|
||||
{
|
||||
await Console.Out.WriteLineAsync(exception.Message);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user