Type Alias AkairoHandlerOptions<Module, Handler, Events>

AkairoHandlerOptions: {
    automateCategories?: boolean;
    classToHandle?: Class<Module>;
    directory: string;
    extensions?: Extension[] | Set<Extension>;
    loadFilter?: LoadPredicate;
}

Options for module loading and handling.

Type Parameters

Type declaration

  • OptionalautomateCategories?: boolean

    Whether or not to set each module's category to its parent directory name.

    false
    
  • OptionalclassToHandle?: Class<Module>

    Only classes that extends this class can be handled.

    AkairoModule
    
  • directory: string

    Directory to modules.

  • Optionalextensions?: Extension[] | Set<Extension>

    File extensions to load.

    [".js", ".json", ".ts"]
    
  • OptionalloadFilter?: LoadPredicate

    Filter for files to be loaded. Can be set individually for each handler by overriding the loadAll method.

    () => true