Releases: MajMcCloud/TelegramBotFramework
Releases · MajMcCloud/TelegramBotFramework
vNext: Extensions, DI Examples, ActionManager & Serialization Upgrades
Major Highlights
1. New Examples and Dependency Injection
-
Dependency Injection Example Added:
- New project
Examples/DependencyInjection
demonstrating full dependency injection with Entity Framework Core (BotDbContext
,User
model, DI setup). - Shows forms using injected database context for user management and state.
- New project
-
New Middleware Example:
Examples/MiddlewareBaseBot
and associated forms demonstrate advanced message loop handling and middleware capabilities.
2. Action Manager Extension
- New Project:
TelegramBotBase.Extensions.ActionManager
- Provides an "Action Manager" for handling unhandled bot actions/callbacks, including navigation and value parsing.
- Supports custom actions for strings, integers, GUIDs, and navigation patterns (start with, end with, etc.).
- Includes detailed documentation on usage and extensibility.
3. PostgreSQL & Legacy JSON Session Serializers
- New Extension:
TelegramBotBase.Extensions.Serializer.Database.PostgreSql
- Enables session serialization and state management using PostgreSQL.
- Includes code, SQL schema, and documentation.
- New Extension:
TelegramBotBase.Extensions.Serializer.Legacy.NewtonsoftJson
- Allows state serialization using Newtonsoft.Json for legacy compatibility.
4. Image Extensions for IronSoftware
- New Project:
TelegramBotBase.Extensions.Images.IronSoftware
- Enables platform-independent image sending using IronSoftware’s drawing library.
- Adds helper methods for both
AnyBitmap
andImageSharp
images.
5. Other New Example Projects
- FileWatcher Example:
- Monitors directory changes and sends Telegram messages on file events.
- MiddlewareBaseBot, InlineAndReplyCombination, SystemCommandsBot, etc.:
- Several example bots updated or added to demonstrate features and integration patterns.
Upgrades and Improvements
- Nuget Packages Updated:
- Many
.csproj
files upgraded to use the latest versions ofTelegramBotBase
,EntityFrameworkCore
, and other dependencies.
- Many
- Project Structure Enhanced:
- Consistent use of package references over project references for
TelegramBotBase
in most example projects. - Added new README content, badges, and links for various packages and extension modules.
- Consistent use of package references over project references for
Documentation
-
README.md Expanded:
- New sections on Action Manager, Localizations, PostgreSQL/MSSQL/Legacy serializers, and all new example projects.
- Added links to Discord and Telegram support groups.
- Detailed usage instructions for new extensions and features.
-
New README files:
- Each extension and major new subproject now has its own README with installation, usage, and feature documentation.
Miscellaneous
- License Updated:
- Copyright year updated to 2025.
- Localization Updates:
- Added documentation and support for multiple language localizations.
- Bugfixes and Internal Improvements:
- Various improvements to serialization, error messages, and internal extension methods.
Notable New Files and Projects
TelegramBotBase.Extensions.ActionManager/
(new extension)TelegramBotBase.Extensions.Serializer.Database.PostgreSql/
TelegramBotBase.Extensions.Images.IronSoftware/
TelegramBotBase.Extensions.Serializer.Legacy.NewtonsoftJson/
Examples/DependencyInjection/
Examples/FileWatcher/
Examples/MiddlewareBaseBot/
v6.6.3
- Adding missing IsGroup and IsChannel property to DeviceSession
6.6.2
- adding more persian translations
- Adding fix to session seralizer not recoginizing GUIDs
6.6.1
-Bugfix for json session serializer
6.6.0
- adding example project for a directory/file watcher
- adding .NET 8 and .NET 9 to target frameworks
- adding source generator to add all API methods to DeviceSession
- replacing Newtonsoft.Json with System.Text.Json (for legacy serialization use the TelegramBotBase.Extensions.Serializer.Legacy.NewtonsoftJson nuget package
- replacing use of DeviceSession object type in most places with IDeviceSession interface
- small bug fixes
6.5.1
6.5.0
- adding an internal exception handler to catch InvalidOperationException and throw a new explicit one
- fixing invalid Action method handling in message loop, when already handled
- Adding callbackdata too long exception and checks
- Fix Action method handling, if handled by control already
- Remove of most try/catch's in DeviceSession
- adding Bot Group command fix
- Fixing the prototype solution of group commands detection
- adding null/empty checks to a lot of controls to prevent invalid configuration (previously received a Telegram exception)
- adding null/empty checks to bot command
- adding additional check to bot commands to prevent invalid configuration
6.4.1
- adding SingleThread & ThreadPool queueing
- adding IronSoftware drawing library
- small bugfix for device session & message loop
6.3.2
- Russian translation added
6.3.1
- Bugfix, adding missing DeviceSession to UpdateResult