REPOSITORY / ScuroNeko/Laniakea

Releases

RELEASES REPOSITORY
  • 1.0.0 RC 7 Pre-Release

    ScuroNeko released this 2026-03-24 13:45:19 +03:00 | 63 commits to dev since this release

    Release Notes

    • Extracted shared logger construction into package-level helpers: utils.CreateLogger(prefix, level) and utils.CreateFileLogger(prefix, level, filePath).
    • Unified logger initialization across Bot, tgapi.API, and tgapi.Uploader.
    • Added MsgContext.Logger, populated from the matched plugin and falling back to the bot logger when no plugin logger is configured.
    • Added plugin lifecycle/configuration methods: SetLogger, RemoveLogger, SetOnClose, and Close.
    • Bot.Close() now performs local resource teardown only and also invokes Plugin.Close() for registered plugins.
    • Added Bot.CloseRemote(ctx) for Telegram Bot API close, separating remote close from local cleanup.
    • Renamed local tgapi.API shutdown to Close().
    • Renamed Telegram Bot API close wrappers in tgapi.API to CloseRemote() and CloseRemoteWithContext().
    • Bot.Debug() now updates log levels for the bot logger, request logger, and already registered plugin loggers.
    • Bot.AddPlugins() now creates a default plugin logger automatically when one is not provided.
    • Bot.AddDatabaseLoggerWriter() now also attaches the writer to already registered plugin loggers.
    • Updated tests for the new shutdown and logging behavior.
    • Expanded godoc for the new APIs and documented plugin registration as a configuration commit point.

    Breaking Changes

    • (*Bot).Close(ctx context.Context) was replaced with (*Bot).Close().
    • (*Bot).CloseRemote(ctx context.Context) was added as the explicit wrapper for Telegram Bot API close.
    • (*tgapi.API).CloseApi() was renamed to (*tgapi.API).Close().
    • (*tgapi.API).Close() was renamed to (*tgapi.API).CloseRemote().
    • (*tgapi.API).CloseWithContext() was renamed to (*tgapi.API).CloseRemoteWithContext().

    Migration Guide

    • Replace bot.Close(ctx) with bot.Close().
    • If you need Telegram Bot API close, use bot.CloseRemote(ctx).
    • Replace api.CloseApi() with api.Close().
    • Replace api.Close() with api.CloseRemote().
    • Replace api.CloseWithContext(ctx) with api.CloseRemoteWithContext(ctx).
    • If you configure plugin loggers or OnClose, do so before calling bot.AddPlugins(...).

    Notes

    • Registering a plugin via AddPlugins is a configuration commit point; the plugin should not be mutated through the original *Plugin afterward.
    • If plugin loggers must receive a database writer, call AddDatabaseLoggerWriter(...) after registering plugins.

    Full Changelog: v1.0.0-rc.5...v1.0.0-rc.7

    Downloads