Class: Event
Constructors
constructor
• new Event(data
)
Creates a new event
Parameters
Name | Type | Description |
---|---|---|
data |
EventOptions |
The data for this event |
Properties
event
• event: string
The discord.js event this event triggers on
name
• name: string
The name of this event
repeat
• repeat: boolean
If this command should be called every time the event is received, or only the first time
function
• function: (...args
: any
[]) => any
Type declaration
▸ (...args
): any
Parameters
Name | Type |
---|---|
...args |
any [] |
Returns
any
Methods
init
▸ init(client
): Event
Initializes the event
Parameters
Name | Type | Description |
---|---|---|
client |
Client <boolean > |
The client this event should listen on |
Returns
The event
run
▸ run(...args
): any
Runs this event
Parameters
Name | Type | Description |
---|---|---|
...args |
any [] |
arguments from the discord.js event |
Returns
any