Skip to main content
Branch: Development

once

Callable

  • once<K>(eventName: K, listener: (...args: Parameters<K extends keyof IClientEvent ? IClientEvent[K] : K extends never ? ICustomEmitEvent[K] : never>) => void): void
  • once<K>(eventName: Exclude<K, keyof IClientEvent>, listener: (...args: any[]) => void): void

  • Subscribes to a client event with the specified listener, which only triggers once.


    Type parameters

    • K: keyof IClientEvent