Class ModuleEventHandler<E>

Type Parameters

Hierarchy

  • ModuleBaseHandler
    • ModuleEventHandler

Constructors

Properties

execute: GenericEventExecuteFunction<keyof ClientEvents>
once: boolean = false
type: string = ...

Methods

  • Checks if this handler is an unconfigured handler.

    Returns this is ModuleBaseHandler

    Whether this handler is an unconfigured handler.

  • Sets the execute function for this handler.

    Parameters

    • execute: E extends keyof ClientEvents
          ? GenericEventExecuteFunction<E<E>>
          : GenericExecuteFunction

      The execute function.

    Returns this

    This instance for chaining.

  • Set whether this event handler should only be called once.

    Parameters

    • once: boolean

      Whether this event handler should only be called once.

    Returns this

    This instance for chaining.

  • Validates the handler, ensuring the execute function is set.

    Returns boolean

    Whether the handler is valid.