Event

Event class to extend when writing your own custom event handlers

Constructor

(abstract) new Event(name: string)

Parameters:
Name Type Description
name
string

Name of the Client event this event handler will handle when emitted

Source:

Properties

.client: Client

The YAMDBF Client instance

Type:
Client
Source:

.name: string

The name of the event this Event handler handles

Type:
string
Source:

Methods

.action(...args: any[]) → void

Method to be implemented that will be executed whenever the event this handler is for is emitted by the Client

Parameters:
Name Type Description
...args
any[]

The args your event handler will be receiving from the event it handles. This can be any number of arguments and obviously they can be received individually or as a rest parameter without issue

Source:
Returns:
void