diff --git a/docs/Telegrator.Hosting.Web.xml b/docs/Telegrator.Hosting.Web.xml new file mode 100644 index 0000000..b8a1e42 --- /dev/null +++ b/docs/Telegrator.Hosting.Web.xml @@ -0,0 +1,231 @@ + + + + Telegrator.Hosting.Web + + + + + Interface for Telegram bot hosts with Webhook update receiving. + Combines wbe application capabilities with reactive Telegram bot functionality. + + + + + Service for receiving updates for Hosted telegram bots via Webhooks + + + + + Initiallizes new instance of + + + + + + + + + + + + + + + + Represents a web hosted telegram bot + + + + + + + + + + + + + + Allows consumers to be notified of application lifetime events. + + + + + This application's logger + + + + + Initializes a new instance of the class. + + The proxied instance of host builder. + + + + + Creates new with default services and webhook update receiving scheme + + + + + + Creates new SLIM with default services and webhook update receiving scheme + + + + + + Creates new EMPTY WITHOUT any services or update receiving schemes + + + + + + + + + + + + + + + + + + + + + + + + Disposes the host. + + + + + Disposes the host. + + + + + Represents a web hosted telegram bots and services builder that helps manage configuration, logging, lifetime, and more. + + + + + + + + + + + + + + + + + + + + Initializes a new instance of the class. + + + + + + + Initializes a new instance of the class. + + + + + + + + Builds the host. + + + + + + Options for configuring the behavior for TelegramBotWebHost. + + + + + Disables automatic configuration for all of required instances + + + + + + + + + + + + + + + + + + + + Configuration options for Telegram bot behavior and execution settings. + Controls various aspects of bot operation including concurrency, routing, webhook receiving, and execution policies. + + + + + Gets or sets HTTPS URL to send updates to. Use an empty string to remove webhook integration + + + + + A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters. + Only characters A-Z, a-z, 0-9, _ and - are allowed. + The header is useful to ensure that the request comes from a webhook set by you. + + + + + The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. + Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. + + + + + Pass true to drop all pending updates + + + + + Contains extensions for + Provides method to configure + + + + + Replaces TelegramBotWebHostBuilder. Configures DI, options, and handlers. + + + + + Replaces the initialization logic from TelegramBotWebHost constructor. + Initializes the bot and logs handlers on application startup. + + + + + Registers service with to receive updates using webhook + + + + + + diff --git a/docs/Telegrator.Hosting.xml b/docs/Telegrator.Hosting.xml new file mode 100644 index 0000000..4a231bf --- /dev/null +++ b/docs/Telegrator.Hosting.xml @@ -0,0 +1,480 @@ + + + + Telegrator.Hosting + + + + + Interface for pre-building routines that can be executed during host construction. + Allows for custom initialization and configuration steps before the bot host is built. + + + + + Executes the pre-building routine on the specified host builder. + + The host builder to configure. + + + + Interface for Telegram bot hosts. + Combines host application capabilities with reactive Telegram bot functionality. + + + + + Interface for building Telegram bot hosts with dependency injection support. + Combines host application building capabilities with handler collection functionality. + + + + + Gets the set of key/value configuration properties. + + + + + Gets a collection of logging providers for the application to compose. This is useful for adding new logging providers. + + + + + Gets a collection of services for the application to compose. This is useful for adding user provided or framework provided services. + + + + + Abstract base class for configuring options from configuration sources. + Provides a proxy pattern for binding configuration to strongly-typed options classes. + + The type of options to configure. + + + + Configures the options using the default configuration section. + + The service collection to configure. + The configuration source. + + + + Configures the options using a named configuration section. + + The service collection to configure. + The name of the configuration section. + The configuration source. + + + + Configures the options using a named configuration section with custom binder options. + + The service collection to configure. + The name of the configuration section. + The configuration source. + Optional action to configure the binder options. + + + + Creates the actual options instance from the configuration. + + The configured options instance. + + + + Internal proxy class for configuring Telegram bot client options from configuration. + Extends ConfigureOptionsProxy to provide specific configuration for Telegram bot client options. + + + + + Gets or sets the bot token. + + + + + Gets or sets the base URL for the bot API. + + + + + Gets or sets whether to use the test environment. + + + + + Gets or sets the retry threshold in seconds. + + + + + Gets or sets the number of retry attempts. + + + + + Creates a TelegramBotClientOptions instance from the proxy configuration. + + The configured TelegramBotClientOptions instance. + + + + Implementation of that provides bot information. + Contains metadata about the Telegram bot including user details and service provider for wider filterring abilities + + + + + + + + Implementation of that provides bot information. + Contains metadata about the Telegram bot including user details and service provider for wider filterring abilities + + + + + + + + + + + Provides access to services of this Hosted telegram bot + + + + + Provides access to configuration of this Hosted telegram bot + + + + + Adapter for Microsoft.Extensions.Logging to work with Telegrator logging system. + This allows seamless integration with ASP.NET Core logging infrastructure. + + + + + Initializes a new instance of MicrosoftLoggingAdapter. + + The Microsoft.Extensions.Logging logger instance. + + + + + + + Service for receiving updates for Hosted telegram bots + + + + + + + + + + Service for receiving updates for Hosted telegram bots + + + + + + + + + + + + + + + + + + + + + + of this router + + + + + + + + + + + Default exception handler of this router + + + + + + + + + Collection class for managing handler descriptors organized by update type for host apps. + Provides functionality for collecting, adding, scanning, and organizing handlers. + + + + + List of tasks that should be completed right before building the bot + + + + + + + + + + + Pre host building task + + + + + + + + + + + + + + + List of tasks that should be completed right before building the bot + + + + + + + + + + + + + + + + + Represents a hosted telegram bot + + + + + + + + + + + This application's logger + + + + + Initializes a new instance of the class. + + The proxied instance of host builder. + + + + + Creates new with default configuration, services and long-polling update receiving scheme + + + + + + Creates new with default services and long-polling update receiving scheme + + + + + + Creates new EMPTY WITHOUT any services or update receiving schemes + + + + + + Creates new EMPTY WITHOUT any services or update receiving schemes + + + + + + + + + + + + Disposes the host. + + + + + Represents a hosted telegram bots and services builder that helps manage configuration, logging, lifetime, and more. + + + + + + + + + + + + + + + + + + + + Initializes a new instance of the class. + + + + + + + Initializes a new instance of the class. + + + + + + + + Builds the host. + + + + + + Settings os hosted Telegram bot + + + + + Settings os hosted Telegram bot + + + + + Disables automatic configuration for all of required instances + + + + + + + + + + + + + + + + + + + + + + + Replaces TelegramBotWebHostBuilder. Configures DI, options, and handlers. + + + + + Contains extensions for + Provides method to configure + + + + + Registers a configuration instance that strongly-typed will bind against using . + + + + + + + + + + Registers default services + + + + + + + Registers service with to receive updates using long polling + + + + + + + factory method + + + + + + + + Provides useful methods to adjust + + + + + Replaces the initialization logic from TelegramBotWebHost constructor. + Initializes the bot and logs handlers on application startup. + + + + + Configures bots available commands depending on what handlers was registered + + + + + + + Adds a Microsoft.Extensions.Logging adapter to Alligator using a logger factory. + + + + + + Provides extension methods for reflection and type inspection. + + + + + Checks if a type implements the interface. + + The type to check. + + True if the type implements IPreBuildingRoutine; otherwise, false. + + + diff --git a/docs/Telegrator.xml b/docs/Telegrator.xml new file mode 100644 index 0000000..221f959 --- /dev/null +++ b/docs/Telegrator.xml @@ -0,0 +1,8178 @@ + + + + Telegrator + + + + + Abstract base attribute for filtering callback-based updates. + Supports various message types including regular messages, edited messages, channel posts, and business messages. + + The filters to apply to messages + + + + Abstract base attribute for filtering callback-based updates. + Supports various message types including regular messages, edited messages, channel posts, and business messages. + + The filters to apply to messages + + + + Gets the allowed update types that this filter can process. + + + + + Extracts the message from various types of updates. + + The Telegram update + The message from the update, or null if not present + + + + Attribute for filtering 's data + + + + + + Attribute for filtering 's data + + + + + + Attribute to check if belongs to a specific message by its ID + + + + + Attribute to check if belongs to a specific message by its ID + + + + + Attribute for filtering messages based on command aliases. + Allows handlers to respond to multiple command variations using a single attribute. + + + + + Gets the allowed update types for this filter. + + + + + The description of the command (defaults to "no description provided"). + + + + + Gets the array of command aliases that this filter will match. + + + + + Gets or sets the description of the command. + Must be between 0 and 256 characters in length. + + Thrown when the description length is outside the allowed range. + + + + Initializes a new instance of the CommandAlliasAttribute with the specified command aliases. + + The command aliases to match against. + + + + Gets the filtering target (Message) from the update. + + The Telegram update. + The message from the update, or null if not present. + + + + Attribute for filtering messages where a command has arguments count >= . + + + + + + Attribute for filtering messages where a command has arguments count >= . + + + + + + Attribute for filtering messages where a command argument starts with the specified content. + + The content that the command argument should start with. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + Attribute for filtering messages where a command argument starts with the specified content. + + The content that the command argument should start with. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + Attribute for filtering messages where a command argument ends with the specified content. + + The content that the command argument should end with. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + Attribute for filtering messages where a command argument ends with the specified content. + + The content that the command argument should end with. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + Attribute for filtering messages where a command argument contains the specified content. + + The content that the command argument should contain. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + Attribute for filtering messages where a command argument contains the specified content. + + The content that the command argument should contain. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + Attribute for filtering messages where a command argument equals the specified content. + + The content that the command argument should equal. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + Attribute for filtering messages where a command argument equals the specified content. + + The content that the command argument should equal. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + Attribute for filtering messages where a command argument matches a regular expression pattern. + + The regular expression pattern to match against the command argument. + The regex options to use for the pattern matching. + The index of the argument to check (0-based). + + + + Attribute for filtering messages where a command argument matches a regular expression pattern. + + The regular expression pattern to match against the command argument. + The regex options to use for the pattern matching. + The index of the argument to check (0-based). + + + + Attribute that prevents a class from being automatically collected by the handler collection system. + When applied to a class, it will be excluded from domain-wide handler collection operations. + + + + + Abstract base attribute for filtering updates based on environment conditions. + Can process all types of updates and provides environment-specific filtering logic. + + The environment filters to apply + + + + Abstract base attribute for filtering updates based on environment conditions. + Can process all types of updates and provides environment-specific filtering logic. + + The environment filters to apply + + + + Gets the allowed update types that this filter can process. + Environment filters can process all update types. + + + + + Gets the update as the filtering target. + Environment filters work with the entire update object. + + The Telegram update + The update object itself + + + + Attribute for filtering updates that occur in debug environment. + Only allows updates when the application is running in debug mode. + + + + + Attribute for filtering updates that occur in debug environment. + Only allows updates when the application is running in debug mode. + + + + + Attribute for filtering updates that occur in release environment. + Only allows updates when the application is running in release mode. + + + + + Attribute for filtering updates that occur in release environment. + Only allows updates when the application is running in release mode. + + + + + Attribute for filtering updates based on environment variable values. + + + + + Initializes the attribute to filter based on an environment variable with a specific value and comparison method. + + The name of the environment variable + The expected value of the environment variable + The string comparison method + + + + Initializes the attribute to filter based on an environment variable with a specific value. + + The name of the environment variable + The expected value of the environment variable + + + + Initializes the attribute to filter based on the existence of an environment variable. + + The name of the environment variable + + + + Initializes the attribute to filter based on an environment variable with a specific comparison method. + + The name of the environment variable + The string comparison method + + + + Attribute for filtering messages that contain mentions. + Allows handlers to respond only to messages that mention the bot or specific users. + + + + + Initializes a new instance of the MentionedAttribute that matches any mention. + + + + + Initializes a new instance of the MentionedAttribute that matches mentions at a specific offset. + + The offset position where the mention should occur. + + + + Initializes a new instance of the MentionedAttribute that matches a specific mention. + + The specific mention text to match. + + + + Initializes a new instance of the MentionedAttribute that matches a specific mention at a specific offset. + + The specific mention text to match. + The offset position where the mention should occur. + + + + Attribute for filtering messages sent in forum chats. + + + + + Attribute for filtering messages sent in forum chats. + + + + + Attribute for filtering messages sent in a specific chat by ID. + + The chat ID to match + + + + Attribute for filtering messages sent in a specific chat by ID. + + The chat ID to match + + + + Attribute for filtering messages sent in chats of a specific type. + + + + + Initialize new instance of to filter messages from chat from specific chats + + + + + + Initialize new instance of to filter messages from chat from specific chats (with flags) + + + + + + Attribute for filtering messages based on the chat title. + + + + + Initializes the attribute to filter messages from chats with a specific title and comparison method. + + The chat title to match + The string comparison method + + + + Initializes the attribute to filter messages from chats with a specific title. + + The chat title to match + + + + Attribute for filtering messages based on the chat username. + + + + + Initializes the attribute to filter messages from chats with a specific username and comparison method. + + The chat username to match + The string comparison method + + + + Initializes the attribute to filter messages from chats with a specific username. + + The chat username to match + + + + Attribute for filtering messages based on the chat name (first name and optionally last name). + + + + + Initializes the attribute to filter messages from chats with specific first and last names. + + The first name to match + The last name to match (optional) + The string comparison method + + + + Initializes the attribute to filter messages from chats with specific first and last names. + + The first name to match + The last name to match (optional) + + + + Abstract base attribute for filtering message-based updates. + Supports various message types including regular messages, edited messages, channel posts, and business messages. + + The filters to apply to messages + + + + Abstract base attribute for filtering message-based updates. + Supports various message types including regular messages, edited messages, channel posts, and business messages. + + The filters to apply to messages + + + + Gets the allowed update types that this filter can process. + + + + + Extracts the message from various types of updates. + + The Telegram update + The message from the update, or null if not present + + + + Attribute for filtering messages based on regular expression patterns. + + + + + Initializes the attribute with a regex pattern and options. + + The regular expression pattern to match + The regex options for matching + + + + Initializes the attribute with a precompiled regex. + + The precompiled regular expression + + + + Attribute for filtering messages that contain dice throws with specific values. + + + + + Initializes the attribute to filter dice throws with a specific value. + + The dice value to match + + + + Initializes the attribute to filter dice throws with a specific type and value. + + The type of dice + The dice value to match + + + + Attribute for filtering messages that are automatically forwarded. + + + + + Attribute for filtering messages that are automatically forwarded. + + + + + Attribute for filtering messages sent while the user was offline. + + + + + Attribute for filtering messages sent while the user was offline. + + + + + Attribute for filtering service messages (e.g., user joined, left, etc.). + + + + + Attribute for filtering service messages (e.g., user joined, left, etc.). + + + + + Attribute for filtering topic messages in forum chats. + + + + + Attribute for filtering topic messages in forum chats. + + + + + Attribute for filtering messages based on their entities (mentions, links, etc.). + + + + + Initializes the attribute to filter messages with a specific entity type. + + The entity type to match + + + + Initializes the attribute to filter messages with a specific entity type at a specific position. + + The entity type to match + The starting position of the entity + The length of the entity (optional) + + + + Initializes the attribute to filter messages with a specific entity type and content. + + The entity type to match + The content that the entity should contain + The string comparison method + + + + Initializes the attribute to filter messages with a specific entity type, position, and content. + + The entity type to match + The starting position of the entity + The length of the entity (optional) + The content that the entity should contain + The string comparison method + + + + Attribute for filtering messages with reply to messages of this bot. + + + + + Attribute for filtering messages with reply to messages of this bot. + + + + + Attribute for checking message's reply chain. + + + + + Attribute for checking message's reply chain. + + + + + Helper filter class for filters that operate on replied messages. + Provides functionality to traverse reply chains and access replied message content. + + + + + + Helper filter class for filters that operate on replied messages. + Provides functionality to traverse reply chains and access replied message content. + + + + + + Attribute for filtering messages based on the sender's username. + + + + + Initializes the attribute to filter messages from a specific username. + + The username to match + + + + Initializes the attribute to filter messages from a specific username with custom comparison. + + The username to match + The string comparison method + + + + Attribute for filtering messages based on the sender's name (first name and optionally last name). + + + + + Initializes the attribute to filter messages from a user with specific first and last names. + + The first name to match + The last name to match (optional) + The string comparison method + + + + Initializes the attribute to filter messages from a user with specific first and last names. + + The first name to match + The last name to match + + + + Initializes the attribute to filter messages from a user with a specific first name. + + The first name to match + + + + Initializes the attribute to filter messages from a user with a specific first name and custom comparison. + + The first name to match + The string comparison method + + + + Attribute for filtering messages from a specific user ID. + + The user ID to match + + + + Attribute for filtering messages from a specific user ID. + + The user ID to match + + + + Attribute for filtering messages sent by not bots (users). + + + + + Attribute for filtering messages sent by not bots (users). + + + + + Attribute for filtering messages sent by bots. + + + + + Attribute for filtering messages sent by bots. + + + + + Attribute for filtering messages sent by premium users. + + + + + Attribute for filtering messages sent by premium users. + + + + + Attribute for filtering messages where the text starts with the specified content. + + The string that the message text should start with + The string comparison type + + + + Attribute for filtering messages where the text starts with the specified content. + + The string that the message text should start with + The string comparison type + + + + Attribute for filtering messages where the text ends with the specified content. + + The string that the message text should end with + The string comparison type + + + + Attribute for filtering messages where the text ends with the specified content. + + The string that the message text should end with + The string comparison type + + + + Attribute for filtering messages where the text contains the specified content. + + The string that the message text should contain + The string comparison type + + + + Attribute for filtering messages where the text contains the specified content. + + The string that the message text should contain + The string comparison type + + + + Attribute for filtering messages where the text equals the specified content. + + The string that the message text should equal + The string comparison type + + + + Attribute for filtering messages where the text equals the specified content. + + The string that the message text should equal + The string comparison type + + + + Attribute for filtering messages that contain any non-empty text. + + + + + Attribute for filtering messages that contain any non-empty text. + + + + + Attribute for filtering messages where the text contains a 'word'. + 'Word' must be a separate member of the text, and not have any alphabetic characters next to it. + + + + + + + + Attribute for filtering messages where the text contains a 'word'. + 'Word' must be a separate member of the text, and not have any alphabetic characters next to it. + + + + + + + + Attribute that says if this handler can await some of await types, that is not listed by its handler base. + Used for automatic collecting allowed to receiving 's. + If you don't use it, you won't be able to await the updates inside handler. + + + + + Update types that may be awaited + + + + + main ctor of + + + + + + Attribute for managing enum-based states in Telegram bot handlers. + Provides a convenient way to associate enum values with state management functionality. + + The enum type to be used for state management. + + + + Initializes a new instance of the EnumStateAttribute with a special state and custom key resolver. + + The special state to be managed. + The resolver for extracting keys from updates. + + + + Initializes a new instance of the EnumStateAttribute with a specific enum state and custom key resolver. + + The specific enum state to be managed. + The resolver for extracting keys from updates. + + + + Initializes a new instance of the EnumStateAttribute with a special state and default sender ID resolver. + + The special state to be managed. + + + + Initializes a new instance of the EnumStateAttribute with a specific enum state and default sender ID resolver. + + The specific enum state to be managed. + + + + Attribute for associating a handler or method with a numeric (integer) state keeper. + Provides constructors for flexible state and key resolver configuration. + + + + + Initializes the attribute with a special state and a custom key resolver. + + The special state to associate + The key resolver for state keeping + + + + Initializes the attribute with a specific numeric state and a custom key resolver. + + The integer state to associate + The key resolver for state keeping + + + + Initializes the attribute with a special state and the default sender ID resolver. + + The special state to associate + + + + Initializes the attribute with a specific numeric state and the default sender ID resolver. + + The integer state to associate + + + + Represents special states for state keeping logic. + + + + + No special state. + + + + + Indicates that no state is present. + + + + + Indicates that any state is acceptable. + + + + + Attribute for associating a handler or method with a string-based state keeper. + Provides various constructors for flexible state and key resolver configuration. + + + + + Initializes the attribute with a special state and a custom key resolver. + + The special state to associate + The key resolver for state keeping + + + + Initializes the attribute with a specific state and a custom key resolver. + + The string state to associate + The key resolver for state keeping + + + + Initializes the attribute with a special state and the default sender ID resolver. + + The special state to associate + + + + Initializes the attribute with a specific state and the default sender ID resolver. + + The string state to associate + + + + Attribute for filtering message with command "start" in bot's private chats. + Allows handlers to respond to "welcome" bot commands. + + + + + Creates new instance of + + + + + + Attribute that specifies a post-execution processor to be executed after the handler. + The processor type must implement interface. + + The type of the post-processor that implements . + + + + Gets the type of the post-processor. + + + + + Attribute that specifies a pre-execution processor to be executed before the handler. + The processor type must implement interface. + + The type of the pre-processor that implements . + + + + Gets the type of the pre-processor. + + + + + Interface for post-execution processors that are executed after handler execution. + Implement this interface to add cross-cutting concerns like logging, cleanup, or metrics collection. + + + + + Executes after the handler's main execution logic. + + The handler container containing the current update and context. + + A indicating the final execution result. + + + + Interface for pre-execution processors that are executed before handler execution. + Implement this interface to add cross-cutting concerns like validation, logging, or authorization. + + + + + Executes before the handler's main execution logic. + + The handler container containing the current update and context. + + A indicating whether execution should continue or be stopped. + + + + Sets the state in which the can be executed + + + + + + + + Creates a new instance + + + + + + + Realizes a for validation of the current in the polling routing + + + + + + + Defines the to validation for entry into execution of the + + + + + Gets the 's that processing + + + + + Gets the that processing + + + + + Gets or sets the filter modifiers that affect how this filter is combined with others. + + + + + Creates a new instance of + + + + + + Determines the logic of filter modifiers. Exceptionally internal implementation + + + + + + Defines the 's and validator () of the that will process + + + + + + + + Gets an array of that this attribute can be attached to + + + + + Gets an that handlers processes + + + + + Gets or sets importance of this in same pool + + + + + Gets or sets priority of this in same type handlers pool + + + + + Gets or sets a value indicating whether to form a fallback report. + + + + + Creates a new instance of + + The types of handlers that this attribute can be applied to. + The type of update that this handler processes. + The importance level of this handler (default: 0). + Thrown when is null. + Thrown when one of the handler types is not a valid handler type. + Thrown when is . + + + + Gets an of this from and + + A descriptor indexer for this handler attribute. + + + + Validator () of the that will process + + The filter execution context containing the update to validate. + True if the update passes validation; otherwise, false. + + + + Reactive way to implement a new of type + + + + + + + + + + + + + + + Initializes new instance of + + + + + + + + + + + Enumeration of filter modifiers that can be applied to update filters. + Defines how filters should be combined and applied in filter chains. + + + + + No modifier applied. Filter is applied as-is. + + + + + OR modifier. This filter or the next filter in the chain should match. + + + + + NOT modifier. The inverse of this filter should match. + + + + + Abstract attribute for associating a handler or method with a state keeper. + Provides logic for state-based filtering and state management. + + The type of the key used for state keeping (e.g., chat ID). + The type of the state value (e.g., string, int). + The type of the state keeper implementation. + + + + Gets or sets the singleton instance of the state keeper for this attribute type. + + + + + Gets the default state value of this statekeeper. + + + + + Gets the state value associated with this attribute instance. + + + + + Gets the special state mode for this attribute instance. + + + + + Initializes the attribute with a specific state and a custom key resolver. + + The state value to associate + The key resolver for state keeping + + + + Initializes the attribute with a special state and a custom key resolver. + + The special state mode + The key resolver for state keeping + + + + Determines whether the current update context passes the state filter. + + The filter execution context + True if the state matches the filter; otherwise, false. + + + + Abstract base attribute for defining update filters for a specific type of update target. + Provides logic for filter composition, modifier processing, and target extraction. + + The type of the update target to filter (e.g., Message, Update). + + + + Gets the compiled anonymous filter for this attribute. + + + + + Gets the compiled filter logic for the update target. + + + + + Empty constructor for internal using + + + + + Initializes the attribute with one or more filters for the update target. + + The filters to compose + + + + Initializes the attribute with a precompiled filter for the update target. + + The compiled filter + + + + Processes filter modifiers and combines this filter with the previous one if needed. + + The previous filter attribute in the chain + True if the OrNext modifier is set; otherwise, false. + + + + Extracts the filtering target of type from the given update. + + The Telegram update + The target object to filter, or null if not applicable + + + + Abstract base attribute for marking update handler classes. + Provides a type-safe way to associate handler types with specific update types and importance settings. + + The type of the update handler that this attribute is applied to. + + + + Initializes new instance of + + The type of update that this handler can process. + + + + Initializes new instance of + + The type of update that this handler can process. + The importance level for this handler + + + + Initializes new instance of + + Additional suported types. + The type of update that this handler can process. + + + + Initializes new instance of + + Additional suported types. + The type of update that this handler can process. + The importance level for this handler + + + + Interface for providing bot information and metadata. + Contains information about the bot user and provides initialization capabilities. + + + + + Gets the representing the bot. + + + + + Interface for configuring Telegram bot behavior and execution settings. + Controls various aspects of bot operation including concurrency, routing, collecting, and execution policies. + + + + + Gets or sets the maximum number of parallel working handlers. Null means no limit. + + + + + Gets or sets a value indicating whether awaiting handlers should be routed separately from regular handlers. + + + + + Gets or sets a value indicating whether to exclude intersecting command aliases. + + + + + Gets or sets the global cancellation token for all bot operations. + + + + + Enumeration of dice types supported by Telegram. + Used for filtering dice messages and determining dice emoji representations. + + + + + Standard dice (🎲). + + + + + Darts (🎯). + + + + + Bowling (🎳). + + + + + Basketball (🏀). + + + + + Football (⚽). + + + + + Casino slot machine (🎰). + + + + + Flags version of + Type of the , from which the message or inline query was sent + + + + + Normal one-to-one chat with a user or bot + + + + + Normal group chat + + + + + A channel + + + + + A supergroup + + + + + Value possible only in : private chat with the inline query sender + + + + + Exception thrown when attempting to modify a frozen collection. + + + + + Initializes a new instance of the class. + + + + + Exception thrown when a type is not a valid filter type. + + + + + Initializes a new instance of the class. + + The type that is not a filter type. + + + + Exception thrown when a handler execution fails. + Contains information about the handler and the inner exception. + + + + + The handler info associated with the faulted handler. + + + + + Initializes a new instance of the class. + + The handler info. + The inner exception. + + + + Filter thet checks 's data + + + + + Initialize new instance of + + + + + + + + + Filter that checks if belongs to a specific message + + + + + Initialize new instance of + + + + + + + + + Filters callback queries by matching their data with a regular expression. + + + + + Initializes a new instance of the class with a pattern and options. + + The regex pattern. + The regex options. + + + + Initializes a new instance of the class with a regex object. + + The regex object. + + + + Filter that checks if a command matches any of the specified aliases. + Requires a to be applied first to extract the command. + + The command aliases to check against. + + + + Filter that checks if a command matches any of the specified aliases. + Requires a to be applied first to extract the command. + + The command aliases to check against. + + + + Gets the command that was received and extracted by the . + + + + + Checks if the received command matches any of the specified aliases. + This filter requires a to be applied first + to extract the command from the message. + + The filter execution context containing the completed filters. + True if the command matches any of the specified aliases; otherwise, false. + + + + Abstract base class for filters that operate on command arguments. + Provides functionality to extract and validate command arguments from message text. + + The index of the argument to filter (0-based). + + + + Abstract base class for filters that operate on command arguments. + Provides functionality to extract and validate command arguments from message text. + + The index of the argument to filter (0-based). + + + + Gets the chosen argument at the specified index. + + + + + Determines whether the filter can pass by extracting the command argument and validating it. + + The filter execution context containing the message. + True if the argument exists and passes validation; otherwise, false. + + + + Determines whether the filter can pass for the given context. + + The filter execution context. + True if the filter passes; otherwise, false. + + + + Filter that checks if a command has arguments count >= . + + + + + + Filter that checks if a command has arguments count >= . + + + + + + + + + Filter that checks if a command argument starts with a specified content. + + The content to check if the argument starts with. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + Filter that checks if a command argument starts with a specified content. + + The content to check if the argument starts with. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + The content to check if the argument starts with. + + + + + The string comparison type to use for the check. + + + + + Checks if the command argument starts with the specified content using the configured comparison. + + The filter execution context (unused). + True if the argument starts with the specified content; otherwise, false. + + + + Filter that checks if a command argument ends with a specified content. + + The content to check if the argument ends with. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + Filter that checks if a command argument ends with a specified content. + + The content to check if the argument ends with. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + The content to check if the argument ends with. + + + + + The string comparison type to use for the check. + + + + + Checks if the command argument ends with the specified content using the configured comparison. + + The filter execution context (unused). + True if the argument ends with the specified content; otherwise, false. + + + + Filter that checks if a command argument contains a specified content. + + The content to check if the argument contains. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + Filter that checks if a command argument contains a specified content. + + The content to check if the argument contains. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + The content to check if the argument contains. + + + + + The string comparison type to use for the check. + + + + + Checks if the command argument contains the specified content using the configured comparison. + + The filter execution context (unused). + True if the argument contains the specified content; otherwise, false. + + + + Filter that checks if a command argument equals a specified content. + + The content to check if the argument equals. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + Filter that checks if a command argument equals a specified content. + + The content to check if the argument equals. + The string comparison type to use for the check. + The index of the argument to check (0-based). + + + + The content to check if the argument equals. + + + + + The string comparison type to use for the check. + + + + + Checks if the command argument equals the specified content using the configured comparison. + + The filter execution context (unused). + True if the argument equals the specified content; otherwise, false. + + + + Filter that checks if a command argument matches a regular expression pattern. + + The regular expression to match against the argument. + The index of the argument to check (0-based). + + + + Filter that checks if a command argument matches a regular expression pattern. + + The regular expression to match against the argument. + The index of the argument to check (0-based). + + + + Gets the match found by the regex. + + + + + Initializes a new instance of with a regex pattern. + + The regular expression pattern to match. + The regex options to use. + The timeout for the regex match operation. + The index of the argument to check (0-based). + + + + Checks if the command argument matches the regular expression pattern. + + The filter execution context. + True if the argument matches the regex pattern; otherwise, false. + + + + Represents a compiled filter that applies a set of filters to an anonymous target type. + + + + + Gets the name of this compiled filter. + + + + + Initializes a new instance of the class. + + The name of the compiled filter. + The filter action delegate. + The function to get the filtering target from an update. + + + + Compiles a set of filters into an for a specific target type. + + The type of the filtering target. + The list of filters to compile. + The function to get the filtering target from an update. + The compiled filter. + + + + Compiles a set of filters into an for a specific target type with a custom name. + + The type of the filtering target. + The custom name for the compiled filter. + The list of filters to compile. + The function to get the filtering target from an update. + The compiled filter. + + + + Determines whether all filters can pass for the given context and filtering target. + + The type of the filtering target. + The list of filters. + The filter execution context. + The filtering target. + True if all filters pass; otherwise, false. + + + + + + + Represents a filter that applies a filter action to an anonymous target type extracted from an update. + + + + + Gets the name of this filter. + + + + + Initializes a new instance of the class. + + The name of the filter. + The filter action delegate. + The function to get the filtering target from an update. + + + + Compiles a filter for a specific target type. + + The type of the filtering target. + The filter to apply. + The function to get the filtering target from an update. + The compiled filter. + + + + Compiles a filter for a specific target type with a custom name. + + The type of the filtering target. + The custom name for the compiled filter. + The filter to apply. + The function to get the filtering target from an update. + The compiled filter. + + + + Determines whether the filter can pass for the given context and filtering target. + + The type of the filtering target. + The filter execution context. + The filter to apply. + The filtering target. + True if the filter passes; otherwise, false. + + + + Determines whether the filter can pass for the given context by extracting the filtering target and applying the filter action. + + The filter execution context. + True if the filter passes; otherwise, false. + + + + Represents a filter that composes multiple filters and passes only if all of them pass. + + The type of the input for the filter. + + + + Gets the name of this compiled filter. + + + + + Initializes a new instance of the class. + + The filters to compose. + + + + Initializes a new instance of the class with a custom name. + + The custom name for the compiled filter. + The filters to compose. + + + + Determines whether all composed filters pass for the given context. + + The filter execution context. + True if all filters pass; otherwise, false. + + + + The list containing filters worked out during Polling to further obtain additional filtering information + + + + + Adds the completed filter to the list. + + The type of update. + The filter to add. + + + + Adds many completed filters to the list. + + The type of update. + The filters to add. + + + + Looks for filters of a given type in the list. + + The filter type to search for. + The enumerable containing filters of the given type. + Thrown if the type is not a filter type. + + + + Looks for a filter of a given type at the specified index in the list. + + The filter type to search for. + The index of the filter. + The filter of the given type at the specified index. + Thrown if the type is not a filter type. + Thrown if no filter is found at the index. + + + + Returns a filter of a given type at the specified index, or null if it does not exist. + + The filter type to search for. + The index of the filter. + The filter at the specified index, or null if it does not exist. + Thrown if the type is not a filter type. + + + + + + + + + + Represents the context for filter execution, including update, input, and additional data. + + The type of the input for the filter. + + + + Gets the for the current context. + + + + + Gets the additional data dictionary for the context. + + + + + Gets the list of completed filters for the context. + + + + + Gets the being processed. + + + + + Gets the of the update. + + + + + Gets the input object for the filter. + + + + + Initializes a new instance of the class with all parameters. + + The bot info. + The update. + The input object. + The additional data dictionary. + The list of completed filters. + + + + Initializes a new instance of the class with default data and filters. + + The bot info. + The update. + The input object. + + + + Creates a child context for a different input type, sharing the same data and completed filters. + + The type of the new input. + The new input object. + A new instance. + + + + Interface for filters that have a name for identification and debugging purposes. + + + + + Gets the name of the filter. + + + + + Interface for filters that can be collected into a completed filters list. + Provides information about whether a filter should be tracked during execution. + + + + + Gets if filter can be collected to + + + + + Represents a filter for a specific update type. + + The type of the update to filter. + + + + Determines whether the filter can pass for the given context. + + The filter execution context. + True if the filter passes; otherwise, false. + + + + Represents a filter that joins multiple filters together. + + The type of the input for the filter. + + + + Gets the array of joined filters. + + + + + Abstract base class for filters that operate based on the current environment. + Provides functionality to detect debug vs release environments. + + + + + Gets a value indicating whether the current environment is debug mode. + This is set during static initialization based on the DEBUG conditional compilation symbol. + + + + + Static constructor that initializes the environment detection. + + + + + Sets the debug environment flag. This method is only compiled in DEBUG builds. + + + + + Filter that only passes in debug environment builds. + + + + + Filter that only passes in debug environment builds. + + + + + Checks if the current environment is debug mode. + + The filter execution context (unused). + True if the current environment is debug mode; otherwise, false. + + + + Filter that only passes in release environment builds. + + + + + Filter that only passes in release environment builds. + + + + + Checks if the current environment is release mode. + + The filter execution context (unused). + True if the current environment is release mode; otherwise, false. + + + + Filter that checks environment variable values. + + The environment variable name to check. + The expected value of the environment variable (optional). + The string comparison type to use for value matching. + + + + Filter that checks environment variable values. + + The environment variable name to check. + The expected value of the environment variable (optional). + The string comparison type to use for value matching. + + + + The environment variable name to check. + + + + + The expected value of the environment variable (optional). + + + + + The string comparison type to use for value matching. + + + + + Initializes a new instance of the class with a specific value. + + The environment variable name to check. + The expected value of the environment variable. + + + + Initializes a new instance of the class that checks for non-null values. + + The environment variable name to check. + + + + Initializes a new instance of the class with custom comparison. + + The environment variable name to check. + The string comparison type to use. + + + + Checks if the environment variable matches the expected criteria. + + The filter execution context (unused). + True if the environment variable matches the criteria; otherwise, false. + + + + Base class for filters, providing logical operations and collectability. + + The type of the input for the filter. + + + + Creates a filter from a function. + + The filter function. + A instance. + + + + Creates a filter that always passes. + + An instance. + + + + Creates a filter that inverts the result of this filter. + + A instance. + + + + Creates a filter that inverts the result of this filter. + + + A instance. + + + + Creates a filter that passes only if both this and the specified filter pass. + + The filter to combine with. + An instance. + + + + Creates a filter that passes if either this or the specified filter pass. + + The filter to combine with. + An instance. + + + + Creates a filter that passes if either this or the specified filter pass. + + + + + An instance. + + + + Gets a value indicating whether this filter is collectible. + + + + + Determines whether the filter can pass for the given context. + + The filter execution context. + True if the filter passes; otherwise, false. + + + + Implicitly creates from function + + + + + + A filter that always passes. + + The type of the input for the filter. + + + + + + + A filter that inverts the result of another filter. + + The type of the input for the filter. + + + + Initializes a new instance of the class. + + The filter to invert. + + + + + + + A filter that uses a function to determine if it passes. + + The type of the input for the filter. + + + + Initializes a new instance of the class. + + The filter function. + + + + + + + Base class for filters that join multiple filters together. + + The type of the input for the filter. + + + + Base class for filters that join multiple filters together. + + The type of the input for the filter. + + + + Gets the array of joined filters. + + + + + A filter that passes only if both joined filters pass. + + The type of the input for the filter. + + + + Initializes a new instance of the class. + + The left filter. + The right filter. + + + + + + + A filter that passes if at least one of the joined filters passes. + + The type of the input for the filter. + + + + Initializes a new instance of the class. + + The left filter. + The right filter. + + + + + + + Filter that checks if a message contains a mention of the bot or a specific user. + Requires a to be applied first to identify mention entities. + + + + + The username to check for in the mention (null means check for bot's username). + + + + + Initializes a new instance of the class that checks for bot mentions. + + + + + Initializes a new instance of the class that checks for specific user mentions. + + The username to check for in the mention. + + + + Checks if the message contains a mention of the specified user or bot. + This filter requires a to be applied first + to identify mention entities in the message. + + The filter execution context containing the message and completed filters. + True if the message contains the specified mention; otherwise, false. + Thrown when the bot username is null and no specific mention is provided. + + + + Base class for filters that operate on the chat of the message being processed. + + + + + Gets the chat of the message being processed. + + + + + + + + Determines whether the filter passes for the given chat context. + + The filter execution context for the chat. + True if the filter passes; otherwise, false. + + + + Filters messages whose chat is a forum. + + + + + + + + Filters messages whose chat ID matches the specified value. + + + + + Filters messages whose chat ID matches the specified value. + + + + + + + + Filters messages whose chat type matches the specified value. + + + + + Initialize new instance of + + + + + + Initialize new instance of with + + + + + + + + + Filters messages whose chat title matches the specified value. + + + + + Initializes a new instance of the class. + + The chat title to match. + + + + Initializes a new instance of the class with a specific string comparison. + + The chat title to match. + The string comparison to use. + + + + + + + Filters messages whose chat username matches the specified value. + + + + + Initializes a new instance of the class. + + The chat username to match. + + + + Initializes a new instance of the class with a specific string comparison. + + The chat username to match. + The string comparison to use. + + + + + + + Filters messages whose chat first and/or last name matches the specified values. + + + + + Initializes a new instance of the class. + + The chat first name to match. + The chat last name to match. + + + + Initializes a new instance of the class with a specific string comparison. + + The chat first name to match. + The chat last name to match. + The string comparison to use. + + + + + + + Base abstract class for all filter of updates + + + + + Target message for filterring + + + + + + + + + + + Determines whether the filter can pass for the given context. + + + + + + + Filters messages by their . + + + + + Initializes a new instance of the class. + + The message type to filter by. + + + + + + + Filters messages that are automatic forwards. + + + + + + + + Filters messages that are sent from offline. + + + + + + + + Filters service messages (e.g., chat events). + + + + + + + + Filters messages that are topic messages. + + + + + + + + Filters messages by dice throw value and optionally by dice type. + + + + + Initializes a new instance of the class for a specific value. + + The dice value to filter by. + + + + Initializes a new instance of the class for a specific dice type and value. + + The dice type to filter by. + The dice value to filter by. + + + + + + + Filters messages by matching their text with a regular expression. + + + + + Initializes a new instance of the class with a pattern and options. + + The regex pattern. + The regex options. + + + + Initializes a new instance of the class with a regex object. + + The regex object. + + + + Filters messages that contain a specific entity type, content, offset, or length. + + + + + Gets the entities found in the message that match the filter. + + + + + Initializes a new instance of the class for a specific entity type. + + The entity type to filter by. + + + + Initializes a new instance of the class for a specific entity type, offset, and length. + + The entity type to filter by. + The offset to filter by. + The length to filter by. + + + + Initializes a new instance of the class for a specific entity type and content. + + The entity type to filter by. + The content to filter by. + The string comparison to use. + + + + Initializes a new instance of the class for a specific entity type, offset, length, and content. + + The entity type to filter by. + The offset to filter by. + The length to filter by. + The content to filter by. + The string comparison to use. + + + + + + + Filter that checks if message has appropriate reply chain. + DOES NOT SHiFT MESSAGE FILTERS TARGET + + The depth of reply chain to traverse (default: 1). + + + + Filter that checks if message has appropriate reply chain. + DOES NOT SHiFT MESSAGE FILTERS TARGET + + The depth of reply chain to traverse (default: 1). + + + + Gets the replied message at the specified depth in the reply chain. + + + + + Gets the depth of reply chain traversal. + + + + + Determines if the message can pass through the filter by first validating + the reply chain and then applying specific filter logic. + + The filter execution context containing the message. + True if the message passes both reply validation and specific filter criteria; otherwise, false. + + + + Helper filter class for filters that operate on replied messages. + Provides functionality to traverse reply chains and access replied message content + and shifts any next message filter to filter the content of found reply. + + + + + + Helper filter class for filters that operate on replied messages. + Provides functionality to traverse reply chains and access replied message content + and shifts any next message filter to filter the content of found reply. + + + + + + Gets the replied message at the specified depth in the reply chain. + + + + + Gets the depth of reply chain traversal. + + + + + Determines if the message can pass through the filter by first validating + the reply chain and then applying specific filter logic. + + The filter execution context containing the message. + True if the message passes both reply validation and specific filter criteria; otherwise, false. + + + + Filter that checks if the replied message was sent by the bot itself. + ( ! ): REQUIRES before + + + + + Checks if the replied message was sent by the bot. + + The filter execution context containing bot information. + True if the replied message was sent by the bot; otherwise, false. + + + + Abstract base class for filters that operate on message senders. + Provides functionality to access and validate the user who sent the message. + + + + + Gets the user who sent the message. + + + + + Determines if the message can pass through the filter by validating + that the message has a valid sender. + + The filter execution context containing the message. + True if the message has a valid sender; otherwise, false. + + + + Filter that checks if the message sender has a specific username. + + The username to check for. + + + + Filter that checks if the message sender has a specific username. + + The username to check for. + + + + The username to check for. + + + + + The string comparison type to use for username matching. + + + + + Initializes a new instance of the class with custom string comparison. + + The username to check for. + The string comparison type to use. + + + + Checks if the message sender has the specified username. + + The filter execution context (unused). + True if the sender has the specified username; otherwise, false. + + + + Filter that checks if the message sender has specific first and/or last name. + + The first name to check for. + The last name to check for (optional). + The string comparison type to use. + + + + Filter that checks if the message sender has specific first and/or last name. + + The first name to check for. + The last name to check for (optional). + The string comparison type to use. + + + + The first name to check for. + + + + + The last name to check for (optional). + + + + + The string comparison type to use for name matching. + + + + + Initializes a new instance of the class with first and last name. + + The first name to check for. + The last name to check for. + + + + Initializes a new instance of the class with first name only. + + The first name to check for. + + + + Initializes a new instance of the class with first name and custom comparison. + + The first name to check for. + The string comparison type to use. + + + + Checks if the message sender has the specified first and/or last name. + + The filter execution context (unused). + True if the sender has the specified name(s); otherwise, false. + + + + Filter that checks if the message sender has a specific user ID. + + The user ID to check for. + + + + Filter that checks if the message sender has a specific user ID. + + The user ID to check for. + + + + The user ID to check for. + + + + + Checks if the message sender has the specified user ID. + + The filter execution context (unused). + True if the sender has the specified user ID; otherwise, false. + + + + Filter that checks if the message was sent by a bot. + + + + + Filter that checks if the message was sent by a bot. + + + + + Checks if the message was sent by a bot. + + The filter execution context (unused). + True if the message was sent by a bot; otherwise, false. + + + + Filter that checks if the message was sent by a premium user. + + + + + Filter that checks if the message was sent by a premium user. + + + + + Checks if the message was sent by a premium user. + + The filter execution context (unused). + True if the message was sent by a premium user; otherwise, false. + + + + Abstract base class for filters that operate on message text content. + Provides common functionality for extracting and validating message text. + + + + + Gets the current message being processed by the filter. + + + + + Gets the extracted text content from the current message. + + + + + Determines if the message can pass through the filter by validating the message + and extracting its text content for further processing. + + The filter execution context containing the message update. + True if the message is valid and can be processed further; otherwise, false. + + + + Filter that checks if the message text starts with a specified content. + + The content to check if the message text starts with. + The string comparison type to use for the check. + + + + Filter that checks if the message text starts with a specified content. + + The content to check if the message text starts with. + The string comparison type to use for the check. + + + + The content to check if the message text starts with. + + + + + The string comparison type to use for the check. + + + + + Checks if the message text starts with the specified content using the configured comparison. + + The filter execution context (unused). + True if the text starts with the specified content; otherwise, false. + + + + Filter that checks if the message text ends with a specified content. + + The content to check if the message text ends with. + The string comparison type to use for the check. + + + + Filter that checks if the message text ends with a specified content. + + The content to check if the message text ends with. + The string comparison type to use for the check. + + + + The content to check if the message text ends with. + + + + + The string comparison type to use for the check. + + + + + Checks if the message text ends with the specified content using the configured comparison. + + The filter execution context (unused). + True if the text ends with the specified content; otherwise, false. + + + + Filter that checks if the message text contains a specified content. + + The content to check if the message text contains. + The string comparison type to use for the check. + + + + Filter that checks if the message text contains a specified content. + + The content to check if the message text contains. + The string comparison type to use for the check. + + + + The content to check if the message text contains. + + + + + The string comparison type to use for the check. + + + + + Checks if the message text contains the specified content using the configured comparison. + + The filter execution context (unused). + True if the text contains the specified content; otherwise, false. + + + + Filter that checks if the message text equals a specified content. + + The content to check if the message text equals. + The string comparison type to use for the check. + + + + Filter that checks if the message text equals a specified content. + + The content to check if the message text equals. + The string comparison type to use for the check. + + + + The content to check if the message text equals. + + + + + The string comparison type to use for the check. + + + + + Checks if the message text equals the specified content using the configured comparison. + + The filter execution context (unused). + True if the text equals the specified content; otherwise, false. + + + + Filter that checks if the message text is not null or empty. + + + + + Filter that checks if the message text is not null or empty. + + + + + Checks if the message text is not null or empty. + + The filter execution context (unused). + True if the text is not null or empty; otherwise, false. + + + + Filter that checks if the message text contains a 'word'. + 'Word' must be a separate member of the text, and not have any alphabetic characters next to it. + + + + + Filter that checks if the message text contains a 'word'. + 'Word' must be a separate member of the text, and not have any alphabetic characters next to it. + + + + + The content to check if the message text equals. + + + + + The string comparison type to use for the check. + + + + + The search starting position. + + + + + + + + Base class for filters that use regular expressions to match text in updates. + + The type of the input for the filter. + + + + Gets the collection of matches found by the regex. + + + + + Initializes a new instance of the class with a regex object. + + Function to extract the string to match from the input. + The regex object to use for matching. + + + + Initializes a new instance of the class with a pattern and options. + + Function to extract the string to match from the input. + The regex pattern. + The regex options. + + + + Determines whether the regex matches the text extracted from the input. + + The filter execution context. + True if the regex matches; otherwise, false. + + + + Filters updates by comparing a resolved state key with a target key. + + The type of the key used for state resolution. + + + + Initializes a new instance of the class. + + The key resolver to extract the key from the update. + The target key to compare with. + + + + + + + Attribute that marks a handler to process any type of update. + This handler will be triggered for all incoming updates regardless of their type. + + + + + + Attribute that marks a handler to process any type of update. + This handler will be triggered for all incoming updates regardless of their type. + + + + + + Always returns true, allowing any update to pass through this filter. + + The filter execution context (unused). + Always returns true to allow any update. + + + + Abstract base class for handlers that can process any type of update. + Provides a foundation for creating handlers that respond to all incoming updates. + + + + + Abstract base class for handlers that can process any type of update. + Provides a foundation for creating handlers that respond to all incoming updates. + + + + + Internal handler used for awaiting specific update types. + Provides synchronization mechanism for waiting for updates of a particular type. + + The type of update this awaiter handler waits for. + + + + Internal handler used for awaiting specific update types. + Provides synchronization mechanism for waiting for updates of a particular type. + + The type of update this awaiter handler waits for. + + + + Manual reset event used for synchronization. + + + + + Gets the update that triggered this awaiter handler. + + + + + Waits for the specified update type to be received. + + The cancellation token to cancel the wait operation. + + + + Creates a handler container for this awaiter handler. + + The handler information containing the update. + An empty handler container. + + + + Executes the awaiter handler by setting the reset event. + + The handler container (unused). + The cancellation token (unused). + A completed task. + + + + + + + Builder class for creating awaiter handlers that can wait for specific update types. + Provides fluent API for configuring filters, state keepers, and other handler properties. + + The type of update to await. + + + + The awaiting provider for managing handler registration. + + + + + The update that triggered the awaiter creation. + + + + + Initializes a new instance of the class. + + The type of update to await. + The update that triggered the awaiter creation. + The awaiting provider for managing handler registration. + Thrown when the update type is not valid for TUpdate. + + + + Awaits for an update of the specified type using the default sender ID resolver. + + The cancellation token to cancel the wait operation. + The awaited update of type TUpdate. + + + + Awaits for an update of the specified type using a custom state key resolver. + + The state key resolver to use for filtering updates. + The cancellation token to cancel the wait operation. + The awaited update of type TUpdate. + + + + Internal handler class that wraps a delegate action for execution. + Used for dynamically created handlers that execute custom actions. + + The type of update being handled. + + + + The delegate action to execute when the handler is invoked. + + + + + Initializes a new instance of the class. + + The type of update this handler processes. + The delegate action to execute. + + + + Executes the wrapped handler action. + + The handler container with execution context. + The cancellation token. + A task representing the asynchronous execution. + + + + Base class for building handler descriptors and managing handler filters. + + + + + Base class for building handler descriptors and managing handler filters. + + + + + to ehich new builded handlers is adding + + + + + of building handler + + + + + Type of handler to build + + + + + Filters applied to handler + + + + + of building handler + + + + + Update validation filter of building handler + + + + + State keeper of building handler + + + + + Builds an implicit for the specified handler instance. + + The instance. + The created . + + + + Gets a unique service key for an implicit handler type. + + The handler type. + A unique service key string. + + + + Sets the update validating action for the handler. + + The to use. + The builder instance. + + + + Sets the concurrency level for the handler. + + The concurrency value. + The builder instance. + + + + Sets the priority for the handler. + + The priority value. + The builder instance. + + + + Sets both concurrency and priority for the handler. + + The concurrency value. + The priority value. + The builder instance. + + + + Adds a filter to the handler. + + The to add. + The builder instance. + + + + Adds multiple filters to the handler. + + The filters to add. + The builder instance. + + + + Sets a state keeper for the handler using a specific state and key resolver. + + The type of the key. + The type of the state. + The type of the state keeper. + The state value. + The key resolver. + The builder instance. + + + + Sets a state keeper for the handler using a special state and key resolver. + + The type of the key. + The type of the state. + The type of the state keeper. + The special state value. + The key resolver. + The builder instance. + + + + Adds a targeted filter for a specific filter target type. + + The type of the filter target. + Function to get the filter target from an update. + The filter to add. + The builder instance. + + + + Adds multiple targeted filters for a specific filter target type. + + The type of the filter target. + Function to get the filter target from an update. + The filters to add. + The builder instance. + + + + Defines a builder for awaiting handler logic for a specific update type. + + The type of update to await. + + + + Awaits an update using the specified key resolver and cancellation token. + + The to resolve the key. + The cancellation token. + A representing the awaited update. + + + + Defines builder actions for configuring handler builders. + + + + + Sets the update validating action for the handler. + + The to use. + The builder instance. + + + + Sets the concurrency level for the handler. + + The concurrency value. + The builder instance. + + + + Sets the priority for the handler. + + The priority value. + The builder instance. + + + + Sets both concurrency and priority for the handler. + + The concurrency value. + The priority value. + The builder instance. + + + + Adds a filter to the handler. + + The to add. + The builder instance. + + + + Adds multiple filters to the handler. + + The filters to add. + The builder instance. + + + + Sets a state keeper for the handler using a specific state and key resolver. + + The type of the key. + The type of the state. + The type of the state keeper. + The state value. + The key resolver. + The builder instance. + + + + Sets a state keeper for the handler using a special state and key resolver. + + The type of the key. + The type of the state. + The type of the state keeper. + The special state value. + The key resolver. + The builder instance. + + + + Adds a targeted filter for a specific filter target type. + + The type of the filter target. + Function to get the filter target from an update. + The filter to add. + The builder instance. + + + + Adds multiple targeted filters for a specific filter target type. + + The type of the filter target. + Function to get the filter target from an update. + The filters to add. + The builder instance. + + + + Defines a builder for regular handler logic for a specific update type. + + The type of update to handle. + + + + Builds the handler logic using the specified execution delegate. + + The delegate to execute the handler logic. + + + + Filter for state keeping logic, allowing filtering based on state and special state conditions. + + The type of the key for state resolution. + The type of the state. + The type of the state keeper. + + + + Gets or sets the state keeper instance. + + + + + Gets the state value for this filter. + + + + + Gets the special state value for this filter. + + + + + Initializes a new instance of the class with a specific state. + + The state value. + The key resolver. + + + + Initializes a new instance of the class with a special state. + + The special state value. + The key resolver. + + + + Determines whether the filter can pass for the given context based on state logic. + + The filter execution context. + True if the filter passes; otherwise, false. + + + + Delegate for validating an update in a filter context. + + The filter execution context. + True if the update is valid; otherwise, false. + + + + Filter that uses a delegate to validate updates. + + + + + Gets a value indicating whether this filter is collectable. Always false for this filter. + + + + + Initializes a new instance of the class. + + The validation delegate to use. + + + + Determines whether the filter can pass for the given context using the validation delegate. + + The filter execution context. + True if the filter passes; otherwise, false. + + + + Delegate for handler execution actions that take a container and cancellation token. + + The type of update being handled. + The handler container with execution context. + The cancellation token. + A task representing the asynchronous execution. + + + + Builder class for creating regular handlers that can process updates. + Provides fluent API for configuring filters, state keepers, and other handler properties. + + The type of update to handle. + + + + Initializes a new instance of the class. + + The type of update this handler will process. + The collection to register the built handler with. + Thrown when the update type is not valid for TUpdate. + + + + Builds an abstract handler with the specified execution action. + + The delegate action to execute when the handler is invoked. + Thrown when executeHandler is null. + + + + Extension methods for handler builders. + Provides convenient methods for creating handlers and setting state keepers. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds a targeted filter for a specific filter target type. + + + The type of the filter target. + + Function to get the filter target from an update. + The filter to add. + The builder instance. + + + + Adds multiple targeted filters for a specific filter target type. + + + The type of the filter target. + + Function to get the filter target from an update. + The filters to add. + The builder instance. + + + + Sets a numeric state keeper with a custom key resolver. + + The type of the handler builder. + The handler builder. + The numeric state value. + The key resolver for the state. + The handler builder for method chaining. + + + + Sets a numeric state keeper with a special state and custom key resolver. + + The type of the handler builder. + The handler builder. + The special state value. + The key resolver for the state. + The handler builder for method chaining. + + + + Sets a numeric state keeper with the default sender ID resolver. + + The type of the handler builder. + The handler builder. + The numeric state value. + The handler builder for method chaining. + + + + Sets a numeric state keeper with a special state and the default sender ID resolver. + + The type of the handler builder. + The handler builder. + The special state value. + The handler builder for method chaining. + + + + Sets an enum state keeper with a custom key resolver. + + The type of the handler builder. + The type of the enum state. + The handler builder. + The enum state value. + The key resolver for the state. + The handler builder for method chaining. + + + + Sets an enum state keeper with a special state and custom key resolver. + + The type of the handler builder. + The type of the enum state. + The handler builder. + The special state value. + The key resolver for the state. + The handler builder for method chaining. + + + + Sets an enum state keeper with the default sender ID resolver. + + The type of the handler builder. + The type of the enum state. + The handler builder. + The enum state value. + The handler builder for method chaining. + + + + Sets an enum state keeper with a special state and the default sender ID resolver. + + The type of the handler builder. + The type of the enum state. + The handler builder. + The special state value. + The handler builder for method chaining. + + + + Attribute that marks a handler to process callback query updates. + This handler will be triggered when users interact with inline keyboards or other callback mechanisms. + + + + + + Attribute that marks a handler to process callback query updates. + This handler will be triggered when users interact with inline keyboards or other callback mechanisms. + + + + + + Always returns true, allowing any callback query update to pass through this filter. + + The filter execution context (unused). + Always returns true to allow any callback query update. + + + + Abstract base class for handlers that process callback query updates. + Provides a foundation for creating handlers that respond to user interactions with inline keyboards. + + + + + Abstract base class for handlers that process callback query updates. + Provides a foundation for creating handlers that respond to user interactions with inline keyboards. + + + + + Gets the type-specific data from the callback query. + Returns the data string, chat instance, or game short name depending on the callback query type. + + + + + Sends a response message to the current chat. + + The text of the message to send. + The parse mode for the message text. + The reply parameters for the message. + The reply markup for the message. + Options for link preview generation. + The thread ID for forum topics. + The message entities to include. + Whether to disable notification for the message. + Whether to protect the message content. + The message effect ID. + The business connection ID. + Whether to allow paid broadcast. + + + The cancellation token. + The sent message. + + + + Edits the current callback message with new text. + + The new text of the message. + The parse mode for the message text. + The reply markup for the message. + The message entities to include. + Options for link preview generation. + The cancellation token. + The edited message. + + + + Answers the current callback query with optional alert or message. + + The text to display in the callback answer. + Whether to show an alert popup instead of a toast. + A URL that will be opened by the client. + The maximum amount of time in seconds that the result of the callback query may be cached client-side. + The cancellation token. + + + + Attribute that marks a handler to process command messages. + This handler will be triggered when users send bot commands (messages starting with '/'). + + + + + Attribute that marks a handler to process command messages. + This handler will be triggered when users send bot commands (messages starting with '/'). + + + + + Gets the command that was extracted from the message (without the '/' prefix and bot username). + + + + + Message text splited by space characters + + + + + Checks if the update contains a valid bot command and extracts the command text. + + The filter execution context containing the update. + True if the update contains a valid bot command; otherwise, false. + + + + Abstract base class for handlers that process command messages. + Provides functionality to extract and parse command arguments. + + + + + Cached array of command arguments. + + + + + Cached string representation of command arguments. + + + + + Gets the command that was extracted from the message. + + + + + Gets the arguments string (everything after the command). + + + + + Gets the command arguments as an array of strings. + + + + + Splits the command arguments into an array of strings. + + An array of command arguments. + + + + Extracts the arguments string from the command message. + + The arguments string (everything after the command). + + + + Abstract base class for branching handlers that process command messages. + Provides functionality to extract and parse command arguments for branching scenarios. + + + + + Cached array of command arguments. + + + + + Cached string representation of command arguments. + + + + + Gets the command that was extracted from the message. + + + + + Gets the arguments string (everything after the command). + + + + + Gets the command arguments as an array of strings. + + + + + Splits the command arguments into an array of strings. + + An array of command arguments. + + + + Extracts the arguments string from the command message. + + The arguments string (everything after the command). + + + + Abstract handler for Telegram updates of type . + + + + + Handler container for the current update. + + + + + Telegram Bot client associated with the current container. + + + + + Incoming update of type . + + + + + The Telegram update being handled. + + + + + Additional data associated with the handler execution. + + + + + List of successfully passed filters. + + + + + Provider for awaiting asynchronous operations. + + + + + Initializes a new instance and checks that the update type matches . + + The type of update to handle. + + + + Creates a handler container for the specified awaiting provider and handler info. + + The handler descriptor info. + The created handler container. + + + + Executes the handler logic using the specified container. + + The handler container. + Cancellation token. + A task representing the asynchronous operation. + + + + Abstract method to execute the update handling logic. + + The handler container. + Cancellation token. + A task representing the asynchronous operation. + + + + Abstract base class for handlers that support branching execution based on different methods. + Allows multiple handler methods to be defined in a single class, each with its own filters. + + The type of update being handled. + + + + The method info for the current branch being executed. + + + + + Gets the binding flags used to discover branch methods. + + + + + Gets the allowed return types for branch methods. + + + + + Gets the cancellation token for the current execution. + + + + + Initializes a new instance of the class. + + The type of update this handler processes. + + + + Describes all handler branches in this class. + + A collection of handler descriptors for each branch method. + Thrown when no branch methods are found. + + + + Describes a specific branch method. + + The branch method to describe. + The handler attribute for the class. + The filters applied to the class. + A handler descriptor for the branch method. + Thrown when the branch method has parameters or invalid return type. + + + + Creates a handler container for this branching handler. + + The handler information. + A handler container for this branching handler. + Thrown when the awaiting provider is not of the expected type. + + + + Executes the current branch method. + + The handler container. + The cancellation token. + Thrown when no branch method is set. + + + + Wraps the execution of a branch method, handling both void and Task return types. + + The handler container. + The method to execute. + + + + Represents an empty handler container that throws for all members. + + + + + + + + + + + + + + + + + + + + Represents a token that tracks the lifetime of a handler instance. + + + + + Event triggered when the handler's lifetime has ended. + + + + + Gets a value indicating whether the handler's lifetime has ended. + + + + + Marks the handler's lifetime as ended and triggers the event. + + + + + Abstract handler for Telegram updates of type . + + + + + Handler container for the current update. + + + + + Abstract method to execute the update handling logic. + + The handler container. + Cancellation token. + A task representing the asynchronous operation. + + + + Interface for handler containers that provide context and resources for update handlers. + Contains all necessary information and services that handlers need during execution. + + + + + Gets the being handled. + + + + + Gets the used for this handler. + + + + + Gets the extra data associated with the handler execution. + + + + + Gets the for this handler. + + + + + Gets the for awaiting operations. + + + + + Factory interface for creating handler containers. + Provides a way to create handler containers with specific providers and handler information. + + + + + Creates a new for the specified awaiting provider and handler info. + + The for the handler. + A new instance. + + + + Abstraction for update handlers, providing execution and lifetime management for Telegram updates. + + + + + Gets the that this handler processes. + + + + + Gets the associated with this handler instance. + + + + + Executes the handler logic and marks the lifetime as ended after execution. + + + The cancellation token. + A representing the asynchronous operation. + + + + Handles failed filters during handler describing. + Use to control how router should treat this fail. + to silently continue decribing. + to stop\break desribing sequence. + + + + + + + + + Base class for update handlers, providing execution and lifetime management for Telegram updates. + + + + + Base class for update handlers, providing execution and lifetime management for Telegram updates. + + + + + Gets the that this handler processes. + + + + + Gets the associated with this handler instance. + + + + + + + + + + + + + + Executes the handler logic and marks the lifetime as ended after execution. + + + The cancellation token. + A representing the asynchronous operation. + + + + Executes the handler logic for the given container and cancellation token. + + The for the update. + The cancellation token. + A representing the asynchronous operation. + + + + Dispose resources of this handler. Override if needed + + + Return if dispose was successfull and garbage collecting for this object can be supressed + + + + Handles failed filters during handler describing. + Use to control how router should treat this fail. + to silently continue decribing. + to stop\break desribing sequence. + + + + + + + + + + + + Contains information about a filter that failed during execution. + Provides details about the filter, its failure status, and any associated exception. + + The name of the filter. + The filter instance that failed. + Whether the filter failed. + The exception that occurred during filter execution, if any. + + + + Contains information about a filter that failed during execution. + Provides details about the filter, its failure status, and any associated exception. + + The name of the filter. + The filter instance that failed. + Whether the filter failed. + The exception that occurred during filter execution, if any. + + + + Gets the name of the filter. + + + + + Gets the filter instance that failed. + + + + + Gets a value indicating whether the filter failed. + + + + + Gets the exception that occurred during filter execution, if any. + + + + + Represents a report of filter fallback information for debugging and error handling. + Contains detailed information about which filters failed and why during handler execution. + + The handler descriptor that generated this report. + The filter execution context. + + + + Represents a report of filter fallback information for debugging and error handling. + Contains detailed information about which filters failed and why during handler execution. + + The handler descriptor that generated this report. + The filter execution context. + + + + Gets the handler descriptor associated with this fallback report. + + + + + Gets the filter execution context that generated this report. + + + + + Gets or sets the fallback information for the update validator filter. + + + + + Gets or sets the fallback information for the state keeper validator filter. + + + + + Gets the list of fallback information for update filters that failed. + + + + + Checks filter fail status by name + + + + + + + Creates new instance of with default filter state as FAILED. + + + + + + Creates new instance of with default filter state as PASSED. + + + + + + A class builder for pattern checking of + + + + + + + A class builder for pattern checking of + + + + + + + Adds a filter to the exclusion list. + Excluded filters are compared oppositely with the default state. + + + + + + + Adds a filter to the ignore list. + Ignored filters are not checked and do not affect the final result. + + + + + + + It goes through the report and compares it with the specified filter pattern. + + + + + + Casts inspector by executing + + + + + + Provides extension methods for + + + + + + + + + + + Container class that holds the context and data for handler execution. + Provides access to the update, client, filters, and other execution context. + + The type of update being handled. + + + + Gets the actual update object of type TUpdate. + + + + + + + + + + + + + + + + + + + + Initializes new instance of + + + + + + Initializes new instance of + + + + + + + + + + + Creates new container of specific update type from thos contatiner + + + + + + + Creates new container of specific update type from existing container + + + + + + + + Represents a handler container for a specific update type. + + The type of update handled by the container. + + + + Gets the actual update object of type . + + + + + Attribute that marks a handler to process inline queries. + IMPORTANT! You can have only ONE instance of this handler. + + + + + Attribute that marks a handler to process inline queries. + IMPORTANT! You can have only ONE instance of this handler. + + + + + + + + Abstract base class for handlers that process inline queries. + IMPORTANT! You can have only ONE instance of this handler. + + + + + Abstract base class for handlers that process inline queries. + IMPORTANT! You can have only ONE instance of this handler. + + + + + Handler container for the current update. + + + + + Handler container for the current update. + + + + + Incoming update of type . + + + + + Incoming update of type . + + + + + + + + Executes handler logic if received update is + + + + + + + + Executes handler logic if received update is + + + + + + + + Answers inline query + + + + + + + + + + + + Attribute that marks a handler to process message updates. + This handler will be triggered when users send messages in chats. + + + + + Attribute that marks a handler to process message updates. + This handler will be triggered when users send messages in chats. + + + + + Checks if the update contains a valid message. + + The filter execution context containing the update. + True if the update contains a message; otherwise, false. + + + + Abstract base class for handlers that process message updates. + Provides convenient methods for sending replies and responses to messages. + + + + + Abstract base class for handlers that process message updates. + Provides convenient methods for sending replies and responses to messages. + + + + + Sends a reply message to the current message. + + The text of the message to send. + The parse mode for the message text. + The reply markup for the message. + Options for link preview generation. + The thread ID for forum topics. + The message entities to include. + Whether to disable notification for the message. + Whether to protect the message content. + The message effect ID. + The business connection ID. + Whether to allow paid broadcast. + + + The cancellation token. + The sent message. + + + + Sends a responce message to the current chat. + + The text of the message to send. + The parse mode for the message text. + The reply parameters for the message. + The reply markup for the message. + Options for link preview generation. + The thread ID for forum topics. + The message entities to include. + Whether to disable notification for the message. + Whether to protect the message content. + The message effect ID. + The business connection ID. + Whether to allow paid broadcast. + + + The cancellation token. + The sent message. + + + + Abstract base class for branching handlers that process message updates. + Provides convenient methods for sending replies and responses to messages in branching scenarios. + + + + + Abstract base class for branching handlers that process message updates. + Provides convenient methods for sending replies and responses to messages in branching scenarios. + + + + + Sends a reply message to the current message. + + The text of the message to send. + The parse mode for the message text. + The reply markup for the message. + Options for link preview generation. + The thread ID for forum topics. + The message entities to include. + Whether to disable notification for the message. + Whether to protect the message content. + The message effect ID. + The business connection ID. + Whether to allow paid broadcast. + + + The cancellation token. + The sent message. + + + + Sends a response message to the current chat. + + The text of the message to send. + The parse mode for the message text. + The reply parameters for the message. + The reply markup for the message. + Options for link preview generation. + The thread ID for forum topics. + The message entities to include. + Whether to disable notification for the message. + Whether to protect the message content. + The message effect ID. + The business connection ID. + Whether to allow paid broadcast. + + + The cancellation token. + The sent message. + + + + Provides usefull helper methods for abstract handler containers + + + + + Changes bot's reaction to message + + + + + + + + + + Changes bot's reaction to message + + + + + + + + + + Sends a reply message to the current message. + + + The text of the message to send. + The parse mode for the message text. + The reply markup for the message. + Options for link preview generation. + The thread ID for forum topics. + The message entities to include. + Whether to disable notification for the message. + Whether to protect the message content. + The message effect ID. + The business connection ID. + Whether to allow paid broadcast. + + + The cancellation token. + The sent message. + + + + Sends a responce message to the current chat. + + + The text of the message to send. + The parse mode for the message text. + The reply parameters for the message. + The reply markup for the message. + Options for link preview generation. + The thread ID for forum topics. + The message entities to include. + Whether to disable notification for the message. + Whether to protect the message content. + The message effect ID. + The business connection ID. + Whether to allow paid broadcast. + + + The cancellation token. + The sent message. + + + + Responces to message that this CallbackQuery was originated from + + + + + + + + + + + + + + + + + + + + + + + Edits message text that this CallbackQuery was originated from + + + + + + + + + + + + + + Use this method to send answers to callback queries sent from inline keyboards. + The answer will be displayed to the user as a notification at the top of the chat screen or as an alert + + + Alternatively, the user can be redirected to the specified Game URL. + For this option to work, you must first create a game for your bot via @BotFather and accept the terms. + Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter. + + + + + + + + + + + + Answers inline query + + + + + + + + + + + + + Interface for reactive Telegram bot implementations. + Defines the core properties and capabilities of a reactive bot. + + + + + Gets the update router for handling incoming updates. + + + + + Centralized logging system for Telegrator. + Provides static access to logging functionality with adapter support. + + + + + Gets the current adapters count. + + + + + Minimal level of logging messages. + Any messages below thi value will not be writen! + + + + + Adds a logger adapter to the centralized logging system. + + The logger adapter to add. + + + + Removes a logger adapter from the centralized logging system. + + The logger adapter to remove. + + + + Clears all logger adapters. + + + + + Logs a message to all registered adapters. + + The log level. + The message to log. + Optional exception. + + + + + Logs a trace message to all registered adapters. + + The message to log. + + + + Logs a trace message to all registered adapters. + + The message to log. + + + + + Logs a debug message to all registered adapters. + + The message to log. + + + + Logs a debug message to all registered adapters. + + The message to log. + + + + + Logs an information message to all registered adapters. + + The message to log. + + + + Logs an information message to all registered adapters. + + The message to log. + + + + + Logs a warning message to all registered adapters. + + The message to log. + + + + Logs a warning message to all registered adapters. + + The message to log. + + + + + Logs an error message to all registered adapters. + + The message to log. + Optional exception. + + + + Logs an error message to all registered adapters. + + The message to log. + + + + + Logs an error message with exception only to all registered adapters. + + The exception to log. + + + + Logs an error message to all registered adapters. + + The message to log. + Optional exception. + + + + + Console logger implementation that writes to System.Console. + This logger is optional and can be used for simple console output. + + + + + Initializes a new instance of ConsoleLogger. + + Minimum log level to output. Default is Information. + Whether to include timestamp in log messages. Default is true. + + + + + + + Interface for Telegrator logging system. + Provides abstraction for logging without external dependencies. + + + + + Logs a message with specified level. + + The log level. + The message to log. + Optional exception. + + + + Log levels for Telegrator logging system. + + + + + Trace level - most detailed logging. + + + + + Debug level - detailed debugging information. + + + + + Information level - general information. + + + + + Warning level - warning messages. + + + + + Error level - error messages. + + + + + Null logger implementation that does nothing. + Used when logging is not required or disabled. + + + + + Singleton instance of NullLogger. + + + + + + + + Descriptor for creating handlers from methods + + + + + + Initializes new instance of + + + + + + Contains information about a described handler, including its context, client, and execution logic. + + + + + descriptor from that handler was described from + + + + + The update router associated with this handler. + + + + + The awaiting provider to fetch new updates inside handler + + + + + The Telegram bot client used for this handler. + + + + + The handler instance being described. + + + + + Extra data associated with the handler execution. + + + + + List of completed filters for this handler. + + + + + The update being handled. + + + + + Lifetime token for the handler instance. + + + + + Display string for the handler (for debugging or logging). + + + + + The final execution result. + + + + + Initializes a new instance of the class. + + descriptor from that handler was described from + + The update router. + The Telegram bot client. + The handler instance. + The filter execution context. + Optional display string. + + + + + + + Manages the execution of pre and post-execution aspects for a handler. + This class coordinates between self-processing (handler implements interfaces) + and typed processing (external processor classes). + + + + + Gets the type of the external pre-processor, if specified via . + + + + + Gets the type of the external post-processor, if specified via . + + + + + Initializes a new instance of the class. + + The type of external pre-processor, if any. + The type of external post-processor, if any. + + + + Executes the pre-execution aspect for the handler. + + The handler instance. + The handler container with update context. + + A indicating whether execution should continue. + Thrown when handler claims to implement but doesn't. + + + + Executes the post-execution aspect for the handler. + + The handler instance. + The handler container with update context. + + A indicating the final execution result. + Thrown when handler claims to implement but doesn't. + + + + Represents a set of filters for a handler descriptor, including update and state keeper validators. + + + + + Validator for the update object. + + + + + Validator for the state keeper. + + + + + Array of update filters. + + + + + Initializes a new instance of the class. + + Validator for the update object. + Validator for the state keeper. + Array of update filters. + + + + Validates the filter context using all filters in the set. + + The filter execution context. + + + True if all filters pass; otherwise, false. + + + + Represents an indexer for handler descriptors, containing importance and priority information. + + + + + Represents an indexer for handler descriptors, containing importance and priority information. + + + + + Index of this descriptor when it was added to router + + + + + Of this handlert type + + + + + The priority of the handler. + + + + + Initializes a new instance of the struct from a handler attribute. + + + The handler attribute. + + + + Returns a new with updated priority. + + The new priority value. + A new instance. + + + + Returns a new with updated importance. + + The new importance value. + A new instance. + + + + Returns a new with updated RouterIndex. + + + A new instance. + + + + Compares this instance to another . + + The other indexer to compare to. + An integer indicating the relative order. + + + + Returns a string representation of the indexer. + + A string in the format (C:importance, P:priority). + + + + Specifies the type of handler descriptor. + + + + + General handler descriptor. + + + + + Keyed handler descriptor (uses a service key). + + + + + Implicit handler descriptor. + + + + + Singleton handler descriptor (single instance). + + + + + Describes a handler, its type, filters, and instantiation logic. + + + + + The type of the descriptor. + + + + + The type of the handler. + + + + + The update type handled by this handler. + + + + + The indexer for handler concurrency and priority. + + + + + Gets or sets a value indicating whether to form a fallback report. + + + + + The set of filters associated with this handler. + + + + + Gets or sets the aspects configuration for this handler. + Contains pre and post-execution processors if the handler uses the aspect system. + + + + + The service key for keyed handlers. + + + + + Factory for creating handler instances. + + + + + Singleton instance of the handler, if applicable. + + + + + Display string for the handler (for debugging or logging). + + + + + Gets or sets a function for 'lazy' handlers initialization + + + + + Initializes a new instance of the class with the specified descriptor type and handler type. + Automatically inspects the handler type to extract attributes, filters, and configuration. + + The type of the descriptor + The type of the handler to describe + + Thrown when the handler type is not compatible with the expected handler type + + + + Initializes a new instance of the class as a keyed handler with the specified service key. + + The type of the handler to describe + The service key for dependency injection + Thrown when is null + + + + Initializes a new instance of the class with all basic properties. + + The type of the descriptor + The type of the handler + The type of update this handler processes + The indexer for handler concurrency and priority + The set of filters associated with this handler + + + + Initializes a new instance of the class with singleton instance support. + + The type of the descriptor + The type of the handler + The type of update this handler processes + The indexer for handler concurrency and priority + The set of filters associated with this handler + The service key for dependency injection + The singleton instance of the handler + Thrown when or is null + + + + Initializes a new instance of the class with instance factory support. + + The type of the descriptor + The type of the handler + The type of update this handler processes + The indexer for handler concurrency and priority + The set of filters associated with this handler + Factory for creating handler instances + Thrown when is null + + + + Initializes a new instance of the class with service key and instance factory support. + + The type of the descriptor + The type of the handler + The type of update this handler processes + The indexer for handler concurrency and priority + The set of filters associated with this handler + The service key for dependency injection + Factory for creating handler instances + Thrown when or is null + + + + Initializes a new instance of the class with polling handler attribute and filters. + + The type of the descriptor + The type of the handler + The polling handler attribute containing configuration + Optional array of filters to apply + Optional state keeping filter + + + + Initializes a new instance of the class with polling handler attribute, filters, and singleton instance. + + The type of the descriptor + The type of the handler + The polling handler attribute containing configuration + Optional array of filters to apply + Optional state keeping filter + The service key for dependency injection + The singleton instance of the handler + Thrown when or is null + + + + Initializes a new instance of the class with polling handler attribute, filters, and instance factory. + + The type of the descriptor + The type of the handler + The polling handler attribute containing configuration + Optional array of filters to apply + Optional state keeping filter + Factory for creating handler instances + Thrown when is null + + + + Initializes a new instance of the class with polling handler attribute, filters, service key, and instance factory. + + The type of the descriptor + The type of the handler + The polling handler attribute containing configuration + Optional array of filters to apply + Optional state keeping filter + The service key for dependency injection + Factory for creating handler instances + Thrown when or is null + + + + Initializes a new instance of the class with validation filter support. + + The type of the descriptor + The type of the handler + The type of update this handler processes + The indexer for handler concurrency and priority + Optional validation filter + Optional array of filters to apply + Optional state keeping filter + + + + Initializes a new instance of the class with validation filter and singleton instance support. + + The type of the descriptor + The type of the handler + The type of update this handler processes + The indexer for handler concurrency and priority + Optional validation filter + Optional array of filters to apply + Optional state keeping filter + The service key for dependency injection + The singleton instance of the handler + Thrown when or is null + + + + Initializes a new instance of the class with validation filter and instance factory support. + + The type of the descriptor + The type of the handler + The type of update this handler processes + The indexer for handler concurrency and priority + Optional validation filter + Optional array of filters to apply + Optional state keeping filter + Factory for creating handler instances + Thrown when is null + + + + Initializes a new instance of the class with validation filter, service key, and instance factory support. + + The type of the descriptor + The type of the handler + The type of update this handler processes + The indexer for handler concurrency and priority + Optional validation filter + Optional array of filters to apply + Optional state keeping filter + The service key for dependency injection + Factory for creating handler instances + Thrown when or is null + + + + Sets singleton instance of this descriptor + Throws exception if instance already set + + + + + + + Tries to set singleton instance of this descriptor + + + + + + + + + + The collection containing the 's. Used to route 's in + + + + + Gets a value indicating whether the collection is read-only. + + + + + Gets the of handlers in this collection. + + + + + Gets count of registered handlers in list + + + + + Gets or sets the at the specified index. + + + + + + + Initializes a new instance of the class without a specific . + + + + + Initializes a new instance of the class. + + The update type for the handlers. + The collecting options. + + + + Adds a new to the collection. + + The handler descriptor to add. + Thrown if the collection is frozen. + Thrown if the update type does not match. + + + + Checks if the collection contains a with the specified . + + The descriptor indexer. + True if the descriptor exists; otherwise, false. + + + + Removes the with the specified from the collection. + + The descriptor indexer. + True if the descriptor was removed; otherwise, false. + + + + Removes the from the collection. + + + + + + + Removes all descriptos from the + + + + + Freezes the and prohibits adding new elements to it. + + + + + + + + + + + Provides methods for inspecting handler types and retrieving their attributes and filters. + + + + + Gets handler's display name + + + + + + + Gets the handler attribute from the specified member info. + + The member info representing the handler type. + The handler attribute. + + + + Gets the state keeper attribute from the specified member info, if present. + + The member info representing the handler type. + The state keeper attribute, or null if not present. + + + + Gets all filter attributes for the specified handler type and update type. + + The member info representing the handler type. + The valid update type. + An enumerable of filter attributes. + + + + Gets the aspects configuration for the specified handler type. + Inspects the handler for both self-processing (implements interfaces) and typed processing (uses attributes). + + The type of the handler to inspect. + A containing the aspects configuration. + + + + Provider for managing awaiting handlers that can wait for specific update types. + + + + + Registers the usage of a handler and returns a disposable object to manage its lifetime. + + The to use. + An that manages the handler's usage lifetime. + + + + Interface for providers that collect and manage handler collections. + Provides access to a collection of handlers for various processing operations. + + + + + Gets the collection of handlers managed by this provider. + + + + + Collection class for managing handler descriptors organized by update type. + Provides functionality for collecting, adding, and organizing handlers. + + + + + Gets the collection of 's allowed by registered handlers + + + + + Gets the collection of keys for the handler lists. + + + + + Gets the collection of values. + + + + + Gets the for the specified . + + The update type key. + The handler descriptor list for the given update type. + + + + Adds a to the collection and returns the updated collection. + + The handler descriptor to add. + The updated . + + + + Combines and . + Provides functionality of collecting, organizing and resolving handlers instances. + + + + + Provides methods to retrieve and describe handler information for updates. + + + + + Gets the collection of 's allowed by registered handlers + + + + + + + + + + + + + Instantiates a handler for the given descriptor, using the appropriate creation strategy based on descriptor type. + Supports singleton, implicit, keyed, and general descriptor types with different instantiation patterns. + + The handler descriptor. + + An instance of for the descriptor + + + + Determines whether the provider contains any handlers. + + True if the provider is empty; otherwise, false. + + + + Interface for polling providers that manage both regular and awaiting handlers. + Provides access to handlers for different types of update processing during polling operations. + + + + + Gets the that manages handlers for polling. + + + + + Gets the that manages awaiting handlers for polling. + + + + + Interface for handling exceptions that occur during update routing operations. + Provides a centralized way to handle and log errors that occur during bot operation. + + + + + Handles exceptions that occur during update routing. + + The instance. + The exception that occurred. + The indicating the source of the error. + The cancellation token. + + + + Represents a delegate for when a handler is enqueued. + + The for the enqueued handler. + + + + Represents a delegate for when a handler is executing. + + The for the executing handler. + + + + Provides a pool for managing the execution and queuing of update handlers. + + + + + Occurs when a handler is enqueued. + + + + + Occurs when a handler is entering execution. + + + + + Enqueues a collection of handlers for execution. + + The handlers to enqueue. + + + + Interface for update routers that handle incoming updates and manage handler execution. + Combines update handling capabilities with polling provider functionality and exception handling. + + + + + Gets the for the router. + + + + + Gets the that manages handler execution. + + + + + Gets or sets the for handling exceptions. + + + + + Default hand;er container factory + + + + + + + + + + + Name of button + + + + + Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes + + + + + + + + + + + Name of button + + + + + + + + + + + Name of button + + + + + Description of the button that copies the specified text to the clipboard. + + + + + + + + + + + Name of button + + + + + + + + + + + Name of button + + + + + An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget. + + + + + + + + + + + Name of button + + + + + HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<UserId> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings. + + + + + + + + + + + Name of button + + + + + Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method AnswerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account. + + + + + + + + + + + Name of button + + + + + If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account. + + + + + + + + + + + Name of button + + + + + If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.

This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account. +
+
+ + + + + + + + + Name of button + + + + + Signed 32-bit identifier of the request that will be received back in the object. Must be unique within the message + + + + + Pass to request a channel chat, pass to request a group or a supergroup chat. + + + + + + + + + + + Name of button + + + + + + + + + + + Name of button + + + + + + + + + + + Name of button + + + + + If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only. + + + + + + + + + + + Name of button + + + + + Signed 32-bit identifier of the request that will be received back in the object. Must be unique within the message + + + + + Optional. The maximum number of users to be selected; 1-10. Defaults to 1. + + + + + Delegate used to handle exception + + + + + + + + + Realizes using function delegate + + + + + + Realizes using function delegate + + + + + + + + + Reactive implementation of for polling updates from Telegram. + Provides custom update receiving logic with error handling and configuration options. + + The Telegram bot client for making API requests. + Optional receiver options for configuring update polling behavior. + + + + Reactive implementation of for polling updates from Telegram. + Provides custom update receiving logic with error handling and configuration options. + + The Telegram bot client for making API requests. + Optional receiver options for configuring update polling behavior. + + + + Gets the receiver options for configuring update polling behavior. + + + + + Gets the Telegram bot client for making API requests. + + + + + Receives updates from Telegram using long polling. + Handles update processing, error handling, and cancellation. + + The update handler to process received updates. + The cancellation token to stop receiving updates. + A task representing the asynchronous update receiving operation. + + + + + Starts receiving s invoking for each . + + This method will block if awaited. + + + The used for processing s + The with which you can stop receiving + A that will be completed when cancellation will be requested through + + + + Implementation of that manages the execution of handlers. + Provides thread-safe queuing and execution of handlers with configurable concurrency limits. + + + + + Synchronization object for thread-safe operations. + + + + + Semaphore for controlling the number of concurrently executing handlers. + + + + + The bot configuration options. + + + + + The global cancellation token for stopping all operations. + + + + + Flag indicating whether the pool has been disposed. + + + + + + + + + + + Initializes a new instance of the class. + + The update handler that claims updates + The bot configuration options. + The global cancellation token. + + + + + + + Disposes of the handlers pool and releases all resources. + + + + + Implementation of that routes updates to appropriate handlers. + Manages the distribution of updates between regular handlers and awaiting handlers. + + + + + + + + + + + + + + + + + + + + + + + Initializes a new instance of the class. + + The provider for regular handlers. + The provider for awaiting handlers. + The bot configuration options. + + + + + Initializes a new instance of the class with a custom handlers pool. + + The provider for regular handlers. + The provider for awaiting handlers. + The bot configuration options. + The custom handlers pool to use. + + + + + Handles errors that occur during update processing. + + The Telegram bot client. + The exception that occurred. + The source of the error. + The cancellation token. + A task representing the asynchronous error handling operation. + + + + Handles incoming updates by routing them to appropriate handlers. + + The Telegram bot client. + The update to handle. + The cancellation token. + A task representing the asynchronous update handling operation. + + + + Gets the handlers that match the specified update, using the provided router and client. + Searches for handlers by update type, falling back to Unknown type if no specific handlers are found. + + The privode used to get handlers instance + The Telegram bot client instance + The incoming Telegram update to process + + A collection of described handler information for the update + + + + Describes all handler descriptors for a given update context. + Processes descriptors in reverse order and respects the ExecuteOnlyFirstFoundHanlder option. + + The privode used to get handlers instance + The list of handler descriptors to process + The Telegram bot client instance + The incoming Telegram update to process + + A collection of described handler information + + + + Describes a single handler descriptor for a given update context. + Validates the handler's filters against the update and creates a handler instance if validation passes. + + The privode used to get handlers instance + The handler descriptor to process + The Telegram bot client instance + The incoming Telegram update to process + + + The described handler info if validation passes; otherwise, null + + + + Methos used to log received object + + + + + + + Provider for managing awaiting handlers that can wait for specific update types. + Extends HandlersProvider to provide functionality for creating and managing awaiter handlers. + + The bot configuration options. + + + + Provider for managing awaiting handlers that can wait for specific update types. + Extends HandlersProvider to provide functionality for creating and managing awaiter handlers. + + The bot configuration options. + + + + List of handler descriptors for awaiting handlers. + + + + + + + + + + + Token for managing the lifetime of a handler in the awaiting provider. + Implements IDisposable to automatically remove the handler when disposed. + + The list of handler descriptors. + The handler descriptor to manage. + + + + Token for managing the lifetime of a handler in the awaiting provider. + Implements IDisposable to automatically remove the handler when disposed. + + The list of handler descriptors. + The handler descriptor to manage. + + + + Registers the handler descriptor in the handlers list. + + Thrown when the handler descriptor has no singleton instance. + + + + Disposes of the handler token by removing the handler descriptor from the list. + + + + + Collection class for managing handler descriptors organized by update type. + Provides functionality for collecting, adding, and organizing handlers. + + Optional configuration options for handler collecting. + + + + Collection class for managing handler descriptors organized by update type. + Provides functionality for collecting, adding, and organizing handlers. + + Optional configuration options for handler collecting. + + + + Gets the collection of 's allowed by registered handlers + + + + + Dictionary that organizes handler descriptors by update type. + + + + + Configuration options for handler collecting. + + + + + Gets whether handlers must have a parameterless constructor. + + + + + List of command aliases that have been registered. + + + + + + + + + + + + + + + + + Adds a handler descriptor to the collection. + + The handler descriptor to add. + This collection instance for method chaining. + Thrown when the handler type doesn't have a parameterless constructor and MustHaveParameterlessCtor is true. + + + + Gets the for the specified . + + The handler descriptor. + The handler descriptor list containing the descriptor. + + + + Checks for intersecting command aliases and handles them according to configuration. + + The handler descriptor to check for command aliases. + Thrown when intersecting command aliases are found and ExceptIntersectingCommandAliases is enabled. + + + + Provides functionality of incrementally collecting, organizing and resolving handlers instances. + Minimum implementation of . Abstract class, still requires handler instance resolving. + + + + + + Provides functionality of incrementally collecting, organizing and resolving handlers instances. + Minimum implementation of . Abstract class, still requires handler instance resolving. + + + + + + Dictionary that organizes handler descriptors by update type. + + + + + Gets the collection of Telegram.Bot.Types.Enums.UpdateType's allowed by registered handlers + + + + + Configuration options for handler collecting. + + + + + Gets whether handlers must have a parameterless constructor. + + + + + List of command aliases that have been registered. + + + + + + + + + + + + + + + + + + + + Gets the for the specified . + + The handler descriptor. + The handler descriptor list containing the descriptor. + + + + Checks for intersecting command aliases and handles them according to configuration. + + The handler descriptor to check for command aliases. + Thrown when intersecting command aliases are found and ExceptIntersectingCommandAliases is enabled. + + + + + + + + + + + + + Provides handler resolution and instantiation logic for Telegram bot updates. + Responsible for mapping update types to handler descriptors, filtering handlers based on update context, + and creating handler instances with appropriate lifecycle management. + + + + + + + + Read-only dictionary mapping to lists of handler descriptors. + Each descriptor list is frozen to prevent modification after initialization. + + + + + Configuration options for the bot and handler execution behavior. + + + + + Initializes a new instance of with the specified handler collections and configuration. + + Collection of handler descriptor lists organized by update type + Configuration options for the bot and handler execution + Thrown when options or botInfo is null + + + + Initializes a new instance of with the specified handler collections and configuration. + + Collection of handler descriptor lists organized by update type + Configuration options for the bot and handler execution + Thrown when options or botInfo is null + + + + Thrown when the descriptor type is not recognized + + + + + + + + + + Interface for classes that can provide custom handler descriptors. + Allows classes to define their own handler description logic beyond the standard reflection-based approach. + + + + + Describes the handlers provided by this class. + + A collection of handler descriptors. + + + + Represents handler results, allowing to communicate with router and control aspect execution + + + + + Is result positive + + + + + Should router search for next matching handler + + + + + Exact type that router should search + + + + + Represents 'success' + + Inside - let handler's main block be executed + Inside - tells that he can stop describing, as needed handler was found + Inside - let continue describing + + + + + + + Represents 'fault' or 'error'. Use cases: + + Inside - interupts execution of handler, main block and wont be executed + Inside - interupts 's describing sequence + + + + + + + Represents 'continue'. Use cases: + + Inside - let continue describing + Inside - Tells to continue describing handlers + + + + + + + Represents 'chain'. Use cases: + + Inside - Tells to continue describing handlers and execute only handlers of exact type + + + + + + + + Provides extension methods for working with collections. + + + + + Creates a from an + according to a specified key selector function. + + + + + + + + + + Enumerates objects in a and executes an on each one + + + + + + + + + Sets the value of a key in a dictionary, or if the key does not exist, adds it + + + + + + + + + + Sets the value of a key in a dictionary, or if the key does not exist, adds its default value. + + + + + + + + + + + Return the random object from + + + + + + + + Return the random object from + + + + + + + + + Adds a range of elements to collection if they dont already exist using default equality comparer + + + + + + + + Return index of first element that satisfies the condition + + + + + + + + + Returns the only element of a sequence, or a default value if the sequence is empty. + This method returns default if there is more than one element in the sequence. + + + + + + + + Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists. + This method return default if more than one element satisfies the condition. + + + + + + + + + Provides extension methods for reflection and type inspection. + + + + + Checks if a type implements the interface. + + The type to check. + True if the type implements ICustomDescriptorsProvider; otherwise, false. + + + + Checks if is a + + + + + + + Checks if is a descendant of class + + + + + + + Checks if is an implementation of class or its descendants + + + + + + + Checks if has a parameterless constructor + + + + + + + Checks is has public properties + + + + + + + Determines whether an instance of a specified type can be assigned to an instance of the current type + + + + + + + + Provides extension methods for string manipulation. + + + + + Slices a string into a array of substrings of fixed + + + + + + + + Return new string with first found letter set to upper case + + + + + + + Return new string with first found letter set to lower case + + + + + + + Checks if string contains a 'word'. + 'Word' must be a separate member of the text, and not have any alphabetic characters next to it. + + + + + + + + + + Contains extension method for number types + + + + + Check if int value has int flag using bit compare + + + + + + + + Check if int value has enum flag using bit compare + + + + + + + + + Abstract base class for state keepers that manage state transitions using an array of predefined states. + Provides forward and backward navigation through a fixed sequence of states. + + The type of the key used to identify state contexts. + The type of the state values. Must be non-null. + The array of states that define the allowed state sequence. + + + + Abstract base class for state keepers that manage state transitions using an array of predefined states. + Provides forward and backward navigation through a fixed sequence of states. + + The type of the key used to identify state contexts. + The type of the state values. Must be non-null. + The array of states that define the allowed state sequence. + + + + The array of states that defines the allowed state sequence for navigation. + + + + + Moves to the previous state in the array sequence. + + The current state to move backward from. + The key parameter (unused in this implementation). + The previous state in the array sequence. + Thrown when the current state is not found in the array. + Thrown when trying to move backward from the first state. + + + + Moves to the next state in the array sequence. + + The current state to move forward from. + The key parameter (unused in this implementation). + The next state in the array sequence. + Thrown when the current state is not found in the array. + Thrown when trying to move forward from the last state. + + + + Resolves chat ID from Telegram updates for state management purposes. + Extracts the chat identifier from various types of updates to provide a consistent key for state operations. + + + + + Resolves the chat ID from a Telegram update. + + The Telegram update to extract the chat ID from. + The chat ID as a long value. + Thrown when the update does not contain a valid chat ID. + + + + Defines a resolver for extracting a key from an update for state keeping purposes. + + The type of the key. + + + + Resolves a key from the specified . + + The update to resolve the key from. + The resolved key. + + + + Base class for managing state associated with updates and keys. + + The type of the key used for state resolution. + The type of the state. + + + + Gets or sets the key resolver used to resolve keys from updates. + + + + + Gets the default state value. + + + + + Sets the state for the specified update. + + The update to use as a key source. + The new state value. + + + + Gets the state for the specified update. + + The update to use as a key source. + The state value. + + + + Tries to get the state for the specified update. + + The update to use as a key source. + When this method returns, contains the state value if found; otherwise, the default value. + True if the state was found; otherwise, false. + + + + Determines whether a state exists for the specified update. + + The update to use as a key source. + True if the state exists; otherwise, false. + + + + Creates a state for the specified update using the default state value. + + The update to use as a key source. + + + + Deletes the state for the specified update. + + The update to use as a key source. + + + + Moves the state forward for the specified update. + + The update to use as a key source. + + + + Moves the state backward for the specified update. + + The update to use as a key source. + + + + Moves the state forward for the specified current state and key. + + The current state value. + The key. + The new state value. + + + + Moves the state backward for the specified current state and key. + + The current state value. + The key. + The new state value. + + + + State keeper implementation for enum-based states. + Automatically creates an array of all enum values for state navigation. + + The enum type to be used for state management. + + + + State keeper implementation for enum-based states. + Automatically creates an array of all enum values for state navigation. + + The enum type to be used for state management. + + + + Gets the default state, which is the first value in the enum. + + + + + Extension methods for working with enum-based states in handler containers. + Provides convenient methods for state management operations. + + + Provides extension methods for managing numeric states in handler containers. + + + Provides extension methods for managing string states in handler containers. + + + + + Gets the enum state keeper for the specified enum type. + + The enum type to get the state keeper for. + The handler container (unused parameter for extension method syntax). + The enum state keeper instance. + + + + Creates a new enum state for the current update. + + The enum type for state management. + The handler container. + + + + Deletes the enum state for the current update. + + The enum type for state management. + The handler container. + + + + Sets the enum state to a specific value for the current update. + + The enum type for state management. + The handler container. + The new state value. If null, uses the default state. + + + + Moves the enum state forward to the next value in the enum sequence. + + The enum type for state management. + The handler container. + + + + Moves the enum state backward to the previous value in the enum sequence. + + The enum type for state management. + The handler container. + + + + Gets the numeric state keeper instance associated with the handler container. + + The handler container instance + The instance + + + + Creates a new numeric state for the current update being handled. + + The handler container instance + + + + Deletes the numeric state for the current update being handled. + + The handler container instance + + + + Sets the numeric state for the current update being handled. + If the new state is null, uses the default state from the state keeper. + + The handler container instance + The new numeric state to set, or null to use default + + + + Moves the numeric state forward by incrementing the current value. + + The handler container instance + + + + Moves the numeric state backward by decrementing the current value. + + The handler container instance + + + + Gets the string state keeper instance associated with the handler container. + + The handler container instance + The instance + + + + Creates a new string state for the current update being handled. + + The handler container instance + + + + Deletes the string state for the current update being handled. + + The handler container instance + + + + Sets the string state for the current update being handled. + If the new state is null, uses the default state from the state keeper. + + The handler container instance + The new string state to set, or null to use default + + + + State keeper that manages numeric (integer) states for chat sessions. + Inherits from with long keys and int states. + Provides automatic increment/decrement functionality for state transitions. + + + + + Gets the default state value, which is 1. + + + + + Moves the numeric state backward by decrementing the current state value. + + The current numeric state value + The chat ID (unused in this implementation) + The decremented state value + + + + Moves the numeric state forward by incrementing the current state value. + + The current numeric state value + The chat ID (unused in this implementation) + The incremented state value + + + + Resolves sender ID from Telegram updates for state management purposes. + Extracts the sender identifier from various types of updates to provide a consistent key for state operations. + + + + + Resolves the sender ID from a Telegram update. + + The Telegram update to extract the sender ID from. + The sender ID as a long value. + Thrown when the update does not contain a valid sender ID. + + + + State keeper that manages string-based states for chat sessions. + + + + + State keeper that manages string-based states for chat sessions. + + + + + Gets the default state value, which is an empty string. + + + + + + + + + + + Implementation of that provides bot information. + Contains metadata about the Telegram bot including user details. + + + + + Implementation of that provides bot information. + Contains metadata about the Telegram bot including user details. + + + + + Gets the user information for the bot. + + + + + Main client class for the Telegrator library. + Extends TelegramBotClient with reactive capabilities for handling updates. + + + + + The update router for handling incoming updates. + + + + + + + + + + + + + + + + + Initializes a new instance of the class with a bot token. + + The bot token from BotFather. + Optional HTTP client for making requests. + The cancellation token. + + + + Initializes a new instance of the class with bot options. + + The Telegram bot client options. + Optional HTTP client for making requests. + The cancellation token. + + + + Initializes a new instance of the class with bot options and Telegrator options. + + The Telegram bot client options. + The Telegrator options. + Optional HTTP client for making requests. + The cancellation token. + + + + Starts receiving updates from Telegram. + Initializes the update router and begins polling for updates. + + Optional receiver options for configuring update polling. + The cancellation token to stop receiving updates. + + + + Internal method that starts the update receiving process. + Handles the reactive update receiver and error handling. + + Optional receiver options for configuring update polling. + The cancellation token to stop receiving updates. + + + + Configuration options for Telegram bot behavior and execution settings. + Controls various aspects of bot operation including concurrency, routing, and execution policies. + + + + + + + + + + + + + + + + + Provides usefull helper methods for messages + + + + + Substrings entity content from text + + + + + + + + + Checkes if sent contains command. Automatically cuts bot name from it + + + + + + + + Checkes if sent contains command. Automatically cuts bot name from it + + + + + + + + + Split message text into arguments, ignoring command instance. Splits by space character + + + + + + + + + + Tries to split message text into arguments, ignoring command instance. Splits by space character. Exception-free version of + + + + + + + + Extension methods for handler containers. + Provides convenient methods for creating awaiter builders and state keeping. + + + + + Creates an awaiter builder for a specific update type. + + The type of update to await. + The handler container. + The type of update to await. + An awaiter builder for the specified update type. + + + + Creates an awaiter builder for any update type. + + The handler container. + An awaiter builder for any update type. + + + + Creates an awaiter builder for message updates. + + The handler container. + An awaiter builder for message updates. + + + + Creates an awaiter builder for callback query updates. + + The handler container. + An awaiter builder for callback query updates. + + + + Gets a state keeper instance for the specified types. + + The type of the state key. + The type of the state value. + The type of the state keeper. + The handler container (unused). + The state keeper instance. + + + + Extensions methods for Awaiter Handler Builders + + + + + Awaits an update using the chat id key resolver and cancellation token. + + + + + + + + + Awaits an update using the sender id key resolver and cancellation token. + + + + + + + + + Extensions methods for awaiting providers + Provides convenient methods for creating awaiter builders. + + + + + Creates an awaiter handler builder for a specific update type. + + The type of update to await. + + The type of update to await. + The update that triggered the awaiter creation. + An awaiter handler builder for the specified update type. + + + + Creates an awaiter builder for any update type. + + + + An awaiter builder for any update type. + + + + Creates an awaiter builder for message updates. + + + + An awaiter builder for message updates. + + + + Creates an awaiter builder for callback query updates. + + + + An awaiter builder for callback query updates. + + + + Extesions method for handlers providers + + + + + Gets the list of bot commands supported by the provider. + + An enumerable of bot commands. + + + + Extension methods for handlers collections. + Provides convenient methods for creating implicit handlers. + + + + + Collects all public handlers from the current app domain. + Scans for types that implement handlers and adds them to the collection. + + This collection instance for method chaining. + Thrown when the entry assembly cannot be found. + + + + Collects all public handlers from the calling this function assembly. + Scans for types that implement handlers and adds them to the collection. + + This collection instance for method chaining. + Thrown when the entry assembly cannot be found. + + + + Creates a handler builder for a specific update type. + + The type of update to handle. + The handlers collection. + The type of update to handle. + A handler builder for the specified update type. + + + + Creates a handler builder for any update type. + + The handlers collection. + A handler builder for any update type. + + + + Creates a handler builder for message updates. + + The handlers collection. + A handler builder for message updates. + + + + Creates a handler builder for callback query updates. + + The handlers collection. + A handler builder for callback query updates. + + + + Adds a handler type to the collection. + + The handlers collection. + The type of handler to add. + This collection instance for method chaining. + + + + Adds a handler type to the collection. + + The handlers collection. + The type of handler to add. + This collection instance for method chaining. + Thrown when the type is not a valid handler implementation. + + + + Creates implicit handler from method + + + + + + + + + Provides extension methods for working with Telegram Update objects. + + + + + Selects from Update an object from which you can get the sender's ID + + + Sender's ID + + + + Selects from Update an object from which you can get the chat's ID + + + Sender's ID + + + + Selects from an object that contains information about the update + + + + + + + Selecting corresponding s for 's sub-type + + + + + + Selecting corresponding s for 's sub-type + + + + + + + Selects from an that contains information about the update + + + + + + + Provides extension methods for working with UpdateType enums. + + + + + 's that contain a message + + + + + Dictionary of s that suppresses to generic type for handling types that has complex multi-type handlers + + + + + Checks if matches one of the 's give on + + + + + + + + Checks if matches the given + + + + + + + + Returns an update object corresponding to the . + + + + + + + Adds a CallbackDataAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The data. + The same builder instance. + + + + Adds a CallbackInlineIdAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The inlineMessageId. + The same builder instance. + + + + Adds a CommandAlliasAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The alliases. + The same builder instance. + + + + Adds a ArgumentCountAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The count. + The same builder instance. + + + + Adds a ArgumentStartsWithAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The content. + The comparison. + The index. + The same builder instance. + + + + Adds a ArgumentEndsWithAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The content. + The comparison. + The index. + The same builder instance. + + + + Adds a ArgumentContainsAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The content. + The comparison. + The index. + The same builder instance. + + + + Adds a ArgumentEqualsAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The content. + The comparison. + The index. + The same builder instance. + + + + Adds a ArgumentRegexAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The pattern. + The options. + The index. + The same builder instance. + + + + Adds a IsDebugEnvironmentAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a IsReleaseEnvironmentAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a EnvironmentVariableAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The variable. + The value. + The comparison. + The same builder instance. + + + + Adds a EnvironmentVariableAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The variable. + The value. + The same builder instance. + + + + Adds a EnvironmentVariableAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The variable. + The same builder instance. + + + + Adds a EnvironmentVariableAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The variable. + The comparison. + The same builder instance. + + + + Adds a MentionedAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a MentionedAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The offset. + The same builder instance. + + + + Adds a MentionedAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The mention. + The same builder instance. + + + + Adds a MentionedAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The mention. + The offset. + The same builder instance. + + + + Adds a ChatIsForumAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a ChatIdAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The id. + The same builder instance. + + + + Adds a ChatTypeAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The type. + The same builder instance. + + + + Adds a ChatTypeAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The flags. + The same builder instance. + + + + Adds a ChatTitleAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The title. + The comparison. + The same builder instance. + + + + Adds a ChatTitleAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The title. + The same builder instance. + + + + Adds a ChatUsernameAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The userName. + The comparison. + The same builder instance. + + + + Adds a ChatUsernameAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The userName. + The same builder instance. + + + + Adds a ChatNameAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The firstName. + The lastName. + The comparison. + The same builder instance. + + + + Adds a ChatNameAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The firstName. + The lastName. + The same builder instance. + + + + Adds a MessageRegexAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The pattern. + The regexOptions. + The same builder instance. + + + + Adds a MessageRegexAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The regex. + The same builder instance. + + + + Adds a DiceThrowedAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The value. + The same builder instance. + + + + Adds a DiceThrowedAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The diceType. + The value. + The same builder instance. + + + + Adds a IsAutomaticFormwardMessageAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a IsFromOfflineMessageAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a IsServiceMessageMessageAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a IsTopicMessageMessageAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a MessageHasEntityAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The type. + The same builder instance. + + + + Adds a MessageHasEntityAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The type. + The offset. + The length. + The same builder instance. + + + + Adds a MessageHasEntityAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The type. + The content. + The stringComparison. + The same builder instance. + + + + Adds a MessageHasEntityAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The type. + The offset. + The length. + The content. + The stringComparison. + The same builder instance. + + + + Adds a MeRepliedAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a HasReplyAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The replyDepth. + The same builder instance. + + + + Adds a FromReplyChainAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The replyDepth. + The same builder instance. + + + + Adds a FromUsernameAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The username. + The same builder instance. + + + + Adds a FromUsernameAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The username. + The comparison. + The same builder instance. + + + + Adds a FromUserAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The firstName. + The lastName. + The comparison. + The same builder instance. + + + + Adds a FromUserAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The firstName. + The lastName. + The same builder instance. + + + + Adds a FromUserAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The firstName. + The same builder instance. + + + + Adds a FromUserAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The firstName. + The comparison. + The same builder instance. + + + + Adds a FromUserIdAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The userId. + The same builder instance. + + + + Adds a NotFromBotAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a FromBotAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a FromPremiumUserAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a TextStartsWithAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The content. + The comparison. + The same builder instance. + + + + Adds a TextEndsWithAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The content. + The comparison. + The same builder instance. + + + + Adds a TextContainsAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The content. + The comparison. + The same builder instance. + + + + Adds a TextEqualsAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The content. + The comparison. + The same builder instance. + + + + Adds a HasTextAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The same builder instance. + + + + Adds a TextContainsWordAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The word. + The comparison. + The startIndex. + The same builder instance. + + + + Adds a WelcomeAttribute target filter to the handler builder. + + The builder type. + The handler builder. + The onlyFirst. + The same builder instance. + +
+
diff --git a/src/Telegrator.Hosting.Web/Telegrator.Hosting.Web.csproj b/src/Telegrator.Hosting.Web/Telegrator.Hosting.Web.csproj index e80f306..d740ee2 100644 --- a/src/Telegrator.Hosting.Web/Telegrator.Hosting.Web.csproj +++ b/src/Telegrator.Hosting.Web/Telegrator.Hosting.Web.csproj @@ -26,9 +26,9 @@ - - - + + + diff --git a/src/Telegrator.Hosting/Telegrator.Hosting.csproj b/src/Telegrator.Hosting/Telegrator.Hosting.csproj index 9f37e60..23bf376 100644 --- a/src/Telegrator.Hosting/Telegrator.Hosting.csproj +++ b/src/Telegrator.Hosting/Telegrator.Hosting.csproj @@ -31,9 +31,9 @@ - - - + + + diff --git a/src/Telegrator/Telegrator.csproj b/src/Telegrator/Telegrator.csproj index 0b948c4..4624757 100644 --- a/src/Telegrator/Telegrator.csproj +++ b/src/Telegrator/Telegrator.csproj @@ -26,9 +26,9 @@ - - - + + + @@ -41,7 +41,7 @@ - + diff --git a/tests/Telegrator.Tests/Telegrator.Tests.csproj b/tests/Telegrator.Tests/Telegrator.Tests.csproj index 244fd58..e86bfe4 100644 --- a/tests/Telegrator.Tests/Telegrator.Tests.csproj +++ b/tests/Telegrator.Tests/Telegrator.Tests.csproj @@ -18,8 +18,8 @@ - - + +