@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Interface PluginContext<TTools>

    interface PluginContext<TTools extends object = DefaultTools> {
        bot: Bot;
        logger: Logger;
        tools: TTools;
        config: Record<string, unknown>;
        onDispose(fn: () => void): void;
    }

    Type Parameters

    Index
    bot: Bot

    Scoped facade of the Bot; registrations auto-track their unsubscribers.

    logger: Logger
    tools: TTools
    config: Record<string, unknown>
    • Register extra cleanup to run when the plugin is unplugged.

      Parameters

      • fn: () => void

      Returns void