Dev (#12)
* health check * Update Dockerfile * simplifying the deployment * Update Bot.js makes the find team command public * test (#9) * Dev (#7) * health check * Update Dockerfile * simplifying the deployment * Dev (#8) * health check * Update Dockerfile * simplifying the deployment * Update Bot.js makes the find team command public * Update PlayerService.js * massive update???? could break stuff * Update Bot.js update
This commit is contained in:
1
node_modules/@discordjs/rest/README.md
generated
vendored
1
node_modules/@discordjs/rest/README.md
generated
vendored
@@ -9,6 +9,7 @@
|
||||
<a href="https://www.npmjs.com/package/@discordjs/rest"><img src="https://img.shields.io/npm/v/@discordjs/rest.svg?maxAge=3600" alt="npm version" /></a>
|
||||
<a href="https://www.npmjs.com/package/@discordjs/rest"><img src="https://img.shields.io/npm/dt/@discordjs/rest.svg?maxAge=3600" alt="npm downloads" /></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="Tests status" /></a>
|
||||
<a href="https://github.com/discordjs/discord.js/commits/main/packages/rest" ><img alt="Last commit." src="https://img.shields.io/github/last-commit/discordjs/discord.js?logo=github&logoColor=ffffff&path=packages%2Frest"></a>
|
||||
<a href="https://codecov.io/gh/discordjs/discord.js" ><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=rest" alt="Code coverage" /></a>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
14
node_modules/@discordjs/rest/dist/index.d.mts
generated
vendored
14
node_modules/@discordjs/rest/dist/index.d.mts
generated
vendored
@@ -1,5 +1,6 @@
|
||||
import * as url from 'url';
|
||||
import { Snowflake } from 'discord-api-types/v10';
|
||||
import { ImageSize, Snowflake } from 'discord-api-types/v10';
|
||||
export { ImageSize } from 'discord-api-types/v10';
|
||||
import { Readable } from 'node:stream';
|
||||
import { ReadableStream } from 'node:stream/web';
|
||||
import { Collection } from '@discordjs/collection';
|
||||
@@ -430,10 +431,9 @@ declare enum RESTEvents {
|
||||
}
|
||||
declare const ALLOWED_EXTENSIONS: readonly ["webp", "png", "jpg", "jpeg", "gif"];
|
||||
declare const ALLOWED_STICKER_EXTENSIONS: readonly ["png", "json", "gif"];
|
||||
declare const ALLOWED_SIZES: readonly [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
|
||||
declare const ALLOWED_SIZES: readonly number[];
|
||||
type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];
|
||||
type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];
|
||||
type ImageSize = (typeof ALLOWED_SIZES)[number];
|
||||
declare const OverwrittenMimeTypes: {
|
||||
readonly 'image/apng': "image/png";
|
||||
};
|
||||
@@ -663,6 +663,12 @@ declare class CDN {
|
||||
* @param options - Optional options for the cover image
|
||||
*/
|
||||
guildScheduledEventCover(scheduledEventId: string, coverHash: string, options?: Readonly<BaseImageURLOptions>): string;
|
||||
/**
|
||||
* Generates a URL for a soundboard sound.
|
||||
*
|
||||
* @param soundId - The soundboard sound id
|
||||
*/
|
||||
soundboardSound(soundId: string): string;
|
||||
/**
|
||||
* Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
|
||||
*
|
||||
@@ -923,4 +929,4 @@ declare function calculateUserDefaultAvatarIndex(userId: Snowflake): number;
|
||||
*/
|
||||
declare const version: string;
|
||||
|
||||
export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DEPRECATION_WARNING_PREFIX, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordErrorData, type GetRateLimitOffsetFunction, HTTPError, type HandlerRequestData, type HashData, type ImageExtension, type ImageSize, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type MakeURLOptions, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, type RawFile, type RequestBody, type RequestData, type RequestHeaders, RequestMethod, type ResponseLike, type RestEvents, type RestEventsMap, type RouteData, type RouteLike, type StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
|
||||
export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DEPRECATION_WARNING_PREFIX, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordErrorData, type GetRateLimitOffsetFunction, HTTPError, type HandlerRequestData, type HashData, type ImageExtension, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type MakeURLOptions, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, type RawFile, type RequestBody, type RequestData, type RequestHeaders, RequestMethod, type ResponseLike, type RestEvents, type RestEventsMap, type RouteData, type RouteLike, type StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
|
||||
|
||||
14
node_modules/@discordjs/rest/dist/index.d.ts
generated
vendored
14
node_modules/@discordjs/rest/dist/index.d.ts
generated
vendored
@@ -1,5 +1,6 @@
|
||||
import * as url from 'url';
|
||||
import { Snowflake } from 'discord-api-types/v10';
|
||||
import { ImageSize, Snowflake } from 'discord-api-types/v10';
|
||||
export { ImageSize } from 'discord-api-types/v10';
|
||||
import { Readable } from 'node:stream';
|
||||
import { ReadableStream } from 'node:stream/web';
|
||||
import { Collection } from '@discordjs/collection';
|
||||
@@ -430,10 +431,9 @@ declare enum RESTEvents {
|
||||
}
|
||||
declare const ALLOWED_EXTENSIONS: readonly ["webp", "png", "jpg", "jpeg", "gif"];
|
||||
declare const ALLOWED_STICKER_EXTENSIONS: readonly ["png", "json", "gif"];
|
||||
declare const ALLOWED_SIZES: readonly [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
|
||||
declare const ALLOWED_SIZES: readonly number[];
|
||||
type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];
|
||||
type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];
|
||||
type ImageSize = (typeof ALLOWED_SIZES)[number];
|
||||
declare const OverwrittenMimeTypes: {
|
||||
readonly 'image/apng': "image/png";
|
||||
};
|
||||
@@ -663,6 +663,12 @@ declare class CDN {
|
||||
* @param options - Optional options for the cover image
|
||||
*/
|
||||
guildScheduledEventCover(scheduledEventId: string, coverHash: string, options?: Readonly<BaseImageURLOptions>): string;
|
||||
/**
|
||||
* Generates a URL for a soundboard sound.
|
||||
*
|
||||
* @param soundId - The soundboard sound id
|
||||
*/
|
||||
soundboardSound(soundId: string): string;
|
||||
/**
|
||||
* Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
|
||||
*
|
||||
@@ -923,4 +929,4 @@ declare function calculateUserDefaultAvatarIndex(userId: Snowflake): number;
|
||||
*/
|
||||
declare const version: string;
|
||||
|
||||
export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DEPRECATION_WARNING_PREFIX, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordErrorData, type GetRateLimitOffsetFunction, HTTPError, type HandlerRequestData, type HashData, type ImageExtension, type ImageSize, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type MakeURLOptions, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, type RawFile, type RequestBody, type RequestData, type RequestHeaders, RequestMethod, type ResponseLike, type RestEvents, type RestEventsMap, type RouteData, type RouteLike, type StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
|
||||
export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DEPRECATION_WARNING_PREFIX, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordErrorData, type GetRateLimitOffsetFunction, HTTPError, type HandlerRequestData, type HashData, type ImageExtension, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type MakeURLOptions, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, type RawFile, type RequestBody, type RequestData, type RequestHeaders, RequestMethod, type ResponseLike, type RestEvents, type RestEventsMap, type RouteData, type RouteLike, type StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
|
||||
|
||||
29
node_modules/@discordjs/rest/dist/index.js
generated
vendored
29
node_modules/@discordjs/rest/dist/index.js
generated
vendored
@@ -121,10 +121,13 @@ async function resolveBody(body) {
|
||||
}
|
||||
__name(resolveBody, "resolveBody");
|
||||
|
||||
// src/lib/CDN.ts
|
||||
var import_v102 = require("discord-api-types/v10");
|
||||
|
||||
// src/lib/utils/constants.ts
|
||||
var import_util = require("@discordjs/util");
|
||||
var import_v10 = require("discord-api-types/v10");
|
||||
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.4.0)`;
|
||||
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.5.1)`;
|
||||
var DefaultUserAgentAppendix = (0, import_util.getUserAgentAppendix)();
|
||||
var DefaultRestOptions = {
|
||||
agent: null,
|
||||
@@ -162,7 +165,17 @@ var RESTEvents = /* @__PURE__ */ ((RESTEvents2) => {
|
||||
})(RESTEvents || {});
|
||||
var ALLOWED_EXTENSIONS = ["webp", "png", "jpg", "jpeg", "gif"];
|
||||
var ALLOWED_STICKER_EXTENSIONS = ["png", "json", "gif"];
|
||||
var ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
|
||||
var ALLOWED_SIZES = [
|
||||
16,
|
||||
32,
|
||||
64,
|
||||
128,
|
||||
256,
|
||||
512,
|
||||
1024,
|
||||
2048,
|
||||
4096
|
||||
];
|
||||
var OverwrittenMimeTypes = {
|
||||
// https://github.com/discordjs/discord.js/issues/8557
|
||||
"image/apng": "image/png"
|
||||
@@ -445,7 +458,7 @@ var CDN = class {
|
||||
* @param options - Optional options for the banner
|
||||
*/
|
||||
guildMemberBanner(guildId, userId, bannerHash, options) {
|
||||
return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);
|
||||
return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banners/${bannerHash}`, bannerHash, options);
|
||||
}
|
||||
/**
|
||||
* Generates an icon URL, e.g. for a guild.
|
||||
@@ -522,6 +535,14 @@ var CDN = class {
|
||||
guildScheduledEventCover(scheduledEventId, coverHash, options) {
|
||||
return this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);
|
||||
}
|
||||
/**
|
||||
* Generates a URL for a soundboard sound.
|
||||
*
|
||||
* @param soundId - The soundboard sound id
|
||||
*/
|
||||
soundboardSound(soundId) {
|
||||
return `${this.cdn}${import_v102.CDNRoutes.soundboardSound(soundId)}`;
|
||||
}
|
||||
/**
|
||||
* Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
|
||||
*
|
||||
@@ -1448,7 +1469,7 @@ var REST = class _REST extends import_async_event_emitter.AsyncEventEmitter {
|
||||
};
|
||||
|
||||
// src/shared.ts
|
||||
var version = "2.4.0";
|
||||
var version = "2.5.1";
|
||||
|
||||
// src/index.ts
|
||||
globalThis.FormData ??= import_undici2.FormData;
|
||||
|
||||
2
node_modules/@discordjs/rest/dist/index.js.map
generated
vendored
2
node_modules/@discordjs/rest/dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
29
node_modules/@discordjs/rest/dist/index.mjs
generated
vendored
29
node_modules/@discordjs/rest/dist/index.mjs
generated
vendored
@@ -80,10 +80,13 @@ async function resolveBody(body) {
|
||||
}
|
||||
__name(resolveBody, "resolveBody");
|
||||
|
||||
// src/lib/CDN.ts
|
||||
import { CDNRoutes } from "discord-api-types/v10";
|
||||
|
||||
// src/lib/utils/constants.ts
|
||||
import { getUserAgentAppendix } from "@discordjs/util";
|
||||
import { APIVersion } from "discord-api-types/v10";
|
||||
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.4.0)`;
|
||||
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.5.1)`;
|
||||
var DefaultUserAgentAppendix = getUserAgentAppendix();
|
||||
var DefaultRestOptions = {
|
||||
agent: null,
|
||||
@@ -121,7 +124,17 @@ var RESTEvents = /* @__PURE__ */ ((RESTEvents2) => {
|
||||
})(RESTEvents || {});
|
||||
var ALLOWED_EXTENSIONS = ["webp", "png", "jpg", "jpeg", "gif"];
|
||||
var ALLOWED_STICKER_EXTENSIONS = ["png", "json", "gif"];
|
||||
var ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
|
||||
var ALLOWED_SIZES = [
|
||||
16,
|
||||
32,
|
||||
64,
|
||||
128,
|
||||
256,
|
||||
512,
|
||||
1024,
|
||||
2048,
|
||||
4096
|
||||
];
|
||||
var OverwrittenMimeTypes = {
|
||||
// https://github.com/discordjs/discord.js/issues/8557
|
||||
"image/apng": "image/png"
|
||||
@@ -404,7 +417,7 @@ var CDN = class {
|
||||
* @param options - Optional options for the banner
|
||||
*/
|
||||
guildMemberBanner(guildId, userId, bannerHash, options) {
|
||||
return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);
|
||||
return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banners/${bannerHash}`, bannerHash, options);
|
||||
}
|
||||
/**
|
||||
* Generates an icon URL, e.g. for a guild.
|
||||
@@ -481,6 +494,14 @@ var CDN = class {
|
||||
guildScheduledEventCover(scheduledEventId, coverHash, options) {
|
||||
return this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);
|
||||
}
|
||||
/**
|
||||
* Generates a URL for a soundboard sound.
|
||||
*
|
||||
* @param soundId - The soundboard sound id
|
||||
*/
|
||||
soundboardSound(soundId) {
|
||||
return `${this.cdn}${CDNRoutes.soundboardSound(soundId)}`;
|
||||
}
|
||||
/**
|
||||
* Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
|
||||
*
|
||||
@@ -1407,7 +1428,7 @@ var REST = class _REST extends AsyncEventEmitter {
|
||||
};
|
||||
|
||||
// src/shared.ts
|
||||
var version = "2.4.0";
|
||||
var version = "2.5.1";
|
||||
|
||||
// src/index.ts
|
||||
globalThis.FormData ??= FormData2;
|
||||
|
||||
2
node_modules/@discordjs/rest/dist/index.mjs.map
generated
vendored
2
node_modules/@discordjs/rest/dist/index.mjs.map
generated
vendored
File diff suppressed because one or more lines are too long
14
node_modules/@discordjs/rest/dist/web.d.mts
generated
vendored
14
node_modules/@discordjs/rest/dist/web.d.mts
generated
vendored
@@ -1,5 +1,6 @@
|
||||
import * as url from 'url';
|
||||
import { Snowflake } from 'discord-api-types/v10';
|
||||
import { ImageSize, Snowflake } from 'discord-api-types/v10';
|
||||
export { ImageSize } from 'discord-api-types/v10';
|
||||
import { Readable } from 'node:stream';
|
||||
import { ReadableStream } from 'node:stream/web';
|
||||
import { Collection } from '@discordjs/collection';
|
||||
@@ -430,10 +431,9 @@ declare enum RESTEvents {
|
||||
}
|
||||
declare const ALLOWED_EXTENSIONS: readonly ["webp", "png", "jpg", "jpeg", "gif"];
|
||||
declare const ALLOWED_STICKER_EXTENSIONS: readonly ["png", "json", "gif"];
|
||||
declare const ALLOWED_SIZES: readonly [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
|
||||
declare const ALLOWED_SIZES: readonly number[];
|
||||
type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];
|
||||
type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];
|
||||
type ImageSize = (typeof ALLOWED_SIZES)[number];
|
||||
declare const OverwrittenMimeTypes: {
|
||||
readonly 'image/apng': "image/png";
|
||||
};
|
||||
@@ -663,6 +663,12 @@ declare class CDN {
|
||||
* @param options - Optional options for the cover image
|
||||
*/
|
||||
guildScheduledEventCover(scheduledEventId: string, coverHash: string, options?: Readonly<BaseImageURLOptions>): string;
|
||||
/**
|
||||
* Generates a URL for a soundboard sound.
|
||||
*
|
||||
* @param soundId - The soundboard sound id
|
||||
*/
|
||||
soundboardSound(soundId: string): string;
|
||||
/**
|
||||
* Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
|
||||
*
|
||||
@@ -923,4 +929,4 @@ declare function calculateUserDefaultAvatarIndex(userId: Snowflake): number;
|
||||
*/
|
||||
declare const version: string;
|
||||
|
||||
export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DEPRECATION_WARNING_PREFIX, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordErrorData, type GetRateLimitOffsetFunction, HTTPError, type HandlerRequestData, type HashData, type ImageExtension, type ImageSize, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type MakeURLOptions, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, type RawFile, type RequestBody, type RequestData, type RequestHeaders, RequestMethod, type ResponseLike, type RestEvents, type RestEventsMap, type RouteData, type RouteLike, type StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
|
||||
export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DEPRECATION_WARNING_PREFIX, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordErrorData, type GetRateLimitOffsetFunction, HTTPError, type HandlerRequestData, type HashData, type ImageExtension, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type MakeURLOptions, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, type RawFile, type RequestBody, type RequestData, type RequestHeaders, RequestMethod, type ResponseLike, type RestEvents, type RestEventsMap, type RouteData, type RouteLike, type StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
|
||||
|
||||
14
node_modules/@discordjs/rest/dist/web.d.ts
generated
vendored
14
node_modules/@discordjs/rest/dist/web.d.ts
generated
vendored
@@ -1,5 +1,6 @@
|
||||
import * as url from 'url';
|
||||
import { Snowflake } from 'discord-api-types/v10';
|
||||
import { ImageSize, Snowflake } from 'discord-api-types/v10';
|
||||
export { ImageSize } from 'discord-api-types/v10';
|
||||
import { Readable } from 'node:stream';
|
||||
import { ReadableStream } from 'node:stream/web';
|
||||
import { Collection } from '@discordjs/collection';
|
||||
@@ -430,10 +431,9 @@ declare enum RESTEvents {
|
||||
}
|
||||
declare const ALLOWED_EXTENSIONS: readonly ["webp", "png", "jpg", "jpeg", "gif"];
|
||||
declare const ALLOWED_STICKER_EXTENSIONS: readonly ["png", "json", "gif"];
|
||||
declare const ALLOWED_SIZES: readonly [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
|
||||
declare const ALLOWED_SIZES: readonly number[];
|
||||
type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];
|
||||
type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];
|
||||
type ImageSize = (typeof ALLOWED_SIZES)[number];
|
||||
declare const OverwrittenMimeTypes: {
|
||||
readonly 'image/apng': "image/png";
|
||||
};
|
||||
@@ -663,6 +663,12 @@ declare class CDN {
|
||||
* @param options - Optional options for the cover image
|
||||
*/
|
||||
guildScheduledEventCover(scheduledEventId: string, coverHash: string, options?: Readonly<BaseImageURLOptions>): string;
|
||||
/**
|
||||
* Generates a URL for a soundboard sound.
|
||||
*
|
||||
* @param soundId - The soundboard sound id
|
||||
*/
|
||||
soundboardSound(soundId: string): string;
|
||||
/**
|
||||
* Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
|
||||
*
|
||||
@@ -923,4 +929,4 @@ declare function calculateUserDefaultAvatarIndex(userId: Snowflake): number;
|
||||
*/
|
||||
declare const version: string;
|
||||
|
||||
export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DEPRECATION_WARNING_PREFIX, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordErrorData, type GetRateLimitOffsetFunction, HTTPError, type HandlerRequestData, type HashData, type ImageExtension, type ImageSize, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type MakeURLOptions, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, type RawFile, type RequestBody, type RequestData, type RequestHeaders, RequestMethod, type ResponseLike, type RestEvents, type RestEventsMap, type RouteData, type RouteLike, type StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
|
||||
export { ALLOWED_EXTENSIONS, ALLOWED_SIZES, ALLOWED_STICKER_EXTENSIONS, type APIRequest, type BaseImageURLOptions, BurstHandlerMajorIdKey, CDN, DEPRECATION_WARNING_PREFIX, DefaultRestOptions, DefaultUserAgent, DefaultUserAgentAppendix, DiscordAPIError, type DiscordErrorData, type GetRateLimitOffsetFunction, HTTPError, type HandlerRequestData, type HashData, type ImageExtension, type ImageURLOptions, type InternalRequest, type InvalidRequestWarningData, type MakeURLOptions, type OAuthErrorData, OverwrittenMimeTypes, REST, RESTEvents, type RESTOptions, type RateLimitData, RateLimitError, type RateLimitQueueFilter, type RawFile, type RequestBody, type RequestData, type RequestHeaders, RequestMethod, type ResponseLike, type RestEvents, type RestEventsMap, type RouteData, type RouteLike, type StickerExtension, calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse, version };
|
||||
|
||||
29
node_modules/@discordjs/rest/dist/web.js
generated
vendored
29
node_modules/@discordjs/rest/dist/web.js
generated
vendored
@@ -55,10 +55,13 @@ function getDefaultStrategy() {
|
||||
}
|
||||
__name(getDefaultStrategy, "getDefaultStrategy");
|
||||
|
||||
// src/lib/CDN.ts
|
||||
var import_v102 = require("discord-api-types/v10");
|
||||
|
||||
// src/lib/utils/constants.ts
|
||||
var import_util = require("@discordjs/util");
|
||||
var import_v10 = require("discord-api-types/v10");
|
||||
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.4.0)`;
|
||||
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.5.1)`;
|
||||
var DefaultUserAgentAppendix = (0, import_util.getUserAgentAppendix)();
|
||||
var DefaultRestOptions = {
|
||||
agent: null,
|
||||
@@ -96,7 +99,17 @@ var RESTEvents = /* @__PURE__ */ ((RESTEvents2) => {
|
||||
})(RESTEvents || {});
|
||||
var ALLOWED_EXTENSIONS = ["webp", "png", "jpg", "jpeg", "gif"];
|
||||
var ALLOWED_STICKER_EXTENSIONS = ["png", "json", "gif"];
|
||||
var ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
|
||||
var ALLOWED_SIZES = [
|
||||
16,
|
||||
32,
|
||||
64,
|
||||
128,
|
||||
256,
|
||||
512,
|
||||
1024,
|
||||
2048,
|
||||
4096
|
||||
];
|
||||
var OverwrittenMimeTypes = {
|
||||
// https://github.com/discordjs/discord.js/issues/8557
|
||||
"image/apng": "image/png"
|
||||
@@ -379,7 +392,7 @@ var CDN = class {
|
||||
* @param options - Optional options for the banner
|
||||
*/
|
||||
guildMemberBanner(guildId, userId, bannerHash, options) {
|
||||
return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);
|
||||
return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banners/${bannerHash}`, bannerHash, options);
|
||||
}
|
||||
/**
|
||||
* Generates an icon URL, e.g. for a guild.
|
||||
@@ -456,6 +469,14 @@ var CDN = class {
|
||||
guildScheduledEventCover(scheduledEventId, coverHash, options) {
|
||||
return this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);
|
||||
}
|
||||
/**
|
||||
* Generates a URL for a soundboard sound.
|
||||
*
|
||||
* @param soundId - The soundboard sound id
|
||||
*/
|
||||
soundboardSound(soundId) {
|
||||
return `${this.cdn}${import_v102.CDNRoutes.soundboardSound(soundId)}`;
|
||||
}
|
||||
/**
|
||||
* Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
|
||||
*
|
||||
@@ -1382,7 +1403,7 @@ var REST = class _REST extends import_async_event_emitter.AsyncEventEmitter {
|
||||
};
|
||||
|
||||
// src/shared.ts
|
||||
var version = "2.4.0";
|
||||
var version = "2.5.1";
|
||||
|
||||
// src/web.ts
|
||||
setDefaultStrategy(fetch);
|
||||
|
||||
2
node_modules/@discordjs/rest/dist/web.js.map
generated
vendored
2
node_modules/@discordjs/rest/dist/web.js.map
generated
vendored
File diff suppressed because one or more lines are too long
29
node_modules/@discordjs/rest/dist/web.mjs
generated
vendored
29
node_modules/@discordjs/rest/dist/web.mjs
generated
vendored
@@ -12,10 +12,13 @@ function getDefaultStrategy() {
|
||||
}
|
||||
__name(getDefaultStrategy, "getDefaultStrategy");
|
||||
|
||||
// src/lib/CDN.ts
|
||||
import { CDNRoutes } from "discord-api-types/v10";
|
||||
|
||||
// src/lib/utils/constants.ts
|
||||
import { getUserAgentAppendix } from "@discordjs/util";
|
||||
import { APIVersion } from "discord-api-types/v10";
|
||||
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.4.0)`;
|
||||
var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.5.1)`;
|
||||
var DefaultUserAgentAppendix = getUserAgentAppendix();
|
||||
var DefaultRestOptions = {
|
||||
agent: null,
|
||||
@@ -53,7 +56,17 @@ var RESTEvents = /* @__PURE__ */ ((RESTEvents2) => {
|
||||
})(RESTEvents || {});
|
||||
var ALLOWED_EXTENSIONS = ["webp", "png", "jpg", "jpeg", "gif"];
|
||||
var ALLOWED_STICKER_EXTENSIONS = ["png", "json", "gif"];
|
||||
var ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
|
||||
var ALLOWED_SIZES = [
|
||||
16,
|
||||
32,
|
||||
64,
|
||||
128,
|
||||
256,
|
||||
512,
|
||||
1024,
|
||||
2048,
|
||||
4096
|
||||
];
|
||||
var OverwrittenMimeTypes = {
|
||||
// https://github.com/discordjs/discord.js/issues/8557
|
||||
"image/apng": "image/png"
|
||||
@@ -336,7 +349,7 @@ var CDN = class {
|
||||
* @param options - Optional options for the banner
|
||||
*/
|
||||
guildMemberBanner(guildId, userId, bannerHash, options) {
|
||||
return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);
|
||||
return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banners/${bannerHash}`, bannerHash, options);
|
||||
}
|
||||
/**
|
||||
* Generates an icon URL, e.g. for a guild.
|
||||
@@ -413,6 +426,14 @@ var CDN = class {
|
||||
guildScheduledEventCover(scheduledEventId, coverHash, options) {
|
||||
return this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);
|
||||
}
|
||||
/**
|
||||
* Generates a URL for a soundboard sound.
|
||||
*
|
||||
* @param soundId - The soundboard sound id
|
||||
*/
|
||||
soundboardSound(soundId) {
|
||||
return `${this.cdn}${CDNRoutes.soundboardSound(soundId)}`;
|
||||
}
|
||||
/**
|
||||
* Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
|
||||
*
|
||||
@@ -1339,7 +1360,7 @@ var REST = class _REST extends AsyncEventEmitter {
|
||||
};
|
||||
|
||||
// src/shared.ts
|
||||
var version = "2.4.0";
|
||||
var version = "2.5.1";
|
||||
|
||||
// src/web.ts
|
||||
setDefaultStrategy(fetch);
|
||||
|
||||
2
node_modules/@discordjs/rest/dist/web.mjs.map
generated
vendored
2
node_modules/@discordjs/rest/dist/web.mjs.map
generated
vendored
File diff suppressed because one or more lines are too long
10
node_modules/@discordjs/rest/package.json
generated
vendored
10
node_modules/@discordjs/rest/package.json
generated
vendored
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/package.json",
|
||||
"name": "@discordjs/rest",
|
||||
"version": "2.4.0",
|
||||
"version": "2.5.1",
|
||||
"description": "The REST API for discord.js",
|
||||
"exports": {
|
||||
".": {
|
||||
@@ -74,10 +74,10 @@
|
||||
"@sapphire/async-queue": "^1.5.3",
|
||||
"@sapphire/snowflake": "^3.5.3",
|
||||
"@vladfrangu/async_event_emitter": "^2.4.6",
|
||||
"discord-api-types": "0.37.97",
|
||||
"discord-api-types": "^0.38.1",
|
||||
"magic-bytes.js": "^1.10.0",
|
||||
"tslib": "^2.6.3",
|
||||
"undici": "6.19.8",
|
||||
"undici": "6.21.3",
|
||||
"@discordjs/collection": "^2.1.1",
|
||||
"@discordjs/util": "^1.1.1"
|
||||
},
|
||||
@@ -95,8 +95,8 @@
|
||||
"turbo": "^2.0.14",
|
||||
"typescript": "~5.5.4",
|
||||
"vitest": "^2.0.5",
|
||||
"@discordjs/api-extractor": "^7.38.1",
|
||||
"@discordjs/scripts": "^0.1.0"
|
||||
"@discordjs/scripts": "^0.1.0",
|
||||
"@discordjs/api-extractor": "^7.38.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
||||
Reference in New Issue
Block a user