From 4118989d985a119053e80d95503a199815233406 Mon Sep 17 00:00:00 2001 From: zptx-bot Date: Wed, 26 Jun 2024 21:09:53 +0000 Subject: [PATCH] docs: update docs for Skeleton/next --- .../classes/ModuleAutocompleteHandler.html | 24 +++---- .../next/classes/ModuleButtonHandler.html | 24 +++---- .../next/classes/ModuleCommandHandler.html | 26 +++---- Skeleton/next/classes/ModuleEventHandler.html | 26 +++---- .../classes/ModuleMenuCommandHandler.html | 26 +++---- .../classes/ModuleMessageCommandHandler.html | 24 +++---- .../classes/ModuleModalSubmitHandler.html | 24 +++---- .../next/classes/ModuleSelectMenuHandler.html | 24 +++---- Skeleton/next/classes/SkeletonClient.html | 68 ++++++++++--------- Skeleton/next/types/AcceptedEventTypes.html | 2 +- .../next/types/InteractionHandlersObject.html | 2 +- Skeleton/next/variables/ZPTXClient.html | 2 +- Skeleton/next/variables/logger.html | 2 +- 13 files changed, 138 insertions(+), 136 deletions(-) diff --git a/Skeleton/next/classes/ModuleAutocompleteHandler.html b/Skeleton/next/classes/ModuleAutocompleteHandler.html index 9f4bb70..e28fc28 100644 --- a/Skeleton/next/classes/ModuleAutocompleteHandler.html +++ b/Skeleton/next/classes/ModuleAutocompleteHandler.html @@ -1,4 +1,4 @@ -ModuleAutocompleteHandler | Skeleton (next) - v4.1.3

Class ModuleAutocompleteHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleAutocompleteHandler

Constructors

constructor +ModuleAutocompleteHandler | Skeleton (next) - v4.1.3

Class ModuleAutocompleteHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleAutocompleteHandler

Constructors

Properties

Methods

Constructors

Properties

execute: GenericAutocompleteExecuteFunction
type: string = ...

Methods

Constructors

Properties

execute: GenericAutocompleteExecuteFunction
type: string = ...

Methods

  • Checks if this handler is an unconfigured handler.

    Returns this is ModuleBaseHandler

    Whether this handler is an unconfigured handler.

    -
  • Validates the handler, ensuring the execute function is set.

    Returns boolean

    Whether the handler is valid.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/Skeleton/next/classes/ModuleButtonHandler.html b/Skeleton/next/classes/ModuleButtonHandler.html index d76cbf3..e3e6884 100644 --- a/Skeleton/next/classes/ModuleButtonHandler.html +++ b/Skeleton/next/classes/ModuleButtonHandler.html @@ -1,4 +1,4 @@ -ModuleButtonHandler | Skeleton (next) - v4.1.3

Class ModuleButtonHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleButtonHandler

Constructors

constructor +ModuleButtonHandler | Skeleton (next) - v4.1.3

Class ModuleButtonHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleButtonHandler

Constructors

Properties

Methods

Constructors

Properties

execute: GenericButtonExecuteFunction
type: string = ...

Methods

Constructors

Properties

execute: GenericButtonExecuteFunction
type: string = ...

Methods

  • Checks if this handler is an unconfigured handler.

    Returns this is ModuleBaseHandler

    Whether this handler is an unconfigured handler.

    -
  • Validates the handler, ensuring the execute function is set.

    Returns boolean

    Whether the handler is valid.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/Skeleton/next/classes/ModuleCommandHandler.html b/Skeleton/next/classes/ModuleCommandHandler.html index bc40f70..66a8961 100644 --- a/Skeleton/next/classes/ModuleCommandHandler.html +++ b/Skeleton/next/classes/ModuleCommandHandler.html @@ -1,4 +1,4 @@ -ModuleCommandHandler | Skeleton (next) - v4.1.3

Class ModuleCommandHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleCommandHandler

Constructors

constructor +ModuleCommandHandler | Skeleton (next) - v4.1.3

Class ModuleCommandHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleCommandHandler

Constructors

Properties

data execute type @@ -14,27 +14,27 @@ setData setExecute validate -

Constructors

Properties

data: SlashCommandBuilder
execute: GenericCommandExecuteFunction
type: string = ...

Methods

Constructors

Properties

data: SlashCommandBuilder
execute: GenericCommandExecuteFunction
type: string = ...

Methods

  • Checks if this handler is an unconfigured handler.

    Returns this is ModuleBaseHandler

    Whether this handler is an unconfigured handler.

    -
  • Sets the SlashCommandBuilder data for this handler.

    Parameters

    • data: SlashCommandBuilder

      The SlashCommandBuilder data.

    Returns this

    This instance for chaining.

    -
  • Validates the handler, ensuring the SlashCommandBuilder data and execute function are set.

    Returns boolean

    Whether the handler is valid.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/Skeleton/next/classes/ModuleEventHandler.html b/Skeleton/next/classes/ModuleEventHandler.html index bfed64c..67802e7 100644 --- a/Skeleton/next/classes/ModuleEventHandler.html +++ b/Skeleton/next/classes/ModuleEventHandler.html @@ -1,4 +1,4 @@ -ModuleEventHandler | Skeleton (next) - v4.1.3

Class ModuleEventHandler<E>

Type Parameters

Hierarchy

  • ModuleBaseHandler
    • ModuleEventHandler

Constructors

constructor +ModuleEventHandler | Skeleton (next) - v4.1.3

Class ModuleEventHandler<E>

Type Parameters

Hierarchy

  • ModuleBaseHandler
    • ModuleEventHandler

Constructors

Properties

execute once type @@ -15,28 +15,28 @@ setExecute setOnce validate -

Constructors

Properties

execute: GenericEventExecuteFunction<keyof ClientEvents>
once: boolean = false
type: string = ...

Methods

Constructors

Properties

execute: GenericEventExecuteFunction<keyof ClientEvents>
once: boolean = false
type: string = ...

Methods

  • Checks if this handler is an unconfigured handler.

    Returns this is ModuleBaseHandler

    Whether this handler is an unconfigured handler.

    -
  • Parameters

    • execute: E extends keyof ClientEvents
          ? GenericEventExecuteFunction<E<E>>
          : GenericExecuteFunction

    Returns this

  • Parameters

    • execute: E extends keyof ClientEvents
          ? GenericEventExecuteFunction<E<E>>
          : GenericExecuteFunction

    Returns this

  • Set whether this event handler should only be called once.

    Parameters

    • once: boolean

      Whether this event handler should only be called once.

    Returns this

    This instance for chaining.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/Skeleton/next/classes/ModuleMenuCommandHandler.html b/Skeleton/next/classes/ModuleMenuCommandHandler.html index 8f73bed..1b8e510 100644 --- a/Skeleton/next/classes/ModuleMenuCommandHandler.html +++ b/Skeleton/next/classes/ModuleMenuCommandHandler.html @@ -1,4 +1,4 @@ -ModuleMenuCommandHandler | Skeleton (next) - v4.1.3

Class ModuleMenuCommandHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleMenuCommandHandler

Constructors

constructor +ModuleMenuCommandHandler | Skeleton (next) - v4.1.3

Class ModuleMenuCommandHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleMenuCommandHandler

Constructors

Properties

data execute type @@ -14,27 +14,27 @@ setData setExecute validate -

Constructors

Properties

data: ContextMenuCommandBuilder
execute: GenericMenuCommandExecuteFunction
type: string = ...

Methods

Constructors

Properties

data: ContextMenuCommandBuilder
execute: GenericMenuCommandExecuteFunction
type: string = ...

Methods

  • Checks if this handler is an unconfigured handler.

    Returns this is ModuleBaseHandler

    Whether this handler is an unconfigured handler.

    -
  • Sets the ContextMenuCommandBuilder data for this handler.

    Parameters

    • data: ContextMenuCommandBuilder

      The ContextMenuCommandBuilder data.

    Returns this

    This instance for chaining.

    -
  • Validates the handler, ensuring the ContextMenuCommandBuilder data and execute function are set.

    Returns boolean

    Whether the handler is valid.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/Skeleton/next/classes/ModuleMessageCommandHandler.html b/Skeleton/next/classes/ModuleMessageCommandHandler.html index af74ccd..9a306d8 100644 --- a/Skeleton/next/classes/ModuleMessageCommandHandler.html +++ b/Skeleton/next/classes/ModuleMessageCommandHandler.html @@ -1,4 +1,4 @@ -ModuleMessageCommandHandler | Skeleton (next) - v4.1.3

Class ModuleMessageCommandHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleMessageCommandHandler

Constructors

constructor +ModuleMessageCommandHandler | Skeleton (next) - v4.1.3

Class ModuleMessageCommandHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleMessageCommandHandler

Constructors

Properties

Methods

Constructors

Properties

execute: GenericMessageCommandExecuteFunction
type: string = ...

Methods

Constructors

Properties

execute: GenericMessageCommandExecuteFunction
type: string = ...

Methods

  • Checks if this handler is an unconfigured handler.

    Returns this is ModuleBaseHandler

    Whether this handler is an unconfigured handler.

    -
  • Validates the handler, ensuring the execute function is set.

    Returns boolean

    Whether the handler is valid.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/Skeleton/next/classes/ModuleModalSubmitHandler.html b/Skeleton/next/classes/ModuleModalSubmitHandler.html index 9e422b7..615d69d 100644 --- a/Skeleton/next/classes/ModuleModalSubmitHandler.html +++ b/Skeleton/next/classes/ModuleModalSubmitHandler.html @@ -1,4 +1,4 @@ -ModuleModalSubmitHandler | Skeleton (next) - v4.1.3

Class ModuleModalSubmitHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleModalSubmitHandler

Constructors

constructor +ModuleModalSubmitHandler | Skeleton (next) - v4.1.3

Class ModuleModalSubmitHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleModalSubmitHandler

Constructors

Properties

Methods

Constructors

Properties

execute: GenericModalSubmitExecuteFunction
type: string = ...

Methods

Constructors

Properties

execute: GenericModalSubmitExecuteFunction
type: string = ...

Methods

  • Checks if this handler is an unconfigured handler.

    Returns this is ModuleBaseHandler

    Whether this handler is an unconfigured handler.

    -
  • Validates the handler, ensuring the execute function is set.

    Returns boolean

    Whether the handler is valid.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/Skeleton/next/classes/ModuleSelectMenuHandler.html b/Skeleton/next/classes/ModuleSelectMenuHandler.html index af2f65b..3bf6c9f 100644 --- a/Skeleton/next/classes/ModuleSelectMenuHandler.html +++ b/Skeleton/next/classes/ModuleSelectMenuHandler.html @@ -1,4 +1,4 @@ -ModuleSelectMenuHandler | Skeleton (next) - v4.1.3

Class ModuleSelectMenuHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleSelectMenuHandler

Constructors

constructor +ModuleSelectMenuHandler | Skeleton (next) - v4.1.3

Class ModuleSelectMenuHandler

Hierarchy

  • ModuleBaseHandler
    • ModuleSelectMenuHandler

Constructors

Properties

Methods

Constructors

Properties

execute: GenericSelectMenuExecuteFunction
type: string = ...

Methods

Constructors

Properties

execute: GenericSelectMenuExecuteFunction
type: string = ...

Methods

  • Checks if this handler is an unconfigured handler.

    Returns this is ModuleBaseHandler

    Whether this handler is an unconfigured handler.

    -
  • Validates the handler, ensuring the execute function is set.

    Returns boolean

    Whether the handler is valid.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/Skeleton/next/classes/SkeletonClient.html b/Skeleton/next/classes/SkeletonClient.html index 1f7b639..f1f796f 100644 --- a/Skeleton/next/classes/SkeletonClient.html +++ b/Skeleton/next/classes/SkeletonClient.html @@ -1,4 +1,4 @@ -SkeletonClient | Skeleton (next) - v4.1.3

Class SkeletonClient

Hierarchy

  • Client
    • SkeletonClient

Constructors

constructor +SkeletonClient | Skeleton (next) - v4.1.3

Class SkeletonClient

Hierarchy

  • Client
    • SkeletonClient

Constructors

Properties

_logger application channels @@ -78,23 +78,23 @@
  • Optional appName: string

    The name of the application

  • Returns SkeletonClient

    Example

    const client = new SkeletonClient(
    {
    intents: [
    GatewayIntentBits.Guilds,
    ],
    partials: [
    Partials.Channel
    ],
    },
    'MusicBot'
    );
    -
  • Creates an instance of SkeletonClient.

    +
  • Creates an instance of SkeletonClient.

    Parameters

    • options: ClientOptions

      discord.js ClientOptions

    • appOptions: {
          appName?: string;
          prefix?: string | string[];
      }

      Options for the application

      • Optional appName?: string
      • Optional prefix?: string | string[]

    Returns SkeletonClient

    Example

    const client = new SkeletonClient(
    {
    intents: [
    GatewayIntentBits.Guilds,
    ],
    partials: [
    Partials.Channel
    ],
    },
    { appName: 'MusicBot', prefix: 'm!' }
    );

    Example

    const client = new SkeletonClient(
    {
    intents: [
    GatewayIntentBits.Guilds,
    ],
    partials: [
    Partials.Channel
    ],
    },
    { appName: 'MusicBot', prefix: ['musicbot ', '@mention ', 'm!'] }
    );
    -
  • Properties

    _logger: LoggerObject = ...

    Internal logger

    -
    application: ClientApplication
    channels: ChannelManager
    commandData: SlashCommandBuilder[] = []

    Command data stored internally for use in deploying commands

    -
    deploy: boolean = ...
    eventHandlers: Collection<string, ModuleEventHandler<AcceptedEventTypes>[]> = ...
    guilds: GuildManager
    initialized: boolean = false
    interactionHandlers: InteractionHandlersObject = ...
    logger: LoggerObject
    menuCommandData: ContextMenuCommandBuilder[] = []

    Menu command data stored internally for use in deploying commands

    -
    messageCommandHandlers: Collection<string, ModuleMessageCommandHandler> = ...
    options: Omit<ClientOptions, "intents"> & {
        intents: IntentsBitField;
    }

    Type declaration

    • intents: IntentsBitField
    prefix: string[] = []
    readyTimestamp: number
    rest: REST
    shard: ShardClientUtil
    sweepers: Sweepers
    token: string
    user: ClientUser
    users: UserManager
    verbose: boolean = ...
    voice: ClientVoiceManager
    ws: WebSocketManager
    captureRejectionSymbol: typeof captureRejectionSymbol

    Value: Symbol.for('nodejs.rejection')

    +

    Properties

    _logger: LoggerObject = ...

    Internal logger

    +
    application: ClientApplication
    channels: ChannelManager
    commandData: SlashCommandBuilder[] = []

    Command data stored internally for use in deploying commands

    +
    deploy: boolean = ...
    eventHandlers: Collection<string, ModuleEventHandler<AcceptedEventTypes>[]> = ...
    guilds: GuildManager
    initialized: boolean = false
    interactionHandlers: InteractionHandlersObject = ...
    logger: LoggerObject
    menuCommandData: ContextMenuCommandBuilder[] = []

    Menu command data stored internally for use in deploying commands

    +
    messageCommandHandlers: Collection<string, ModuleMessageCommandHandler> = ...
    options: Omit<ClientOptions, "intents"> & {
        intents: IntentsBitField;
    }

    Type declaration

    • intents: IntentsBitField
    prefix: string[] = []
    readyTimestamp: number
    rest: REST
    shard: ShardClientUtil
    sweepers: Sweepers
    token: string
    user: ClientUser
    users: UserManager
    verbose: boolean = ...
    voice: ClientVoiceManager
    ws: WebSocketManager
    captureRejectionSymbol: typeof captureRejectionSymbol

    Value: Symbol.for('nodejs.rejection')

    See how to write a custom rejection handler.

    Since

    v13.4.0, v12.16.0

    -
    captureRejections: boolean

    Value: boolean

    +
    captureRejections: boolean

    Value: boolean

    Change the default captureRejections option on all new EventEmitter objects.

    Since

    v13.4.0, v12.16.0

    -
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single +

    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual EventEmitter instances using the emitter.setMaxListeners(n) method. To change the default for allEventEmitter instances, the events.defaultMaxListeners property @@ -118,38 +118,38 @@

    Example

    constname property is set to 'MaxListenersExceededWarning'.

    Since

    v0.11.2

    -
    errorMonitor: typeof errorMonitor

    This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

    +
    errorMonitor: typeof errorMonitor

    This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

    Installing a listener using this symbol does not change the behavior once an 'error' event is emitted. Therefore, the process will still crash if no regular 'error' listener is installed.

    Since

    v13.6.0, v12.17.0

    -

    Accessors

    • get _censoredToken(): string
    • Returns string

    • get emojis(): BaseGuildEmojiManager
    • Returns BaseGuildEmojiManager

    • get readyAt(): If<Ready, Date, null>
    • Returns If<Ready, Date, null>

    • get uptime(): If<Ready, number, null>
    • Returns If<Ready, number, null>

    Methods

    • Returns Promise<void>

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest ...args: AnyRest

      Returns void

    • Alias for emitter.on(eventName, listener).

      +

    Accessors

    • get _censoredToken(): string
    • Returns string

    • get emojis(): BaseGuildEmojiManager
    • Returns BaseGuildEmojiManager

    • get readyAt(): If<Ready, Date, null>
    • Returns If<Ready, Date, null>

    • get uptime(): If<Ready, number, null>
    • Returns If<Ready, number, null>

    Methods

    • Returns Promise<void>

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest ...args: AnyRest

      Returns void

    • Alias for emitter.on(eventName, listener).

      Type Parameters

      • K

      Parameters

      • eventName: string | symbol
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns this

      Since

      v0.1.26

      -
    • Deletes application commands. Only use after you've logged in to Discord.

      -

      Returns Promise<void>

    • Parameters

      • id: string
      • Optional options: WebhookDeleteOptions

      Returns Promise<void>

    • Deploys application commands. Only use after you've initialized the client and logged in to Discord.

      -

      Returns Promise<void>

    • Returns Promise<void>

    • Type Parameters

      • Event extends keyof ClientEvents

      Parameters

      Returns boolean

    • Type Parameters

      • Event extends string | symbol

      Parameters

      • event: Exclude<Event, keyof ClientEvents>
      • Rest ...args: unknown[]

      Returns boolean

    • Returns an array listing the events for which the emitter has registered +

    • Deletes application commands. Only use after you've logged in to Discord.

      +

      Returns Promise<void>

    • Parameters

      • id: string
      • Optional options: WebhookDeleteOptions

      Returns Promise<void>

    • Deploys application commands. Only use after you've initialized the client and logged in to Discord.

      +

      Returns Promise<void>

    • Returns Promise<void>

    • Type Parameters

      • Event extends keyof ClientEvents

      Parameters

      Returns boolean

    • Type Parameters

      • Event extends string | symbol

      Parameters

      • event: Exclude<Event, keyof ClientEvents>
      • Rest ...args: unknown[]

      Returns boolean

    • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

      import { EventEmitter } from 'node:events';

      const myEE = new EventEmitter();
      myEE.on('foo', () => {});
      myEE.on('bar', () => {});

      const sym = Symbol('symbol');
      myEE.on(sym, () => {});

      console.log(myEE.eventNames());
      // Prints: [ 'foo', 'bar', Symbol(symbol) ]

      Returns (string | symbol)[]

      Since

      v6.0.0

      -
    • Parameters

      • guild: GuildResolvable

      Returns Promise<GuildPreview>

    • Parameters

      • template: string

      Returns Promise<GuildTemplate>

    • Parameters

      • guild: GuildResolvable

      Returns Promise<Widget>

    • Parameters

      • invite: string
      • Optional options: ClientFetchInviteOptions

      Returns Promise<Invite>

    • Returns Promise<Collection<string, StickerPack>>

      Deprecated

      Use Client.fetchStickerPacks instead.

      +
    • Parameters

      • guild: GuildResolvable

      Returns Promise<GuildPreview>

    • Parameters

      • template: string

      Returns Promise<GuildTemplate>

    • Parameters

      • guild: GuildResolvable

      Returns Promise<Widget>

    • Parameters

      • invite: string
      • Optional options: ClientFetchInviteOptions

      Returns Promise<Invite>

    • Returns Promise<Collection<string, StickerPack>>

      Deprecated

      Use Client.fetchStickerPacks instead.

    • Parameters

      • id: string

      Returns Promise<Sticker>

    • Returns Promise<Collection<string, StickerPack>>

    • Returns Promise<Collection<string, VoiceRegion>>

    • Parameters

      • id: string
      • Optional token: string

      Returns Promise<Webhook<WebhookType>>

    • Parameters

      • Optional options: InviteGenerationOptions

      Returns string

    • Returns the current max listener value for the EventEmitter which is either set by emitter.setMaxListeners(n) or defaults to defaultMaxListeners.

      Returns number

      Since

      v1.0.0

      -
    • Initialize the client, sets up the event handlers

      +
    • Initialize the client, sets up the event handlers

      Parameters

      • baseURL: string

        The base URL (usually import.meta.url) of the main/index file

      Returns Promise<void>

      Example

      await client.initialize(import.meta.url);
      client.login(process.env.DISCORD_BOT_TOKEN);
      -
    • Returns this is Client<true>

    • Returns the number of listeners listening for the event named eventName. +

    • Returns this is Client<true>

    • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

      Type Parameters

      • K

      Parameters

      • eventName: string | symbol

        The name of the event being listened for

      • Optional listener: Function

        The event handler function

      Returns number

      Since

      v3.2.0

      -
    • Returns a copy of the array of listeners for the event named eventName.

      +
    • Returns a copy of the array of listeners for the event named eventName.

      server.on('connection', (stream) => {
      console.log('someone connected!');
      });
      console.log(util.inspect(server.listeners('connection')));
      // Prints: [ [Function] ]

      Type Parameters

      • K

      Parameters

      • eventName: string | symbol

      Returns Function[]

      Since

      v0.1.26

      -
    • Parameters

      • token: string

      Returns Promise<string>

    • Type Parameters

      • Event extends keyof ClientEvents

      Parameters

      • event: Event
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: ClientEvents[Event]

            Returns void

      Returns this

    • Type Parameters

      • Event extends string | symbol

      Parameters

      • event: Exclude<Event, keyof ClientEvents>
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns this

    • Type Parameters

      • Event extends keyof ClientEvents

      Parameters

      • event: Event
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: ClientEvents[Event]

            Returns void

      Returns this

    • Type Parameters

      • Event extends string | symbol

      Parameters

      • event: Exclude<Event, keyof ClientEvents>
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns this

    • Type Parameters

      • Event extends keyof ClientEvents

      Parameters

      • event: Event
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: ClientEvents[Event]

            Returns void

      Returns this

    • Type Parameters

      • Event extends string | symbol

      Parameters

      • event: Exclude<Event, keyof ClientEvents>
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns this

    • Adds the listener function to the beginning of the listeners array for the +

    • Parameters

      • token: string

      Returns Promise<string>

    • Type Parameters

      • Event extends keyof ClientEvents

      Parameters

      • event: Event
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: ClientEvents[Event]

            Returns void

      Returns this

    • Type Parameters

      • Event extends string | symbol

      Parameters

      • event: Exclude<Event, keyof ClientEvents>
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns this

    • Type Parameters

      • Event extends keyof ClientEvents

      Parameters

      • event: Event
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: ClientEvents[Event]

            Returns void

      Returns this

    • Type Parameters

      • Event extends string | symbol

      Parameters

      • event: Exclude<Event, keyof ClientEvents>
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns this

    • Type Parameters

      • Event extends keyof ClientEvents

      Parameters

      • event: Event
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: ClientEvents[Event]

            Returns void

      Returns this

    • Type Parameters

      • Event extends string | symbol

      Parameters

      • event: Exclude<Event, keyof ClientEvents>
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns this

    • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -159,7 +159,7 @@

      Example

      const

      Type Parameters

      • K

      Parameters

      • eventName: string | symbol

        The name of the event.

      • listener: ((...args) => void)

        The callback function

          • (...args): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns this

      Since

      v6.0.0

      -
    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +

    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

      server.prependOnceListener('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -167,12 +167,12 @@

      Example

      const

      Type Parameters

      • K

      Parameters

      • eventName: string | symbol

        The name of the event.

      • listener: ((...args) => void)

        The callback function

          • (...args): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns this

      Since

      v6.0.0

      -
    • Returns a copy of the array of listeners for the event named eventName, +

    • Returns a copy of the array of listeners for the event named eventName, including any wrappers (such as those created by .once()).

      import { EventEmitter } from 'node:events';
      const emitter = new EventEmitter();
      emitter.once('log', () => console.log('log once'));

      // Returns a new Array with a function `onceWrapper` which has a property
      // `listener` which contains the original listener bound above
      const listeners = emitter.rawListeners('log');
      const logFnWrapper = listeners[0];

      // Logs "log once" to the console and does not unbind the `once` event
      logFnWrapper.listener();

      // Logs "log once" to the console and removes the listener
      logFnWrapper();

      emitter.on('log', () => console.log('log persistently'));
      // Will return a new Array with a single function bound by `.on()` above
      const newListeners = emitter.rawListeners('log');

      // Logs "log persistently" twice
      newListeners[0]();
      emitter.emit('log');

      Type Parameters

      • K

      Parameters

      • eventName: string | symbol

      Returns Function[]

      Since

      v9.4.0

      -
    • Type Parameters

      • Event extends keyof ClientEvents

      Parameters

      Returns this

    • Type Parameters

      • Event extends string | symbol

      Parameters

      • Optional event: Exclude<Event, keyof ClientEvents>

      Returns this

    • Removes the specified listener from the listener array for the event named eventName.

      +
    • Type Parameters

      • Event extends keyof ClientEvents

      Parameters

      Returns this

    • Type Parameters

      • Event extends string | symbol

      Parameters

      • Optional event: Exclude<Event, keyof ClientEvents>

      Returns this

    • Removes the specified listener from the listener array for the event named eventName.

      const callback = (stream) => {
      console.log('someone connected!');
      };
      server.on('connection', callback);
      // ...
      server.removeListener('connection', callback);

      removeListener() will remove, at most, one instance of a listener from the @@ -196,13 +196,13 @@

      Example

      const

      Returns a reference to the EventEmitter, so that calls can be chained.

      Type Parameters

      • K

      Parameters

      • eventName: string | symbol
      • listener: ((...args) => void)
          • (...args): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns this

      Since

      v0.1.26

      -
    • By default EventEmitters will print a warning if more than 10 listeners are +

    • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

      Returns a reference to the EventEmitter, so that calls can be chained.

      Parameters

      • n: number

      Returns this

      Since

      v0.3.5

      -
    • Returns unknown

    • Experimental

      Listens once to the abort event on the provided signal.

      +
    • Returns unknown

    • Experimental

      Listens once to the abort event on the provided signal.

      Listening to the abort event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call e.stopImmediatePropagation(). Unfortunately Node.js cannot change @@ -216,7 +216,7 @@

      Example

      const

      Parameters

      • signal: AbortSignal
      • resource: ((event) => void)
          • (event): void
          • Parameters

            • event: Event

            Returns void

      Returns Disposable

      Disposable that removes the abort listener.

      Since

      v20.5.0

      -
    • Returns a copy of the array of listeners for the event named eventName.

      +
    • Returns a copy of the array of listeners for the event named eventName.

      For EventEmitters this behaves exactly the same as calling .listeners on the emitter.

      For EventTargets this is the only way to get the event listeners for the @@ -224,7 +224,7 @@

      Example

      constimport { getEventListeners, EventEmitter } from 'node:events';

      {
      const ee = new EventEmitter();
      const listener = () => console.log('Events are fun');
      ee.on('foo', listener);
      console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
      }
      {
      const et = new EventTarget();
      const listener = () => console.log('Events are fun');
      et.addEventListener('foo', listener);
      console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
      }

      Parameters

      • emitter: EventEmitter<DefaultEventMap> | EventTarget
      • name: string | symbol

      Returns Function[]

      Since

      v15.2.0, v14.17.0

      -
    • Returns the currently set max amount of listeners.

      +
    • Returns the currently set max amount of listeners.

      For EventEmitters this behaves exactly the same as calling .getMaxListeners on the emitter.

      For EventTargets this is the only way to get the max event listeners for the @@ -233,14 +233,14 @@

      Example

      constimport { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

      {
      const ee = new EventEmitter();
      console.log(getMaxListeners(ee)); // 10
      setMaxListeners(11, ee);
      console.log(getMaxListeners(ee)); // 11
      }
      {
      const et = new EventTarget();
      console.log(getMaxListeners(et)); // 10
      setMaxListeners(11, et);
      console.log(getMaxListeners(et)); // 11
      }

      Parameters

      • emitter: EventEmitter<DefaultEventMap> | EventTarget

      Returns number

      Since

      v19.9.0

      -
    • A class method that returns the number of listeners for the given eventName registered on the given emitter.

      +
    • A class method that returns the number of listeners for the given eventName registered on the given emitter.

      import { EventEmitter, listenerCount } from 'node:events';

      const myEmitter = new EventEmitter();
      myEmitter.on('event', () => {});
      myEmitter.on('event', () => {});
      console.log(listenerCount(myEmitter, 'event'));
      // Prints: 2

      Parameters

      • emitter: EventEmitter<DefaultEventMap>

        The emitter to query

      • eventName: string | symbol

        The event name

      Returns number

      Since

      v0.9.12

      Deprecated

      Since v3.2.0 - Use listenerCount instead.

      -
    • import { on, EventEmitter } from 'node:events';
      import process from 'node:process';

      const ee = new EventEmitter();

      // Emit later on
      process.nextTick(() => {
      ee.emit('foo', 'bar');
      ee.emit('foo', 42);
      });

      for await (const event of on(ee, 'foo')) {
      // The execution of this inner block is synchronous and it
      // processes one event at a time (even with await). Do not use
      // if concurrent execution is required.
      console.log(event); // prints ['bar'] [42]
      }
      // Unreachable here +
    • import { on, EventEmitter } from 'node:events';
      import process from 'node:process';

      const ee = new EventEmitter();

      // Emit later on
      process.nextTick(() => {
      ee.emit('foo', 'bar');
      ee.emit('foo', 42);
      });

      for await (const event of on(ee, 'foo')) {
      // The execution of this inner block is synchronous and it
      // processes one event at a time (even with await). Do not use
      // if concurrent execution is required.
      console.log(event); // prints ['bar'] [42]
      }
      // Unreachable here

      Returns an AsyncIterator that iterates eventName events. It will throw if the EventEmitter emits 'error'. It removes all listeners when @@ -249,10 +249,12 @@

      Deprecated

      Since v3.2.0 - Use listenerCount instead.

      An AbortSignal can be used to cancel waiting on events:

      import { on, EventEmitter } from 'node:events';
      import process from 'node:process';

      const ac = new AbortController();

      (async () => {
      const ee = new EventEmitter();

      // Emit later on
      process.nextTick(() => {
      ee.emit('foo', 'bar');
      ee.emit('foo', 42);
      });

      for await (const event of on(ee, 'foo', { signal: ac.signal })) {
      // The execution of this inner block is synchronous and it
      // processes one event at a time (even with await). Do not use
      // if concurrent execution is required.
      console.log(event); // prints ['bar'] [42]
      }
      // Unreachable here
      })();

      process.nextTick(() => ac.abort());
      -

      Parameters

      • emitter: EventEmitter<DefaultEventMap>
      • eventName: string | symbol

        The name of the event being listened for

        -
      • Optional options: StaticEventEmitterOptions

      Returns AsyncIterableIterator<any>

      An AsyncIterator that iterates eventName events emitted by the emitter

      +

      Use the close option to specify an array of event names that will end the iteration:

      +
      import { on, EventEmitter } from 'node:events';
      import process from 'node:process';

      const ee = new EventEmitter();

      // Emit later on
      process.nextTick(() => {
      ee.emit('foo', 'bar');
      ee.emit('foo', 42);
      ee.emit('close');
      });

      for await (const event of on(ee, 'foo', { close: ['close'] })) {
      console.log(event); // prints ['bar'] [42]
      }
      // the loop will exit after 'close' is emitted
      console.log('done'); // prints 'done' +
      +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string | symbol
    • Optional options: StaticEventEmitterIteratorOptions

    Returns AsyncIterableIterator<any[]>

    An AsyncIterator that iterates eventName events emitted by the emitter

    Since

    v13.6.0, v12.16.0

    -
  • Parameters

    • emitter: EventTarget
    • eventName: string
    • Optional options: StaticEventEmitterOptions

    Returns AsyncIterableIterator<any>

  • Type Parameters

    • Emitter extends __module
    • Events extends keyof ClientEvents

    Parameters

    Returns AsyncIterableIterator<Emitter extends Client<boolean>
        ? ClientEvents[Events]
        : any>

    • Creates a Promise that is fulfilled when the EventEmitter emits the given +

    • Parameters

      • emitter: EventTarget
      • eventName: string
      • Optional options: StaticEventEmitterIteratorOptions

      Returns AsyncIterableIterator<any[]>

    • Type Parameters

      • Emitter extends __module
      • Events extends keyof ClientEvents

      Parameters

      Returns AsyncIterableIterator<Emitter extends Client<boolean>
          ? ClientEvents[Events]
          : any>

    • Creates a Promise that is fulfilled when the EventEmitter emits the given event or that is rejected if the EventEmitter emits 'error' while waiting. The Promise will resolve with an array of all the arguments emitted to the given event.

      @@ -268,9 +270,9 @@

      Deprecated

      Since v3.2.0 - Use listenerCount instead.

      An AbortSignal can be used to cancel waiting for the event:

      import { EventEmitter, once } from 'node:events';

      const ee = new EventEmitter();
      const ac = new AbortController();

      async function foo(emitter, event, signal) {
      try {
      await once(emitter, event, { signal });
      console.log('event emitted!');
      } catch (error) {
      if (error.name === 'AbortError') {
      console.error('Waiting for the event was canceled!');
      } else {
      console.error('There was an error', error.message);
      }
      }
      }

      foo(ee, 'foo', ac.signal);
      ac.abort(); // Abort waiting for the event
      ee.emit('foo'); // Prints: Waiting for the event was canceled!
      -

      Parameters

      • emitter: EventEmitter<DefaultEventMap>
      • eventName: string | symbol
      • Optional options: Pick<StaticEventEmitterOptions, "signal">

      Returns Promise<any[]>

      Since

      v11.13.0, v10.16.0

      -
    • Parameters

      • emitter: EventTarget
      • eventName: string
      • Optional options: StaticEventEmitterOptions

      Returns Promise<any[]>

    • Type Parameters

      • Emitter extends __module
      • Event extends keyof ClientEvents

      Parameters

      Returns Promise<Emitter extends Client<boolean>
          ? ClientEvents[Event]
          : any[]>

    • import { setMaxListeners, EventEmitter } from 'node:events';

      const target = new EventTarget();
      const emitter = new EventEmitter();

      setMaxListeners(5, target, emitter); +

      Parameters

      • emitter: EventEmitter<DefaultEventMap>
      • eventName: string | symbol
      • Optional options: StaticEventEmitterOptions

      Returns Promise<any[]>

      Since

      v11.13.0, v10.16.0

      +
    • Parameters

      • emitter: EventTarget
      • eventName: string
      • Optional options: StaticEventEmitterOptions

      Returns Promise<any[]>

    • Type Parameters

      • Emitter extends __module
      • Event extends keyof ClientEvents

      Parameters

      Returns Promise<Emitter extends Client<boolean>
          ? ClientEvents[Event]
          : any[]>

    • import { setMaxListeners, EventEmitter } from 'node:events';

      const target = new EventTarget();
      const emitter = new EventEmitter();

      setMaxListeners(5, target, emitter);

      Parameters

      • Optional n: number

        A non-negative number. The maximum number of listeners per EventTarget event.

      • Rest ...eventTargets: (EventEmitter<DefaultEventMap> | EventTarget)[]

      Returns void

      Since

      v15.4.0

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/Skeleton/next/types/AcceptedEventTypes.html b/Skeleton/next/types/AcceptedEventTypes.html index 2cbc56a..e95fcb1 100644 --- a/Skeleton/next/types/AcceptedEventTypes.html +++ b/Skeleton/next/types/AcceptedEventTypes.html @@ -1 +1 @@ -AcceptedEventTypes | Skeleton (next) - v4.1.3

    Type alias AcceptedEventTypes

    AcceptedEventTypes: keyof ClientEvents | string | symbol
    \ No newline at end of file +AcceptedEventTypes | Skeleton (next) - v4.1.3

    Type alias AcceptedEventTypes

    AcceptedEventTypes: keyof ClientEvents | string | symbol
    \ No newline at end of file diff --git a/Skeleton/next/types/InteractionHandlersObject.html b/Skeleton/next/types/InteractionHandlersObject.html index 69a5fce..d4752c9 100644 --- a/Skeleton/next/types/InteractionHandlersObject.html +++ b/Skeleton/next/types/InteractionHandlersObject.html @@ -1 +1 @@ -InteractionHandlersObject | Skeleton (next) - v4.1.3

    Type alias InteractionHandlersObject

    InteractionHandlersObject: {
        autocomplete: Collection<string, ModuleAutocompleteHandler>;
        button: Collection<string, ModuleButtonHandler>;
        command: Collection<string, ModuleCommandHandler>;
        menuCommand: Collection<string, ModuleMenuCommandHandler>;
        modalSubmit: Collection<string, ModuleModalSubmitHandler>;
        selectMenu: Collection<string, ModuleSelectMenuHandler>;
    }

    Type declaration

    \ No newline at end of file +InteractionHandlersObject | Skeleton (next) - v4.1.3

    Type alias InteractionHandlersObject

    InteractionHandlersObject: {
        autocomplete: Collection<string, ModuleAutocompleteHandler>;
        button: Collection<string, ModuleButtonHandler>;
        command: Collection<string, ModuleCommandHandler>;
        menuCommand: Collection<string, ModuleMenuCommandHandler>;
        modalSubmit: Collection<string, ModuleModalSubmitHandler>;
        selectMenu: Collection<string, ModuleSelectMenuHandler>;
    }

    Type declaration

    \ No newline at end of file diff --git a/Skeleton/next/variables/ZPTXClient.html b/Skeleton/next/variables/ZPTXClient.html index 8d1dabb..f6d3498 100644 --- a/Skeleton/next/variables/ZPTXClient.html +++ b/Skeleton/next/variables/ZPTXClient.html @@ -1,2 +1,2 @@ ZPTXClient | Skeleton (next) - v4.1.3

    Variable ZPTXClientConst

    ZPTXClient: typeof SkeletonClient = SkeletonClient

    Deprecated

    Use SkeletonClient instead.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/Skeleton/next/variables/logger.html b/Skeleton/next/variables/logger.html index b8fac82..1d3979f 100644 --- a/Skeleton/next/variables/logger.html +++ b/Skeleton/next/variables/logger.html @@ -1,2 +1,2 @@ logger | Skeleton (next) - v4.1.3

    Variable loggerConst

    logger: Logger = DeprecatedLogger

    Deprecated

    Use the logger provided by SkeletonClient instead.

    -
    \ No newline at end of file +
    \ No newline at end of file