diff --git a/classes/_buape_dotperms.PermissionUser.html b/classes/_buape_dotperms.PermissionUser.html index a7111b63..db32cdc9 100644 --- a/classes/_buape_dotperms.PermissionUser.html +++ b/classes/_buape_dotperms.PermissionUser.html @@ -1,4 +1,4 @@ -PermissionUser | Buape Utilities - v0.0.0

Constructors

constructor +PermissionUser | Buape Utilities - v0.0.0

Constructors

Properties

Methods

addPermissions @@ -6,9 +6,9 @@ list

Constructors

Properties

id: string
permissions: UserPermissions

Methods

  • Check a permission against the user's permissions

    +

Returns PermissionUser

Properties

id: string
permissions: UserPermissions

Methods

  • List all permissions the user has

    +

Returns boolean | UserPermissionSet

\ No newline at end of file +
\ No newline at end of file diff --git a/classes/_buape_experiments.ExperimentManager.html b/classes/_buape_experiments.ExperimentManager.html index f52409d5..8ad0a2d1 100644 --- a/classes/_buape_experiments.ExperimentManager.html +++ b/classes/_buape_experiments.ExperimentManager.html @@ -1,7 +1,7 @@ -ExperimentManager | Buape Utilities - v0.0.0

Constructors

constructor +ExperimentManager | Buape Utilities - v0.0.0

Constructors

Properties

experiments: Experiment[]

Methods

  • Parameters

    • featureKey: string
    • guildId: string

    Returns boolean

  • Parameters

    • id: number

    Returns undefined | Experiment

  • Parameters

    • key: string

    Returns undefined | Experiment

\ No newline at end of file +

Constructors

Properties

experiments: Experiment[]

Methods

  • Parameters

    • featureKey: string
    • guildId: string

    Returns boolean

  • Parameters

    • id: number

    Returns undefined | Experiment

  • Parameters

    • key: string

    Returns undefined | Experiment

\ No newline at end of file diff --git a/classes/_buape_lib.ApplicationCommand.html b/classes/_buape_lib.ApplicationCommand.html index 0a1e5f3b..b821b9d0 100644 --- a/classes/_buape_lib.ApplicationCommand.html +++ b/classes/_buape_lib.ApplicationCommand.html @@ -1,5 +1,5 @@ ApplicationCommand | Buape Utilities - v0.0.0

The base component class that other components extend from.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Constructors

Properties

authorOnly: boolean

Whether this component can only be used by the author of the interaction.

-
client: BetterClient

The client that instantiated this component.

-
cooldown: number

The cooldown of this component. +

Constructors

Properties

authorOnly: boolean

Whether this component can only be used by the author of the interaction.

+
client: BetterClient

The client that instantiated this component.

+
cooldown: number

The cooldown of this component. This is in milliseconds.

-
description: string

The description of the command

-
dmPermission?: boolean

Whether this component can be used in DMs.

-
key: string

The key of this component. +

description: string

The description of the command

+
dmPermission?: boolean

Whether this component can be used in DMs.

+
key: string

The key of this component. This is used to identify the component, and is usually used as the custom ID or the command name.

-
options: ApplicationCommandOptionData[] = []

The options of the command

+
options: ApplicationCommandOptionData[] = []

The options of the command

Default

[]
 
-
permissions?: PermissionsBitField

The permissions required from the user to run this component.

-
type: ApplicationCommandType = ApplicationCommandType.ChatInput

The type of the command

+
permissions?: PermissionsBitField

The permissions required from the user to run this component.

+
type: ApplicationCommandType = ApplicationCommandType.ChatInput

The type of the command

Default

ApplicationCommandType.ChatInput
 
-

Methods

\ No newline at end of file +

Methods

\ No newline at end of file diff --git a/classes/_buape_lib.ApplicationCommandHandler.html b/classes/_buape_lib.ApplicationCommandHandler.html index f6645256..b09b1cb2 100644 --- a/classes/_buape_lib.ApplicationCommandHandler.html +++ b/classes/_buape_lib.ApplicationCommandHandler.html @@ -1,4 +1,4 @@ -ApplicationCommandHandler | Buape Utilities - v0.0.0

Hierarchy (view full)

Constructors

constructor +ApplicationCommandHandler | Buape Utilities - v0.0.0

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

client: BetterClient
cooldowns: Collection<string, number>

Methods

\ No newline at end of file +

Constructors

Properties

client: BetterClient
cooldowns: Collection<string, number>

Methods

\ No newline at end of file diff --git a/classes/_buape_lib.AutocompleteHandler.html b/classes/_buape_lib.AutocompleteHandler.html index 2d3715d7..347fafc2 100644 --- a/classes/_buape_lib.AutocompleteHandler.html +++ b/classes/_buape_lib.AutocompleteHandler.html @@ -1,17 +1,17 @@ -AutocompleteHandler | Buape Utilities - v0.0.0

Constructors

constructor +AutocompleteHandler | Buape Utilities - v0.0.0

Constructors

Properties

client: BetterClient

Our client.

-

Methods

  • Fetch the autocomplete with the provided name.

    +

Returns AutocompleteHandler

Properties

client: BetterClient

Our client.

+

Methods

  • Handle the interaction created for this autocomplete to make sure the user and client can execute it.

    Parameters

    • interaction: AutocompleteInteraction<CacheType>

      The interaction created.

      -

    Returns Promise<void>

  • Execute our autocomplete.

    +

Returns Promise<void>

\ No newline at end of file +

Returns Promise<void>

\ No newline at end of file diff --git a/classes/_buape_lib.BetterClient.html b/classes/_buape_lib.BetterClient.html index bd89ba6f..e01625b9 100644 --- a/classes/_buape_lib.BetterClient.html +++ b/classes/_buape_lib.BetterClient.html @@ -1,4 +1,4 @@ -BetterClient | Buape Utilities - v0.0.0

Hierarchy

  • Client
    • BetterClient

Constructors

constructor +BetterClient | Buape Utilities - v0.0.0

Hierarchy

  • Client
    • BetterClient

Constructors

Properties

__dirname: string

__dirname is not in our version of ECMA, so we make do with a shitty fix.

-
application: null | ClientApplication
applicationCommandHandler: ApplicationCommandHandler
applicationCommands: Collection<string, ApplicationCommand>
autocompleteHandler: AutocompleteHandler
buttonHandler: ButtonHandler
buttons: Collection<string, Button>
channels: ChannelManager
config: LibConfig
dropdownHandler: DropdownHandler
dropdowns: Collection<string, Dropdown>
events: Map<string, EventHandler>
guilds: GuildManager
hasteStore: Collection<string, string[]>
localeCache: Collection<string, Locale> = ...
modalSubmitHandler: ModalSubmitHandler
modals: Collection<string, ModalSubmit>
options: Omit<ClientOptions, "intents"> & {
    intents: IntentsBitField;
}

Type declaration

  • intents: IntentsBitField
readyTimestamp: null | number
rest: REST
shard: null | ShardClientUtil
sudo: Collection<string, string> = ...
sweepers: Sweepers
textCommandHandler: TextCommandHandler
textCommands: Collection<string, TextCommand>
token: null | string
user: null | ClientUser
userChannelCache: Collection<`${string}-${string}`, string>
users: UserManager
usersUsingBot: Set<string> = ...
voice: ClientVoiceManager
ws: WebSocketManager
captureRejectionSymbol: typeof captureRejectionSymbol
captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

-
defaultMaxListeners: number
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' +

Parameters

Returns BetterClient

Properties

__dirname: string

__dirname is not in our version of ECMA, so we make do with a shitty fix.

+
application: null | ClientApplication
applicationCommandHandler: ApplicationCommandHandler
applicationCommands: Collection<string, ApplicationCommand>
autocompleteHandler: AutocompleteHandler
buttonHandler: ButtonHandler
buttons: Collection<string, Button>
channels: ChannelManager
config: LibConfig
dropdownHandler: DropdownHandler
dropdowns: Collection<string, Dropdown>
events: Map<string, EventHandler>
guilds: GuildManager
hasteStore: Collection<string, string[]>
localeCache: Collection<string, Locale> = ...
modalSubmitHandler: ModalSubmitHandler
modals: Collection<string, ModalSubmit>
options: Omit<ClientOptions, "intents"> & {
    intents: IntentsBitField;
}

Type declaration

  • intents: IntentsBitField
readyTimestamp: null | number
rest: REST
shard: null | ShardClientUtil
sudo: Collection<string, string> = ...
sweepers: Sweepers
textCommandHandler: TextCommandHandler
textCommands: Collection<string, TextCommand>
token: null | string
user: null | ClientUser
userChannelCache: Collection<`${string}-${string}`, string>
users: UserManager
usersUsingBot: Set<string> = ...
voice: ClientVoiceManager
ws: WebSocketManager
captureRejectionSymbol: typeof captureRejectionSymbol
captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

+
defaultMaxListeners: number
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.

-

Accessors

  • get _censoredToken(): null | string
  • Returns null | 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(): null | string
  • Returns null | 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

    -
  • Parameters

    • id: string
    • Optional options: WebhookDeleteOptions

    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 +

  • Parameters

    • id: string
    • Optional options: WebhookDeleteOptions

    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.

    const EventEmitter = require('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

    -
  • This function is used to upload a hastebin stored using the hasteLog function.

    +
  • This function is used to upload a hastebin stored using the hasteLog function.

    Parameters

    • id: string

      The ID of the store you are using.

    • Optional url: string

      The URL to upload the hastebin to. If not provided, it will use the default hastebin.

    Returns Promise<null | string>

    The resulting URL

    -
  • This function is used when you want to slowly generate a hastebin. It provides a collection that can be accessed from the client, and will automatically append each string to a new line. You can use the hasteFlush function to upload the hastebin.

    Parameters

    • id: string

      The ID of the store you are using.

    • text: string

      The text to add to the store.

      -

    Returns void

  • Returns this is Client<true>

  • Returns the number of listeners listening to the event named eventName.

    +

Returns void

  • Returns this is Client<true>

  • Returns the number of listeners listening to 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

    -
  • Log to the console. This function can be overridden to provide a custom logger.

    +
  • Log to the console. This function can be overridden to provide a custom logger.

    Parameters

    • message: string

      The message to log.

    • level: LogLevel = LogLevel.INFO

      The level of the log.

      -

    Returns void

  • 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 +

Returns void

  • 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 eventNameand listener will result in the listener being added, and called, multiple times.

    @@ -136,7 +136,7 @@

    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!');
    });
    @@ -144,13 +144,13 @@

    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()).

    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 namedeventName.

    +
  • 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 namedeventName.

    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 @@ -174,13 +174,13 @@

    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 toInfinity (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 @@ -194,7 +194,7 @@

    Parameters

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

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    Since

    v18.18.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 @@ -202,7 +202,7 @@

    const { getEventListeners, EventEmitter } = require('events');

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

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | _DOMEventTarget
    • 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 @@ -211,14 +211,14 @@

    import { 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> | _DOMEventTarget

    Returns number

    Since

    v18.17.0

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

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

    const { EventEmitter, listenerCount } = require('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.

    -
  • const { on, EventEmitter } = require('events');

    (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')) {
    // 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
    })(); +
  • const { on, EventEmitter } = require('events');

    (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')) {
    // 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 @@ -230,7 +230,7 @@

    Deprecated

    Since v3.2.0 - Use listenerCount instead.

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string

      The name of the event being listened for

    • Optional options: StaticEventEmitterOptions

    Returns AsyncIterableIterator<any>

    that iterates eventName events emitted by the emitter

    Since

    v13.6.0, v12.16.0

    -
  • 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 +

  • 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.

    @@ -247,8 +247,8 @@

    Deprecated

    Since v3.2.0 - Use listenerCount instead.

    const { EventEmitter, once } = require('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: _NodeEventTarget
    • eventName: string | symbol
    • Optional options: StaticEventEmitterOptions

    Returns Promise<any[]>

    Since

    v11.13.0, v10.16.0

    -
  • Parameters

    • emitter: _DOMEventTarget
    • 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[]>

  • const {
    setMaxListeners,
    EventEmitter
    } = require('events');

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

    setMaxListeners(5, target, emitter); +
  • Parameters

    • emitter: _DOMEventTarget
    • 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[]>

  • const {
    setMaxListeners,
    EventEmitter
    } = require('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> | _DOMEventTarget)[]

    Returns void

    Since

    v15.4.0

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/classes/_buape_lib.Button.html b/classes/_buape_lib.Button.html index 6d6f1fa2..bb087f73 100644 --- a/classes/_buape_lib.Button.html +++ b/classes/_buape_lib.Button.html @@ -1,5 +1,5 @@ Button | Buape Utilities - v0.0.0

The base component class that other components extend from.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

authorOnly client cooldown @@ -9,12 +9,12 @@

Methods

Constructors

Properties

authorOnly: boolean

Whether this component can only be used by the author of the interaction.

-
client: BetterClient

The client that instantiated this component.

-
cooldown: number

The cooldown of this component. +

Constructors

Properties

authorOnly: boolean

Whether this component can only be used by the author of the interaction.

+
client: BetterClient

The client that instantiated this component.

+
cooldown: number

The cooldown of this component. This is in milliseconds.

-
dmPermission?: boolean

Whether this component can be used in DMs.

-
key: string

The key of this component. +

dmPermission?: boolean

Whether this component can be used in DMs.

+
key: string

The key of this component. This is used to identify the component, and is usually used as the custom ID or the command name.

-
permissions?: PermissionsBitField

The permissions required from the user to run this component.

-

Methods

\ No newline at end of file +
permissions?: PermissionsBitField

The permissions required from the user to run this component.

+

Methods

\ No newline at end of file diff --git a/classes/_buape_lib.ButtonHandler.html b/classes/_buape_lib.ButtonHandler.html index 21e48df4..64a02a62 100644 --- a/classes/_buape_lib.ButtonHandler.html +++ b/classes/_buape_lib.ButtonHandler.html @@ -1,4 +1,4 @@ -ButtonHandler | Buape Utilities - v0.0.0

Hierarchy (view full)

Constructors

constructor +ButtonHandler | Buape Utilities - v0.0.0

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

client: BetterClient

Methods

\ No newline at end of file +

Constructors

Properties

client: BetterClient

Methods

\ No newline at end of file diff --git a/classes/_buape_lib.Dropdown.html b/classes/_buape_lib.Dropdown.html index c524fc70..173ca434 100644 --- a/classes/_buape_lib.Dropdown.html +++ b/classes/_buape_lib.Dropdown.html @@ -1,5 +1,5 @@ Dropdown | Buape Utilities - v0.0.0

The base component class that other components extend from.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

authorOnly client cooldown @@ -9,12 +9,12 @@

Methods

Constructors

Properties

authorOnly: boolean

Whether this component can only be used by the author of the interaction.

-
client: BetterClient

The client that instantiated this component.

-
cooldown: number

The cooldown of this component. +

Constructors

Properties

authorOnly: boolean

Whether this component can only be used by the author of the interaction.

+
client: BetterClient

The client that instantiated this component.

+
cooldown: number

The cooldown of this component. This is in milliseconds.

-
dmPermission?: boolean

Whether this component can be used in DMs.

-
key: string

The key of this component. +

dmPermission?: boolean

Whether this component can be used in DMs.

+
key: string

The key of this component. This is used to identify the component, and is usually used as the custom ID or the command name.

-
permissions?: PermissionsBitField

The permissions required from the user to run this component.

-

Methods

\ No newline at end of file +
permissions?: PermissionsBitField

The permissions required from the user to run this component.

+

Methods

\ No newline at end of file diff --git a/classes/_buape_lib.DropdownHandler.html b/classes/_buape_lib.DropdownHandler.html index d19bd6df..faccfc3c 100644 --- a/classes/_buape_lib.DropdownHandler.html +++ b/classes/_buape_lib.DropdownHandler.html @@ -1,4 +1,4 @@ -DropdownHandler | Buape Utilities - v0.0.0

Hierarchy (view full)

Constructors

constructor +DropdownHandler | Buape Utilities - v0.0.0

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

client: BetterClient

Methods

\ No newline at end of file +

Constructors

Properties

client: BetterClient

Methods

\ No newline at end of file diff --git a/classes/_buape_lib.EventHandler.html b/classes/_buape_lib.EventHandler.html index 88485208..f078551f 100644 --- a/classes/_buape_lib.EventHandler.html +++ b/classes/_buape_lib.EventHandler.html @@ -1,4 +1,4 @@ -EventHandler | Buape Utilities - v0.0.0

Constructors

constructor +EventHandler | Buape Utilities - v0.0.0

Constructors

Properties

_listener client emitter? @@ -11,12 +11,12 @@

Constructors

Properties

_listener: ((...args) => Promise<any>)

Type declaration

    • (...args): Promise<any>
    • Execute our event.

      +

Returns EventHandler

Properties

_listener: ((...args) => Promise<any>)

Type declaration

    • (...args): Promise<any>
    • Execute our event.

      Parameters

      • Rest ...args: any

        The arguments for our event.

        -

      Returns Promise<any>

client: BetterClient
name: string
once: boolean

Methods

  • Execute our event.

    +

Returns Promise<any>

client: BetterClient
name: string
once: boolean

Methods

  • Execute our event.

    +

Returns Promise<any>

\ No newline at end of file +

Returns Promise<any>

\ No newline at end of file diff --git a/classes/_buape_lib.ModalSubmit.html b/classes/_buape_lib.ModalSubmit.html index e013c762..e34d0de0 100644 --- a/classes/_buape_lib.ModalSubmit.html +++ b/classes/_buape_lib.ModalSubmit.html @@ -1,12 +1,12 @@ -ModalSubmit | Buape Utilities - v0.0.0

Constructors

constructor +ModalSubmit | Buape Utilities - v0.0.0

Constructors

Properties

Methods

Constructors

Properties

client: BetterClient

Our client.

-
name: string

The beginning of the customId this modal listens for.

-

Methods

  • Run this modal.

    +

Returns ModalSubmit

Properties

client: BetterClient

Our client.

+
name: string

The beginning of the customId this modal listens for.

+

Methods

  • Run this modal.

    Parameters

    • _interaction: ModalSubmitInteraction<CacheType>

      The interaction that was created.

      -

    Returns Promise<any>

\ No newline at end of file +

Returns Promise<any>

\ No newline at end of file diff --git a/classes/_buape_lib.ModalSubmitHandler.html b/classes/_buape_lib.ModalSubmitHandler.html index a9fb23ea..3f47c0d2 100644 --- a/classes/_buape_lib.ModalSubmitHandler.html +++ b/classes/_buape_lib.ModalSubmitHandler.html @@ -1,4 +1,4 @@ -ModalSubmitHandler | Buape Utilities - v0.0.0

Constructors

constructor +ModalSubmitHandler | Buape Utilities - v0.0.0

Constructors

Properties

Methods

fetchModal handleModal @@ -7,14 +7,14 @@ runModal

Constructors

Properties

client: BetterClient

Our client.

-

Methods

  • Fetch the modal that starts with the provided customId.

    +

Returns ModalSubmitHandler

Properties

client: BetterClient

Our client.

+

Methods

  • Handle the interaction created for this modal to make sure the user and client can execute it.

    Parameters

    • interaction: ModalSubmitInteraction<CacheType>

      The interaction created.

      -

    Returns Promise<void | InteractionResponse<boolean>>

  • Execute our modal.

    +

Returns Promise<void | InteractionResponse<boolean>>

\ No newline at end of file +

Returns Promise<void>

\ No newline at end of file diff --git a/classes/_buape_lib.Paginator.html b/classes/_buape_lib.Paginator.html index 9954fcaa..70488272 100644 --- a/classes/_buape_lib.Paginator.html +++ b/classes/_buape_lib.Paginator.html @@ -1,7 +1,7 @@ Paginator | Buape Utilities - v0.0.0

A paginator for Discord messages.

Example

const pages: PaginatorMessage[] = [
{
embeds: [
// embed
],
components: [
// components
],
ephemeral: true
}]
const paginator = new Paginator({
id: interaction.id,
userId: interaction.user.id,
client: client
}, pages)
paginator.send(interaction)
-

Hierarchy

  • EventEmitter
    • Paginator

Constructors

Hierarchy

  • EventEmitter
    • Paginator

Constructors

Properties

id pages settings @@ -39,42 +39,42 @@ on once setMaxListeners -

Constructors

Properties

id: string
settings: PaginatorSettings
captureRejectionSymbol: typeof captureRejectionSymbol
captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

-
defaultMaxListeners: number
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' +

Constructors

Properties

id: string
settings: PaginatorSettings
captureRejectionSymbol: typeof captureRejectionSymbol
captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

+
defaultMaxListeners: number
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.

-

Methods

  • Type Parameters

    • K

    Parameters

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

    Returns void

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

    +

Methods

  • 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

    -
  • Parameters

    • message: Message<boolean> | InteractionResponse<boolean>

    Returns Promise<undefined | null | Message<boolean>>

  • Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments +

  • Parameters

    • message: Message<boolean> | InteractionResponse<boolean>

    Returns Promise<undefined | null | Message<boolean>>

  • Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    const EventEmitter = require('events');
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • Rest ...args: AnyRest

    Returns boolean

    Since

    v0.1.26

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

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

    const EventEmitter = require('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

    • thisPage: number = 1

    Returns ActionRowBuilder<MessageActionRowComponentBuilder>[]

  • Returns the current max listener value for the EventEmitter which is either +

  • Parameters

    • thisPage: number = 1

    Returns ActionRowBuilder<MessageActionRowComponentBuilder>[]

  • 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

    -
  • Parameters

    • page: number

    Returns {
        next: number;
        previous: number;
    }

    • next: number
    • previous: number
  • Returns the number of listeners listening to the event named eventName.

    +
  • Parameters

    • page: number

    Returns {
        next: number;
        previous: number;
    }

    • next: number
    • previous: number
  • Returns the number of listeners listening to 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

    -
  • Alias for emitter.removeListener().

    +
  • Alias for emitter.removeListener().

    Type Parameters

    • K

    Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v10.0.0

    -
  • Adds the listener function to the end of the listeners array for the +

  • Adds the listener function to the end 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 eventNameand listener will result in the listener being added, and called, multiple times.

    @@ -88,7 +88,7 @@

    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

    v0.1.101

    -
  • Adds a one-timelistener function for the event named eventName. The +

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

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

    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

    v0.3.0

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

  • 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 eventNameand listener will result in the listener being added, and called, multiple times.

    @@ -110,7 +110,7 @@

    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!');
    });
    @@ -118,18 +118,18 @@

    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()).

    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

    -
  • Removes all listeners, or those of the specified eventName.

    +
  • Removes all listeners, or those of the specified eventName.

    It is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

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

    Parameters

    • Optional event: string | symbol

    Returns this

    Since

    v0.1.26

    -
  • Removes the specified listener from the listener array for the event namedeventName.

    +
  • Removes the specified listener from the listener array for the event namedeventName.

    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 @@ -153,13 +153,13 @@

    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

    -
  • Parameters

    • interaction: ButtonInteraction<CacheType> | ChatInputCommandInteraction<CacheType>
    • page: number = 1
    • edit: undefined | Message<boolean> = undefined

    Returns Promise<undefined | null | Message<boolean>>

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

  • Parameters

    • interaction: ButtonInteraction<CacheType> | ChatInputCommandInteraction<CacheType>
    • page: number = 1
    • edit: undefined | Message<boolean> = undefined

    Returns Promise<undefined | null | Message<boolean>>

  • 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 toInfinity (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

    -
  • Experimental

    Listens once to the abort event on the provided signal.

    +
  • 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 @@ -173,7 +173,7 @@

    Parameters

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

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    Since

    v18.18.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 @@ -181,7 +181,7 @@

    const { getEventListeners, EventEmitter } = require('events');

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

    Parameters

    • emitter: EventEmitter<DefaultEventMap> | _DOMEventTarget
    • 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 @@ -190,14 +190,14 @@

    import { 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> | _DOMEventTarget

    Returns number

    Since

    v18.17.0

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

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

    const { EventEmitter, listenerCount } = require('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.

    -
  • const { on, EventEmitter } = require('events');

    (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')) {
    // 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
    })(); +
  • const { on, EventEmitter } = require('events');

    (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')) {
    // 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 @@ -209,7 +209,7 @@

    Deprecated

    Since v3.2.0 - Use listenerCount instead.

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • eventName: string

      The name of the event being listened for

    • Optional options: StaticEventEmitterOptions

    Returns AsyncIterableIterator<any>

    that iterates eventName events emitted by the emitter

    Since

    v13.6.0, v12.16.0

    -
  • 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 +

  • 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.

    @@ -226,8 +226,8 @@

    Deprecated

    Since v3.2.0 - Use listenerCount instead.

    const { EventEmitter, once } = require('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: _NodeEventTarget
    • eventName: string | symbol
    • Optional options: StaticEventEmitterOptions

    Returns Promise<any[]>

    Since

    v11.13.0, v10.16.0

    -
  • Parameters

    • emitter: _DOMEventTarget
    • 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[]>

  • const {
    setMaxListeners,
    EventEmitter
    } = require('events');

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

    setMaxListeners(5, target, emitter); +
  • Parameters

    • emitter: _DOMEventTarget
    • 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[]>

  • const {
    setMaxListeners,
    EventEmitter
    } = require('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> | _DOMEventTarget)[]

    Returns void

    Since

    v15.4.0

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/classes/_buape_lib.TextCommand.html b/classes/_buape_lib.TextCommand.html index af03a97c..09301a15 100644 --- a/classes/_buape_lib.TextCommand.html +++ b/classes/_buape_lib.TextCommand.html @@ -1,7 +1,7 @@ -TextCommand | Buape Utilities - v0.0.0

Constructors

constructor +TextCommand | Buape Utilities - v0.0.0

Constructors

Properties

Methods

Constructors

Properties

client: BetterClient
key: string
restriction?: string

Methods

\ No newline at end of file +

Constructors

Properties

client: BetterClient
key: string
restriction?: string

Methods

\ No newline at end of file diff --git a/classes/_buape_lib.TextCommandHandler.html b/classes/_buape_lib.TextCommandHandler.html index 651e57ba..f4044d0f 100644 --- a/classes/_buape_lib.TextCommandHandler.html +++ b/classes/_buape_lib.TextCommandHandler.html @@ -1,4 +1,4 @@ -TextCommandHandler | Buape Utilities - v0.0.0

Constructors

constructor +TextCommandHandler | Buape Utilities - v0.0.0

Constructors

Properties

Methods

Constructors

Properties

client: BetterClient
customPrefix?: string

Methods

\ No newline at end of file +

Constructors

Properties

client: BetterClient
customPrefix?: string

Methods

\ No newline at end of file diff --git a/classes/_buape_lib.Type.html b/classes/_buape_lib.Type.html index 6deeb79f..b3fe881b 100644 --- a/classes/_buape_lib.Type.html +++ b/classes/_buape_lib.Type.html @@ -1,5 +1,5 @@ Type | Buape Utilities - v0.0.0

The class for deep checking Types

-

Constructors

Constructors

Properties

childKeys childValues is @@ -16,18 +16,18 @@ resolve

Constructors

Properties

childKeys: Map<string, Type>

The child keys of this Type

-
childValues: Map<string, Type>

The child values of this Type

-
is: string

The shallow type of this

-
parent?: Type

The parent of this type

-
value: any

The value to generate a deep Type of

-

Accessors

Methods

  • The subtype to create based on this.value's entries.

    -

    Parameters

    • __namedParameters: [string, any]

    Returns void

\ No newline at end of file +

Returns Type

Properties

childKeys: Map<string, Type>

The child keys of this Type

+
childValues: Map<string, Type>

The child values of this Type

+
is: string

The shallow type of this

+
parent?: Type

The parent of this type

+
value: any

The value to generate a deep Type of

+

Accessors

Methods

  • The subtype to create based on this.value's entries.

    +

    Parameters

    • __namedParameters: [string, any]

    Returns void

\ No newline at end of file diff --git a/classes/_buape_lib._BaseComponent.html b/classes/_buape_lib._BaseComponent.html index 509259f6..215aecd0 100644 --- a/classes/_buape_lib._BaseComponent.html +++ b/classes/_buape_lib._BaseComponent.html @@ -1,5 +1,5 @@ _BaseComponent | Buape Utilities - v0.0.0

The base component class that other components extend from.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

authorOnly client clientPermissions? @@ -13,16 +13,16 @@

Methods

Constructors

Properties

authorOnly: boolean

Whether this component can only be used by the author of the interaction.

-
client: BetterClient

The client that instantiated this component.

-
clientPermissions?: PermissionsBitField

The permissions required from the application to run this component.

-
cooldown: number

The cooldown of this component. +

Constructors

Properties

authorOnly: boolean

Whether this component can only be used by the author of the interaction.

+
client: BetterClient

The client that instantiated this component.

+
clientPermissions?: PermissionsBitField

The permissions required from the application to run this component.

+
cooldown: number

The cooldown of this component. This is in milliseconds.

-
dmPermission?: boolean

Whether this component can be used in DMs.

-
guildOnly: boolean

Whether this component can only be used in guilds.

-
key: string

The key of this component. +

dmPermission?: boolean

Whether this component can be used in DMs.

+
guildOnly: boolean

Whether this component can only be used in guilds.

+
key: string

The key of this component. This is used to identify the component, and is usually used as the custom ID or the command name.

-
ownerOnly: boolean

Whether this component can only be used by the owner of the guild.

-
permissions?: PermissionsBitField

The permissions required from the user to run this component.

-
restriction?: string

The access role required to run this component.

-

Methods

\ No newline at end of file +
ownerOnly: boolean

Whether this component can only be used by the owner of the guild.

+
permissions?: PermissionsBitField

The permissions required from the user to run this component.

+
restriction?: string

The access role required to run this component.

+

Methods

\ No newline at end of file diff --git a/classes/_buape_lib._BaseHandler.html b/classes/_buape_lib._BaseHandler.html index 0443091b..a3e03f47 100644 --- a/classes/_buape_lib._BaseHandler.html +++ b/classes/_buape_lib._BaseHandler.html @@ -1,4 +1,4 @@ -_BaseHandler | Buape Utilities - v0.0.0

Hierarchy (view full)

Constructors

constructor +_BaseHandler | Buape Utilities - v0.0.0

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

client: BetterClient

Methods

  • Parameters

    • interaction: ButtonInteraction<CacheType> | CommandInteraction<CacheType> | AnySelectMenuInteraction

    Returns Promise<void | InteractionResponse<boolean>>

\ No newline at end of file +

Constructors

Properties

client: BetterClient

Methods

  • Parameters

    • interaction: ButtonInteraction<CacheType> | CommandInteraction<CacheType> | AnySelectMenuInteraction

    Returns Promise<void | InteractionResponse<boolean>>

\ No newline at end of file diff --git a/classes/kiai_js.APIError.html b/classes/kiai_js.APIError.html index ff7c192a..8b10b228 100644 --- a/classes/kiai_js.APIError.html +++ b/classes/kiai_js.APIError.html @@ -1,4 +1,4 @@ -APIError | Buape Utilities - v0.0.0

Hierarchy

  • Error
    • APIError

Constructors

constructor +APIError | Buape Utilities - v0.0.0

Hierarchy

  • Error
    • APIError

Constructors

Properties

Methods

Constructors

Properties

message: string

The message of this error

-
name: string

The type of error (APIError)

-
stack?: string
status: number

HTTP status of the error

-
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

+

Constructors

Properties

message: string

The message of this error

+
name: string

The type of error (APIError)

+
stack?: string
status: number

HTTP status of the error

+
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

Type declaration

    • (err, stackTraces): any
    • Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    -

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

\ No newline at end of file +
stackTraceLimit: number

Methods

  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

\ No newline at end of file diff --git a/classes/kiai_js.KiaiClient.html b/classes/kiai_js.KiaiClient.html index 1f978445..c4eebab0 100644 --- a/classes/kiai_js.KiaiClient.html +++ b/classes/kiai_js.KiaiClient.html @@ -1,4 +1,4 @@ -KiaiClient | Buape Utilities - v0.0.0

Constructors

constructor +KiaiClient | Buape Utilities - v0.0.0

Constructors

Properties

_requestHandler apiKey baseURL @@ -17,5 +17,5 @@
  • Optional options: {
        baseURL?: string;
        debug?: boolean;
        fetchFunction: ((url, init?) => Promise<Response>);
        version?: `v${number}`;
    }

    The options to use

    • Optional baseURL?: string

      The base URL to use

    • Optional debug?: boolean

      Whether to enable debug mode

      -
    • fetchFunction: ((url, init?) => Promise<Response>)
        • (url, init?): Promise<Response>
        • Parameters

          • url: string | URL
          • Optional init: RequestInit

          Returns Promise<Response>

    • Optional version?: `v${number}`
  • Returns KiaiClient

    Properties

    _requestHandler: RequestHandler
    apiKey: string
    baseURL: string
    blacklist: Blacklist

    Deprecated

    use denylist

    -
    debug: boolean
    denylist: Denylist
    leveling: Leveling
    multipliers: Multipliers
    rewards: Rewards
    settings: Settings
    version: `v${string}`

    Methods

    \ No newline at end of file +
  • fetchFunction: ((url, init?) => Promise<Response>)
      • (url, init?): Promise<Response>
      • Parameters

        • url: string | URL
        • Optional init: RequestInit

        Returns Promise<Response>

  • Optional version?: `v${number}`
  • Returns KiaiClient

    Properties

    _requestHandler: RequestHandler
    apiKey: string
    baseURL: string
    blacklist: Blacklist

    Deprecated

    use denylist

    +
    debug: boolean
    denylist: Denylist
    leveling: Leveling
    multipliers: Multipliers
    rewards: Rewards
    settings: Settings
    version: `v${string}`

    Methods

    \ No newline at end of file diff --git a/classes/kiai_js.RatelimitError.html b/classes/kiai_js.RatelimitError.html index c71243f2..7324e389 100644 --- a/classes/kiai_js.RatelimitError.html +++ b/classes/kiai_js.RatelimitError.html @@ -1,4 +1,4 @@ -RatelimitError | Buape Utilities - v0.0.0

    Hierarchy

    • Error
      • RatelimitError

    Constructors

    constructor +RatelimitError | Buape Utilities - v0.0.0

    Hierarchy

    • Error
      • RatelimitError

    Constructors

    Properties

    Methods

    Constructors

    Properties

    message: string

    The message of this error

    -
    name: string

    The type of error (RatelimitError)

    -
    remaining: number

    The time remaining for your ratelimit to expire in milliseconds

    -
    stack?: string
    status: number

    HTTP status of the error

    -
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    +

    Constructors

    Properties

    message: string

    The message of this error

    +
    name: string

    The type of error (RatelimitError)

    +
    remaining: number

    The time remaining for your ratelimit to expire in milliseconds

    +
    stack?: string
    status: number

    HTTP status of the error

    +
    prepareStackTrace?: ((err, stackTraces) => any)

    Optional override for formatting stack traces

    Type declaration

      • (err, stackTraces): any
      • Parameters

        • err: Error
        • stackTraces: CallSite[]

        Returns any

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      -

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file +
    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      +

      Parameters

      • targetObject: object
      • Optional constructorOpt: Function

      Returns void

    \ No newline at end of file diff --git a/enums/_buape_lib.HandlerType.html b/enums/_buape_lib.HandlerType.html index 6e571a43..3d1415df 100644 --- a/enums/_buape_lib.HandlerType.html +++ b/enums/_buape_lib.HandlerType.html @@ -1,5 +1,5 @@ -HandlerType | Buape Utilities - v0.0.0

    Enumeration Members

    ApplicationCommand +HandlerType | Buape Utilities - v0.0.0

    Enumeration Members

    ApplicationCommand: "applicationCommands"
    Button: "buttons"
    Dropdown: "dropdowns"
    TextCommand: "textCommands"
    \ No newline at end of file +

    Enumeration Members

    ApplicationCommand: "applicationCommands"
    Button: "buttons"
    Dropdown: "dropdowns"
    TextCommand: "textCommands"
    \ No newline at end of file diff --git a/enums/_buape_lib.LogLevel.html b/enums/_buape_lib.LogLevel.html index b6baa764..24da8bcc 100644 --- a/enums/_buape_lib.LogLevel.html +++ b/enums/_buape_lib.LogLevel.html @@ -1,6 +1,6 @@ -LogLevel | Buape Utilities - v0.0.0

    Enumeration Members

    DEBUG +LogLevel | Buape Utilities - v0.0.0

    Enumeration Members

    Enumeration Members

    DEBUG: "debug"
    ERROR: "error"
    INFO: "info"
    NULL: "null"
    WARN: "warn"
    \ No newline at end of file +

    Enumeration Members

    DEBUG: "debug"
    ERROR: "error"
    INFO: "info"
    NULL: "null"
    WARN: "warn"
    \ No newline at end of file diff --git a/functions/_buape_functions.checkAccess.html b/functions/_buape_functions.checkAccess.html index d4e06a32..3d39495e 100644 --- a/functions/_buape_functions.checkAccess.html +++ b/functions/_buape_functions.checkAccess.html @@ -5,4 +5,4 @@
  • restriction: string | string[]

    The restriction type to check access for.

  • settings: AccessSettings

    The settings to use for access checking.

  • client: Client<boolean>

    The discord.js Client.

    -
  • Returns Promise<boolean>

    \ No newline at end of file +

    Returns Promise<boolean>

    \ No newline at end of file diff --git a/functions/_buape_functions.emojiList.html b/functions/_buape_functions.emojiList.html index d8a87460..c3be0c30 100644 --- a/functions/_buape_functions.emojiList.html +++ b/functions/_buape_functions.emojiList.html @@ -2,4 +2,4 @@

    Parameters

    • items: string[]

      An array of strings to format

    • useEmojiForFirstLine: boolean = false

      Whether the first line should have an list starting emoji (true) or be left blank to use as the title (false)

    Returns string

    Note

    These emojis are from Buape's servers. They should work fine in interaction responses, but may not show for non-Buape bots in regular messages.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/functions/_buape_functions.generateEmbed.html b/functions/_buape_functions.generateEmbed.html index ebbe2e30..934fb304 100644 --- a/functions/_buape_functions.generateEmbed.html +++ b/functions/_buape_functions.generateEmbed.html @@ -5,4 +5,4 @@
  • ephemeral: boolean = false

    Whether our message should be ephemeral or not.

  • supportServer: undefined | string = undefined

    Whether or not to add the support server link as a component (for error messages only).

  • Returns GeneratedMessage

    The generated message.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/functions/_buape_functions.generateTimestamp.html b/functions/_buape_functions.generateTimestamp.html index 4cd97948..02323b64 100644 --- a/functions/_buape_functions.generateTimestamp.html +++ b/functions/_buape_functions.generateTimestamp.html @@ -1,4 +1,4 @@ generateTimestamp | Buape Utilities - v0.0.0
    • Generate a unix timestamp for Discord to be rendered locally per user.

      Parameters

      Returns string

      The generated timestamp.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/functions/_buape_functions.getFiles.html b/functions/_buape_functions.getFiles.html index 54fd3d4b..b2521b52 100644 --- a/functions/_buape_functions.getFiles.html +++ b/functions/_buape_functions.getFiles.html @@ -3,4 +3,4 @@
  • fileExtension: string

    The extension to search for.

  • createDirIfNotFound: boolean = false

    Whether or not the parent directory should be created if it doesn't exist.

  • Returns string[]

    The files in the directory.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/functions/_buape_functions.parseUser.html b/functions/_buape_functions.parseUser.html index e733d729..2adfa27b 100644 --- a/functions/_buape_functions.parseUser.html +++ b/functions/_buape_functions.parseUser.html @@ -3,4 +3,4 @@

    Parameters

    • userInput: string

      The string to parse the user from.

    • client: Client<boolean>

      The discord.js Client.

    Returns Promise<null | User>

    The parsed user.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/functions/_buape_functions.randomInt.html b/functions/_buape_functions.randomInt.html index 632297e4..b5efac0f 100644 --- a/functions/_buape_functions.randomInt.html +++ b/functions/_buape_functions.randomInt.html @@ -3,4 +3,4 @@

    Parameters

    • min: number

      The minimum number to generate

    • max: number

      The maximum number to generate

    Returns number

    The random integer

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/functions/_buape_functions.titleCase.html b/functions/_buape_functions.titleCase.html index 442464e6..e13a386f 100644 --- a/functions/_buape_functions.titleCase.html +++ b/functions/_buape_functions.titleCase.html @@ -3,4 +3,4 @@

    Returns string

    The formatted string

    Example

    titleCase("hello_world") // "Hello world"
     
    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/functions/_buape_functions.uploadHaste.html b/functions/_buape_functions.uploadHaste.html index 53d77f56..4266452d 100644 --- a/functions/_buape_functions.uploadHaste.html +++ b/functions/_buape_functions.uploadHaste.html @@ -4,4 +4,4 @@
  • type: string = "md"

    The file type to append to the end of the haste.

  • url: string = "https://hst.sh"

    A non-standard url to upload to

  • Returns Promise<null | string>

    The URL to the uploaded content.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/interfaces/_buape_dotperms.UserPermissionSet.html b/interfaces/_buape_dotperms.UserPermissionSet.html index 9d6689f2..51a73e10 100644 --- a/interfaces/_buape_dotperms.UserPermissionSet.html +++ b/interfaces/_buape_dotperms.UserPermissionSet.html @@ -1 +1 @@ -UserPermissionSet | Buape Utilities - v0.0.0
    interface UserPermissionSet {
        [prop: string]: true | UserPermissionSet | null;
    }

    Indexable

    [prop: string]: true | UserPermissionSet | null
    \ No newline at end of file +UserPermissionSet | Buape Utilities - v0.0.0
    interface UserPermissionSet {
        [prop: string]: true | UserPermissionSet | null;
    }

    Indexable

    [prop: string]: true | UserPermissionSet | null
    \ No newline at end of file diff --git a/interfaces/_buape_dotperms.UserPermissions.html b/interfaces/_buape_dotperms.UserPermissions.html index 2b44b2fa..34db111f 100644 --- a/interfaces/_buape_dotperms.UserPermissions.html +++ b/interfaces/_buape_dotperms.UserPermissions.html @@ -1 +1 @@ -UserPermissions | Buape Utilities - v0.0.0
    interface UserPermissions {
        [prop: string]: UserPermissionSet;
    }

    Indexable

    [prop: string]: UserPermissionSet
    \ No newline at end of file +UserPermissions | Buape Utilities - v0.0.0
    interface UserPermissions {
        [prop: string]: UserPermissionSet;
    }

    Indexable

    [prop: string]: UserPermissionSet
    \ No newline at end of file diff --git a/interfaces/_buape_experiments.experimentData.html b/interfaces/_buape_experiments.experimentData.html index 1f35dc6e..2cf4bfd1 100644 --- a/interfaces/_buape_experiments.experimentData.html +++ b/interfaces/_buape_experiments.experimentData.html @@ -1,6 +1,6 @@ -experimentData | Buape Utilities - v0.0.0
    interface experimentData {
        feature_key: string;
        force_disabled?: string[];
        force_enabled?: string[];
        name: string;
        rollout_percentage: number;
    }

    Properties

    feature_key +experimentData | Buape Utilities - v0.0.0
    interface experimentData {
        feature_key: string;
        force_disabled?: string[];
        force_enabled?: string[];
        name: string;
        rollout_percentage: number;
    }

    Properties

    feature_key: string
    force_disabled?: string[]
    force_enabled?: string[]
    name: string
    rollout_percentage: number
    \ No newline at end of file +

    Properties

    feature_key: string
    force_disabled?: string[]
    force_enabled?: string[]
    name: string
    rollout_percentage: number
    \ No newline at end of file diff --git a/interfaces/_buape_functions.AccessRoles.html b/interfaces/_buape_functions.AccessRoles.html index c15cae66..37c65a66 100644 --- a/interfaces/_buape_functions.AccessRoles.html +++ b/interfaces/_buape_functions.AccessRoles.html @@ -1,4 +1,4 @@ AccessRoles | Buape Utilities - v0.0.0

    An object containing the roles for each restriction type

    Example

    {"staff": "393814075013750315", "admin": "135013865018708735"}
     
    -
    interface AccessRoles {
        [key: string]: Snowflake[];
    }

    Indexable

    [key: string]: Snowflake[]
    \ No newline at end of file +
    interface AccessRoles {
        [key: string]: Snowflake[];
    }

    Indexable

    [key: string]: Snowflake[]
    \ No newline at end of file diff --git a/interfaces/_buape_functions.AccessSettings.html b/interfaces/_buape_functions.AccessSettings.html index 2ead4336..f507c921 100644 --- a/interfaces/_buape_functions.AccessSettings.html +++ b/interfaces/_buape_functions.AccessSettings.html @@ -1,6 +1,6 @@ AccessSettings | Buape Utilities - v0.0.0

    The settings to use for access checking.

    Example

    {"roles": {"staff": "393814075013750315", "admin": "135013865018708735"}, "server": "135013865018708735"}
     
    -
    interface AccessSettings {
        roles: AccessRoles;
        server: string;
    }

    Properties

    interface AccessSettings {
        roles: AccessRoles;
        server: string;
    }

    Properties

    Properties

    server: string
    \ No newline at end of file +

    Properties

    server: string
    \ No newline at end of file diff --git a/interfaces/_buape_functions.GenerateTimestampOptions.html b/interfaces/_buape_functions.GenerateTimestampOptions.html index 142a2d5b..30f5a951 100644 --- a/interfaces/_buape_functions.GenerateTimestampOptions.html +++ b/interfaces/_buape_functions.GenerateTimestampOptions.html @@ -1,6 +1,6 @@ GenerateTimestampOptions | Buape Utilities - v0.0.0

    The options to use for the timestamp.

    Example

    {"timestamp": 1620000000000, "type": "f"}
     
    -
    interface GenerateTimestampOptions {
        timestamp?: number | Date;
        type?: TimestampStylesString;
    }

    Properties

    interface GenerateTimestampOptions {
        timestamp?: number | Date;
        type?: TimestampStylesString;
    }

    Properties

    Properties

    timestamp?: number | Date
    type?: TimestampStylesString
    \ No newline at end of file +

    Properties

    timestamp?: number | Date
    type?: TimestampStylesString
    \ No newline at end of file diff --git a/interfaces/_buape_functions.GeneratedMessage.html b/interfaces/_buape_functions.GeneratedMessage.html index 71afd513..04eeecbb 100644 --- a/interfaces/_buape_functions.GeneratedMessage.html +++ b/interfaces/_buape_functions.GeneratedMessage.html @@ -1,6 +1,6 @@ -GeneratedMessage | Buape Utilities - v0.0.0
    interface GeneratedMessage {
        components?: ActionRowBuilder<ButtonBuilder>[];
        content?: string;
        embeds?: APIEmbed[];
        ephemeral?: boolean;
        fetchReply?: boolean;
    }

    Properties

    components? +GeneratedMessage | Buape Utilities - v0.0.0
    interface GeneratedMessage {
        components?: ActionRowBuilder<ButtonBuilder>[];
        content?: string;
        embeds?: APIEmbed[];
        ephemeral?: boolean;
        fetchReply?: boolean;
    }

    Properties

    components?: ActionRowBuilder<ButtonBuilder>[]
    content?: string
    embeds?: APIEmbed[]
    ephemeral?: boolean
    fetchReply?: boolean
    \ No newline at end of file +

    Properties

    components?: ActionRowBuilder<ButtonBuilder>[]
    content?: string
    embeds?: APIEmbed[]
    ephemeral?: boolean
    fetchReply?: boolean
    \ No newline at end of file diff --git a/interfaces/_buape_lib.ApplicationCommandOptions.html b/interfaces/_buape_lib.ApplicationCommandOptions.html index e828783a..1035f35a 100644 --- a/interfaces/_buape_lib.ApplicationCommandOptions.html +++ b/interfaces/_buape_lib.ApplicationCommandOptions.html @@ -1,4 +1,4 @@ -ApplicationCommandOptions | Buape Utilities - v0.0.0

    Interface ApplicationCommandOptions

    interface ApplicationCommandOptions {
        authorOnly?: boolean;
        clientPermissions?: PermissionsBitField;
        cooldown?: number;
        description?: string;
        dmPermission?: boolean;
        guildOnly?: boolean;
        options?: ApplicationCommandOptionData[];
        ownerOnly?: boolean;
        permissions?: PermissionsBitField;
        restriction?: string;
        type?: ApplicationCommandType;
    }

    Hierarchy (view full)

    Properties

    authorOnly? +ApplicationCommandOptions | Buape Utilities - v0.0.0

    Interface ApplicationCommandOptions

    interface ApplicationCommandOptions {
        authorOnly?: boolean;
        clientPermissions?: PermissionsBitField;
        cooldown?: number;
        description?: string;
        dmPermission?: boolean;
        guildOnly?: boolean;
        options?: ApplicationCommandOptionData[];
        ownerOnly?: boolean;
        permissions?: PermissionsBitField;
        restriction?: string;
        type?: ApplicationCommandType;
    }

    Hierarchy (view full)

    Properties

    authorOnly?: boolean
    clientPermissions?: PermissionsBitField
    cooldown?: number
    description?: string
    dmPermission?: boolean
    guildOnly?: boolean
    options?: ApplicationCommandOptionData[]
    ownerOnly?: boolean
    permissions?: PermissionsBitField
    restriction?: string
    type?: ApplicationCommandType
    \ No newline at end of file +

    Properties

    authorOnly?: boolean
    clientPermissions?: PermissionsBitField
    cooldown?: number
    description?: string
    dmPermission?: boolean
    guildOnly?: boolean
    options?: ApplicationCommandOptionData[]
    ownerOnly?: boolean
    permissions?: PermissionsBitField
    restriction?: string
    type?: ApplicationCommandType
    \ No newline at end of file diff --git a/interfaces/_buape_lib.BaseComponentOptions.html b/interfaces/_buape_lib.BaseComponentOptions.html index 3af9aac2..d36e4a83 100644 --- a/interfaces/_buape_lib.BaseComponentOptions.html +++ b/interfaces/_buape_lib.BaseComponentOptions.html @@ -1,4 +1,4 @@ -BaseComponentOptions | Buape Utilities - v0.0.0

    Interface BaseComponentOptions

    interface BaseComponentOptions {
        authorOnly?: boolean;
        clientPermissions?: PermissionsBitField;
        cooldown?: number;
        dmPermission?: boolean;
        guildOnly?: boolean;
        ownerOnly?: boolean;
        permissions?: PermissionsBitField;
        restriction?: string;
    }

    Hierarchy (view full)

    Properties

    authorOnly? +BaseComponentOptions | Buape Utilities - v0.0.0

    Interface BaseComponentOptions

    interface BaseComponentOptions {
        authorOnly?: boolean;
        clientPermissions?: PermissionsBitField;
        cooldown?: number;
        dmPermission?: boolean;
        guildOnly?: boolean;
        ownerOnly?: boolean;
        permissions?: PermissionsBitField;
        restriction?: string;
    }

    Hierarchy (view full)

    Properties

    authorOnly?: boolean
    clientPermissions?: PermissionsBitField
    cooldown?: number
    dmPermission?: boolean
    guildOnly?: boolean
    ownerOnly?: boolean
    permissions?: PermissionsBitField
    restriction?: string
    \ No newline at end of file +

    Properties

    authorOnly?: boolean
    clientPermissions?: PermissionsBitField
    cooldown?: number
    dmPermission?: boolean
    guildOnly?: boolean
    ownerOnly?: boolean
    permissions?: PermissionsBitField
    restriction?: string
    \ No newline at end of file diff --git a/interfaces/_buape_lib.EventEmitterLike.html b/interfaces/_buape_lib.EventEmitterLike.html index 9b617bbb..b3c0376f 100644 --- a/interfaces/_buape_lib.EventEmitterLike.html +++ b/interfaces/_buape_lib.EventEmitterLike.html @@ -1,4 +1,4 @@ -EventEmitterLike | Buape Utilities - v0.0.0
    interface EventEmitterLike {
        off: ((...args) => any);
        on: ((...args) => any);
        once: ((...args) => any);
    }

    Properties

    off +EventEmitterLike | Buape Utilities - v0.0.0
    interface EventEmitterLike {
        off: ((...args) => any);
        on: ((...args) => any);
        once: ((...args) => any);
    }

    Properties

    Properties

    off: ((...args) => any)

    Type declaration

      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

    on: ((...args) => any)

    Type declaration

      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

    once: ((...args) => any)

    Type declaration

      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

    \ No newline at end of file +

    Properties

    off: ((...args) => any)

    Type declaration

      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

    on: ((...args) => any)

    Type declaration

      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

    once: ((...args) => any)

    Type declaration

      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

    \ No newline at end of file diff --git a/interfaces/_buape_lib.EventOptions.html b/interfaces/_buape_lib.EventOptions.html index ac81f048..08bcd52d 100644 --- a/interfaces/_buape_lib.EventOptions.html +++ b/interfaces/_buape_lib.EventOptions.html @@ -1,4 +1,4 @@ -EventOptions | Buape Utilities - v0.0.0
    interface EventOptions {
        emitter?: EventEmitterLike;
        name: (keyof ClientEvents) | string & {};
        once?: boolean;
    }

    Properties

    emitter? +EventOptions | Buape Utilities - v0.0.0
    interface EventOptions {
        emitter?: EventEmitterLike;
        name: (keyof ClientEvents) | string & {};
        once?: boolean;
    }

    Properties

    Properties

    name: (keyof ClientEvents) | string & {}
    once?: boolean
    \ No newline at end of file +

    Properties

    name: (keyof ClientEvents) | string & {}
    once?: boolean
    \ No newline at end of file diff --git a/interfaces/_buape_lib.LibConfig.html b/interfaces/_buape_lib.LibConfig.html index d97b0cdb..64e8c8a4 100644 --- a/interfaces/_buape_lib.LibConfig.html +++ b/interfaces/_buape_lib.LibConfig.html @@ -1,5 +1,5 @@ -LibConfig | Buape Utilities - v0.0.0
    interface LibConfig {
        accessSettings: AccessSettings;
        clientOptions: ClientOptions;
        prefix?: string;
        supportServer: string;
    }

    Properties

    accessSettings +LibConfig | Buape Utilities - v0.0.0
    interface LibConfig {
        accessSettings: AccessSettings;
        clientOptions: ClientOptions;
        prefix?: string;
        supportServer: string;
    }

    Properties

    accessSettings: AccessSettings
    clientOptions: ClientOptions
    prefix?: string
    supportServer: string
    \ No newline at end of file +

    Properties

    accessSettings: AccessSettings
    clientOptions: ClientOptions
    prefix?: string
    supportServer: string
    \ No newline at end of file diff --git a/types/_buape_dotperms.Permission.html b/types/_buape_dotperms.Permission.html index 5504f788..34c33dbf 100644 --- a/types/_buape_dotperms.Permission.html +++ b/types/_buape_dotperms.Permission.html @@ -1 +1 @@ -Permission | Buape Utilities - v0.0.0
    Permission: `${string}.*` | `${string}.${string}.*` | `${string}.${string}.${string}` | `${string}.${string}` | "*"
    \ No newline at end of file +Permission | Buape Utilities - v0.0.0
    Permission: `${string}.*` | `${string}.${string}.*` | `${string}.${string}.${string}` | `${string}.${string}` | "*"
    \ No newline at end of file diff --git a/types/_buape_lib.ButtonOptions.html b/types/_buape_lib.ButtonOptions.html index 173b9b07..acccf404 100644 --- a/types/_buape_lib.ButtonOptions.html +++ b/types/_buape_lib.ButtonOptions.html @@ -1 +1 @@ -ButtonOptions | Buape Utilities - v0.0.0
    \ No newline at end of file +ButtonOptions | Buape Utilities - v0.0.0
    \ No newline at end of file diff --git a/types/_buape_lib.DropdownOptions.html b/types/_buape_lib.DropdownOptions.html index 3711df2e..6fd10074 100644 --- a/types/_buape_lib.DropdownOptions.html +++ b/types/_buape_lib.DropdownOptions.html @@ -1 +1 @@ -DropdownOptions | Buape Utilities - v0.0.0
    \ No newline at end of file +DropdownOptions | Buape Utilities - v0.0.0
    \ No newline at end of file diff --git a/types/_buape_lib.PaginatorMessage.html b/types/_buape_lib.PaginatorMessage.html index 8b3142b8..8caf103a 100644 --- a/types/_buape_lib.PaginatorMessage.html +++ b/types/_buape_lib.PaginatorMessage.html @@ -1 +1 @@ -PaginatorMessage | Buape Utilities - v0.0.0
    PaginatorMessage: {
        components?: ActionRowBuilder<MessageActionRowComponentBuilder>[];
        content?: string;
        embeds?: APIEmbed[];
        ephemeral?: boolean;
        files?: InteractionReplyOptions["files"];
    }

    Type declaration

    • Optional components?: ActionRowBuilder<MessageActionRowComponentBuilder>[]
    • Optional content?: string
    • Optional embeds?: APIEmbed[]
    • Optional ephemeral?: boolean
    • Optional files?: InteractionReplyOptions["files"]
    \ No newline at end of file +PaginatorMessage | Buape Utilities - v0.0.0
    PaginatorMessage: {
        components?: ActionRowBuilder<MessageActionRowComponentBuilder>[];
        content?: string;
        embeds?: APIEmbed[];
        ephemeral?: boolean;
        files?: InteractionReplyOptions["files"];
    }

    Type declaration

    • Optional components?: ActionRowBuilder<MessageActionRowComponentBuilder>[]
    • Optional content?: string
    • Optional embeds?: APIEmbed[]
    • Optional ephemeral?: boolean
    • Optional files?: InteractionReplyOptions["files"]
    \ No newline at end of file diff --git a/types/_buape_lib.TextCommandOptions.html b/types/_buape_lib.TextCommandOptions.html index 172f47e9..91f05dc7 100644 --- a/types/_buape_lib.TextCommandOptions.html +++ b/types/_buape_lib.TextCommandOptions.html @@ -1 +1 @@ -TextCommandOptions | Buape Utilities - v0.0.0

    Type alias TextCommandOptions

    TextCommandOptions: Pick<BaseComponentOptions, "restriction">
    \ No newline at end of file +TextCommandOptions | Buape Utilities - v0.0.0

    Type alias TextCommandOptions

    TextCommandOptions: Pick<BaseComponentOptions, "restriction">
    \ No newline at end of file