Update Bot

This commit is contained in:
2026-03-15 11:58:43 +01:00
parent b67c111ffc
commit cd99275933
560 changed files with 23173 additions and 55113 deletions

View File

@@ -7,7 +7,6 @@
<p>
<a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
<a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
<a href="https://github.com/discordjs/discord.js/commits/main/packages/util"><img alt="Last commit." src="https://img.shields.io/github/last-commit/discordjs/discord.js?logo=github&logoColor=ffffff&path=packages%2Futil"></a>
</p>
<p>
<a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>

View File

@@ -1,5 +1,3 @@
import { GatewayRateLimitedDispatchData, GatewayOpcodeRateLimitMetadataMap } from 'discord-api-types/v10';
/**
* Represents a type that may or may not be a promise
*/
@@ -123,38 +121,6 @@ interface Equatable<Value> {
*/
declare function isEquatable(maybeEquatable: unknown): maybeEquatable is Equatable<unknown>;
/**
* Represents the error thrown when the gateway emits a `RATE_LIMITED` event after a certain request.
*/
declare class GatewayRateLimitError extends Error {
/**
* The data associated with the rate limit event
*/
readonly data: GatewayRateLimitedDispatchData<keyof GatewayOpcodeRateLimitMetadataMap>;
/**
* The payload data that lead to this rate limit
*
* @privateRemarks
* Too complicated to type properly here (i.e. extract the ['data']
* of event payloads that have t = keyof GatewayOpcodeRateLimitMetadataMap)
*/
readonly payload: unknown;
readonly name: string;
constructor(
/**
* The data associated with the rate limit event
*/
data: GatewayRateLimitedDispatchData<keyof GatewayOpcodeRateLimitMetadataMap>,
/**
* The payload data that lead to this rate limit
*
* @privateRemarks
* Too complicated to type properly here (i.e. extract the ['data']
* of event payloads that have t = keyof GatewayOpcodeRateLimitMetadataMap)
*/
payload: unknown);
}
/**
* The {@link https://github.com/discordjs/discord.js/blob/main/packages/util#readme | @discordjs/util} version
* that you are currently using.
@@ -163,4 +129,4 @@ declare class GatewayRateLimitError extends Error {
*/
declare const version: string;
export { type Awaitable, type Equatable, GatewayRateLimitError, type JSONEncodable, type RangeOptions, calculateShardId, getUserAgentAppendix, isEquatable, isJSONEncodable, lazy, polyfillDispose, range, shouldUseGlobalFetchAndWebSocket, version };
export { type Awaitable, type Equatable, type JSONEncodable, type RangeOptions, calculateShardId, getUserAgentAppendix, isEquatable, isJSONEncodable, lazy, polyfillDispose, range, shouldUseGlobalFetchAndWebSocket, version };

View File

@@ -1,5 +1,3 @@
import { GatewayRateLimitedDispatchData, GatewayOpcodeRateLimitMetadataMap } from 'discord-api-types/v10';
/**
* Represents a type that may or may not be a promise
*/
@@ -123,38 +121,6 @@ interface Equatable<Value> {
*/
declare function isEquatable(maybeEquatable: unknown): maybeEquatable is Equatable<unknown>;
/**
* Represents the error thrown when the gateway emits a `RATE_LIMITED` event after a certain request.
*/
declare class GatewayRateLimitError extends Error {
/**
* The data associated with the rate limit event
*/
readonly data: GatewayRateLimitedDispatchData<keyof GatewayOpcodeRateLimitMetadataMap>;
/**
* The payload data that lead to this rate limit
*
* @privateRemarks
* Too complicated to type properly here (i.e. extract the ['data']
* of event payloads that have t = keyof GatewayOpcodeRateLimitMetadataMap)
*/
readonly payload: unknown;
readonly name: string;
constructor(
/**
* The data associated with the rate limit event
*/
data: GatewayRateLimitedDispatchData<keyof GatewayOpcodeRateLimitMetadataMap>,
/**
* The payload data that lead to this rate limit
*
* @privateRemarks
* Too complicated to type properly here (i.e. extract the ['data']
* of event payloads that have t = keyof GatewayOpcodeRateLimitMetadataMap)
*/
payload: unknown);
}
/**
* The {@link https://github.com/discordjs/discord.js/blob/main/packages/util#readme | @discordjs/util} version
* that you are currently using.
@@ -163,4 +129,4 @@ declare class GatewayRateLimitError extends Error {
*/
declare const version: string;
export { type Awaitable, type Equatable, GatewayRateLimitError, type JSONEncodable, type RangeOptions, calculateShardId, getUserAgentAppendix, isEquatable, isJSONEncodable, lazy, polyfillDispose, range, shouldUseGlobalFetchAndWebSocket, version };
export { type Awaitable, type Equatable, type JSONEncodable, type RangeOptions, calculateShardId, getUserAgentAppendix, isEquatable, isJSONEncodable, lazy, polyfillDispose, range, shouldUseGlobalFetchAndWebSocket, version };

View File

@@ -19,9 +19,8 @@ var __copyProps = (to, from, except, desc) => {
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
GatewayRateLimitError: () => GatewayRateLimitError,
var src_exports = {};
__export(src_exports, {
calculateShardId: () => calculateShardId,
getUserAgentAppendix: () => getUserAgentAppendix,
isEquatable: () => isEquatable,
@@ -32,7 +31,7 @@ __export(index_exports, {
shouldUseGlobalFetchAndWebSocket: () => shouldUseGlobalFetchAndWebSocket,
version: () => version
});
module.exports = __toCommonJS(index_exports);
module.exports = __toCommonJS(src_exports);
// src/functions/lazy.ts
function lazy(cb) {
@@ -128,24 +127,10 @@ function isEquatable(maybeEquatable) {
}
__name(isEquatable, "isEquatable");
// src/gatewayRateLimitError.ts
var GatewayRateLimitError = class _GatewayRateLimitError extends Error {
constructor(data, payload) {
super(`Request with opcode ${data.opcode} was rate limited. Retry after ${data.retry_after} seconds.`);
this.data = data;
this.payload = payload;
}
static {
__name(this, "GatewayRateLimitError");
}
name = _GatewayRateLimitError.name;
};
// src/index.ts
var version = "1.2.0";
var version = "1.1.1";
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
GatewayRateLimitError,
calculateShardId,
getUserAgentAppendix,
isEquatable,

File diff suppressed because one or more lines are too long

View File

@@ -95,23 +95,9 @@ function isEquatable(maybeEquatable) {
}
__name(isEquatable, "isEquatable");
// src/gatewayRateLimitError.ts
var GatewayRateLimitError = class _GatewayRateLimitError extends Error {
constructor(data, payload) {
super(`Request with opcode ${data.opcode} was rate limited. Retry after ${data.retry_after} seconds.`);
this.data = data;
this.payload = payload;
}
static {
__name(this, "GatewayRateLimitError");
}
name = _GatewayRateLimitError.name;
};
// src/index.ts
var version = "1.2.0";
var version = "1.1.1";
export {
GatewayRateLimitError,
calculateShardId,
getUserAgentAppendix,
isEquatable,

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@discordjs/util",
"version": "1.2.0",
"version": "1.1.1",
"description": "Utilities shared across Discord.js packages",
"exports": {
".": {
@@ -49,9 +49,6 @@
},
"homepage": "https://discord.js.org",
"funding": "https://github.com/discordjs/discord.js?sponsor",
"dependencies": {
"discord-api-types": "^0.38.33"
},
"devDependencies": {
"@favware/cliff-jumper": "^4.1.0",
"@types/node": "^16.18.105",