mirror of
https://github.com/yawaflua/Telegram.Net.git
synced 2025-12-10 04:29:28 +02:00
Create tests and fix attributes
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Telegram.Net;
|
||||
|
||||
var webHost = Host.CreateDefaultBuilder()
|
||||
.ConfigureLogging(l => l.ClearProviders().AddConsole())
|
||||
.ConfigureServices(k =>
|
||||
{
|
||||
k.ConnectTelegram(new("YOUR-TOKEN")
|
||||
k.ConnectTelegram(new("TOKEN")
|
||||
{
|
||||
errorHandler = async (client, exception, ctx) =>
|
||||
{
|
||||
await Console.Out.WriteLineAsync(exception.Message);
|
||||
Console.WriteLine(exception);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
webHost.Build().Run();
|
||||
@@ -5,7 +5,7 @@ using Telegram.Net.Interfaces;
|
||||
|
||||
namespace Telegram.Examples.UpdatePolling;
|
||||
|
||||
public class Update : IUpdatePollingSerivce
|
||||
public class Update : IUpdatePollingService
|
||||
{
|
||||
[Update]
|
||||
public async Task UpdateExample(ITelegramBotClient client, Bot.Types.Update update, CancellationToken ctx)
|
||||
|
||||
Reference in New Issue
Block a user