Class TelegramBotEvents
The Telegram.Bot.Extensions.Polling.IUpdateHandler to route Telegram.Bot.ITelegramBotClient update and error events
Inheritance
System.Object
TelegramBotEvents
Implements
Telegram.Bot.Extensions.Polling.IUpdateHandler
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: TelegramModularFramework.Services
Assembly: TelegramModularFramework.dll
Syntax
public class TelegramBotEvents : IUpdateHandler
Methods
| Improve this Doc View SourceHandleErrorAsync(ITelegramBotClient, Exception, CancellationToken)
Declaration
public async Task HandleErrorAsync(ITelegramBotClient botClient, Exception exception, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Telegram.Bot.ITelegramBotClient | botClient | |
Exception | exception | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
HandleUpdateAsync(ITelegramBotClient, Update, CancellationToken)
Declaration
public async Task HandleUpdateAsync(ITelegramBotClient botClient, Update update, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Telegram.Bot.ITelegramBotClient | botClient | |
Telegram.Bot.Types.Update | update | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
Events
| Improve this Doc View SourceOnError
Declaration
public event Func<ITelegramBotClient, Exception, CancellationToken, Task>? OnError
Event Type
Type | Description |
---|---|
System.Nullable<Func<Telegram.Bot.ITelegramBotClient, Exception, CancellationToken, Task>> |
OnUpdate
Declaration
public event Func<ITelegramBotClient, Update, CancellationToken, Task>? OnUpdate
Event Type
Type | Description |
---|---|
System.Nullable<Func<Telegram.Bot.ITelegramBotClient, Telegram.Bot.Types.Update, CancellationToken, Task>> |
Implements
Telegram.Bot.Extensions.Polling.IUpdateHandler