Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Piece

The common class for all pieces.

Hierarchy

Index

Constructors

constructor

  • since

    0.0.1

    Parameters

    • store: Store<Piece>

      The store this piece is for

    • directory: string

      The base directory to the pieces folder

    • file: keyof string[]

      The path from the pieces folder to the piece file

    • Default value options: PieceOptions = {}

      The options for this piece

    Returns Piece

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

name

name: string

The name of the Piece.

since

0.0.1

Readonly store

store: Store<Piece>

The store this Piece is from.

since

0.0.1

Accessors

path

  • get path(): string

type

  • get type(): string

Methods

disable

  • disable(): this

enable

  • enable(): this

init

  • init(): unknown

reload

  • reload(): Promise<Piece | null>

toJSON

  • toJSON(): Record<string, unknown>

toString

  • toString(): string

unload

  • unload(): boolean

Generated using TypeDoc