Skip to content

Releases: MajMcCloud/TelegramBotFramework

vNext: Extensions, DI Examples, ActionManager & Serialization Upgrades

28 Jun 12:19
f95b0e8
Compare
Choose a tag to compare

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 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 and ImageSharp 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 of TelegramBotBase, EntityFrameworkCore, and other dependencies.
  • 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.

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

07 Jun 11:46
Compare
Choose a tag to compare
  • Adding missing IsGroup and IsChannel property to DeviceSession

6.6.2

25 Mar 14:15
Compare
Choose a tag to compare
  • adding more persian translations
  • Adding fix to session seralizer not recoginizing GUIDs

6.6.1

18 Feb 16:28
Compare
Choose a tag to compare

-Bugfix for json session serializer

6.6.0

14 Dec 14:53
afe2862
Compare
Choose a tag to compare
  • 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

06 Nov 20:13
Compare
Choose a tag to compare
  • fixing bot group issue #66
  • adding throwPendingUpdates to Quickstart

6.5.0

06 Nov 20:11
Compare
Choose a tag to compare
  • 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

10 Mar 15:03
Compare
Choose a tag to compare
  • adding SingleThread & ThreadPool queueing
  • adding IronSoftware drawing library
  • small bugfix for device session & message loop

6.3.2

28 Jan 03:49
93fda55
Compare
Choose a tag to compare
  • Russian translation added

6.3.1

24 Jan 21:18
Compare
Choose a tag to compare
  • Bugfix, adding missing DeviceSession to UpdateResult