nyx Typedoc
    Preparing search index...

    Interface PluginManager

    An object that holds the objects and methods that make together a bot's plugin system.

    interface PluginManager {
        "[iterator]"(): IterableIterator<[Identifier, NyxPlugin], any, any>;
        entries(): IterableIterator<[Identifier, NyxPlugin]>;
        getEventBus(): EventBus<PluginEventArgs>;
        getPluginByClass<TPluginClass extends ClassImplements<NyxPlugin>>(
            PluginClass: TPluginClass,
            force: true,
        ): InstanceType<TPluginClass>;
        getPluginByClass<TPluginClass extends ClassImplements<NyxPlugin>>(
            PluginClass: TPluginClass,
            force: false,
        ): InstanceType<TPluginClass> | null;
        getPluginByClass<TPluginClass extends ClassImplements<NyxPlugin>>(
            PluginClass: TPluginClass,
            force?: boolean,
        ): InstanceType<TPluginClass> | null;
        getPluginById(id: Identifier): NyxPlugin | null;
        getPlugins(): ReadonlyCollection<Identifier, NyxPlugin>;
        keys(): IterableIterator<Identifier>;
        next(
            ...__namedParameters: [] | [any],
        ): IteratorResult<[Identifier, NyxPlugin], any>;
        onStart(): Awaitable<void>;
        onStop(): Awaitable<void>;
        register(...plugins: NyxPlugin[]): Awaitable<PluginManager>;
        return?(value?: any): IteratorResult<[Identifier, NyxPlugin], any>;
        subscribe(
            ...subscribers: EventSubscriber<PluginEventArgs, keyof PluginEventArgs>[],
        ): Awaitable<PluginManager>;
        throw?(e?: any): IteratorResult<[Identifier, NyxPlugin], any>;
        unregister(pluginOrId: Identifier | NyxPlugin): Awaitable<PluginManager>;
        values(): IterableIterator<NyxPlugin>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    • Returns IterableIterator<[Identifier, NyxPlugin], any, any>

    • Parameters

      • ...__namedParameters: [] | [any]

      Returns IteratorResult<[Identifier, NyxPlugin], any>

    • Parameters

      • Optionalvalue: any

      Returns IteratorResult<[Identifier, NyxPlugin], any>

    • Parameters

      • Optionale: any

      Returns IteratorResult<[Identifier, NyxPlugin], any>