Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Extendable

Base class for all Klasa Extendables. See {@tutorial CreatingExtendables} for more information how to use this class to build custom extendables.

tutorial

CreatingExtendables

Hierarchy

  • Piece
    • Extendable

Index

Constructors

constructor

Properties

Readonly client

client: Client

The client this Piece was created with.

since

0.0.1

Readonly directory

directory: string

The base directory this Piece is stored in.

since

0.0.1

enabled

enabled: boolean

Whether or not the Piece is enabled.

since

0.0.1

Readonly file

file: keyof string[]

The file location where this Piece is stored.

since

0.0.1

Private instancePropertyDescriptors

instancePropertyDescriptors: Record<string, PropertyDescriptor>

The instance property descriptors of this extendable

since

0.5.0

name

name: string

The name of the Piece.

since

0.0.1

Private originals

The original property descriptors for each of the original classes

since

0.5.0

Private staticPropertyDescriptors

staticPropertyDescriptors: Record<string, PropertyDescriptor>

The static property descriptors of this extendable

since

0.5.0

Readonly store

store: Store<Piece>

The store this Piece is from.

since

0.0.1

Accessors

appliesTo

  • get appliesTo(): any[]

path

  • get path(): string
  • The absolute path to this piece

    since

    0.0.1

    Returns string

type

  • get type(): string
  • The type of piece this is

    since

    0.0.1

    Returns string

Methods

disable

  • disable(): this

enable

  • enable(init?: boolean): this

init

  • init(): Promise<void>

reload

  • reload(): Promise<Piece | null>
  • Reloads this piece

    since

    0.0.1

    Returns Promise<Piece | null>

    The newly loaded piece

toJSON

  • toJSON(): Record<string, unknown>

toString

  • toString(): string
  • Defines toString behavior for pieces

    since

    0.0.1

    Returns string

    This piece name

unload

  • unload(): boolean
  • Unloads this piece

    since

    0.0.1

    Returns boolean

Generated using TypeDoc