Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventListener

Class associating an event handler with an event.

Hierarchy

  • EventListener

Implements

Index

Constructors

Properties

Accessors

Constructors

constructor

Properties

args

args: [event: string, listener: (...args: any[]) => void]

The arguments passed to client.on() to register this listener

Optional computedListener

computedListener: (...args: any[]) => void

The actual function registered to the client as the direct listener. Set by the client when this instance is called by Client.addEvent. This is a bit of a hack and shouldn't be relied on in its current state. If you have a use case that requires access to this property, get in touch and I'll see if I can improve the way this is handled to better support you.

internal

Type declaration

    • (...args: any[]): void
    • The actual function registered to the client as the direct listener. Set by the client when this instance is called by Client.addEvent. This is a bit of a hack and shouldn't be relied on in its current state. If you have a use case that requires access to this property, get in touch and I'll see if I can improve the way this is handled to better support you.

      internal

      Parameters

      • Rest ...args: any[]

      Returns void

Optional filename

filename: string

The name of the file the event listener was loaded from, if any.

once

once: boolean

If true, the listener is only called the first time the event occurs

Accessors

eventName

  • get eventName(): string

Generated using TypeDoc