Telegram.Bots.Extensions.Polling 1.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Telegram.Bots.Extensions.Polling --version 1.1.1
                    
NuGet\Install-Package Telegram.Bots.Extensions.Polling -Version 1.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Telegram.Bots.Extensions.Polling" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Telegram.Bots.Extensions.Polling" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Telegram.Bots.Extensions.Polling" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Telegram.Bots.Extensions.Polling --version 1.1.1
                    
#r "nuget: Telegram.Bots.Extensions.Polling, 1.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Telegram.Bots.Extensions.Polling&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Telegram.Bots.Extensions.Polling&version=1.1.1
                    
Install as a Cake Tool

Telegram.Bots.Extensions.Polling

Integrate Long Polling with Telegram.Bots

Getting Started

Configuring Long Polling with Telegram.Bots
using Microsoft.Extensions.DependencyInjection;
using Telegram.Bots;

...

IServiceCollection services = ...

services.AddBotClient("<bot-token>");
services.AddPolling<UpdateHandler>();
Configuring an Update Handler
using Telegram.Bots.Extensions.Polling;
using Telegram.Bots.Requests;
using Telegram.Bots.Types;

...

public class UpdateHandler : IUpdateHandler
{
  public Task HandleAsync(IBotClient bot, Update update, CancellationToken token)
  {
    return update switch
    {
      MessageUpdate u when u.Data is TextMessage message => EchoText(message),
      EditedMessageUpdate u when u.Data is TextMessage message => EchoTextAsReply(message),
      _ => Task.CompletedTask
    };

    Task EchoText(TextMessage message) =>
      bot.HandleAsync(new SendText(message.Chat.Id, message.Text), token);

    Task EchoTextAsReply(TextMessage message) =>
      bot.HandleAsync(new SendText(message.Chat.Id, message.Text)
      {
        ReplyToMessageId = message.Id
      }, token);
  }
}

License

Telegram.Bots.Extensions.Polling is an extension for Telegram.Bots.
Copyright © 2020 Aman Agnihotri (amanagnihotri@pm.me)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with This program. If not, see GNU Licenses.


Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Telegram.Bots.Extensions.Polling:

Package Downloads
LiraSharpLib

Package Description

LiraSharp

Package Description

UMB.TelegramBot

Una sencilla interfaz para conectar telegram y enviar mensajes, imagenes o archivos

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.9.0 46,871 11/5/2022
5.8.0 1,572 11/3/2022
5.7.0 1,220 11/2/2022
5.6.0 1,554 6/12/2022
5.5.0 1,189 6/8/2022
5.4.0 1,065 6/8/2022
5.3.0 1,099 6/8/2022
5.2.0 1,032 6/8/2022
5.1.0 1,504 9/2/2021
5.0.0 1,742 6/27/2021
4.0.0 1,931 6/26/2021
2.1.0 1,355 3/21/2021
2.0.0 1,506 1/23/2021
1.1.1 1,981 11/6/2020