From cbfb295f6bfad259779199b7b4c6b82e4ec1f44d Mon Sep 17 00:00:00 2001 From: PanSzelescik Date: Sun, 4 Jul 2021 23:11:04 +0200 Subject: [PATCH 1/3] feat(LimitedCollection): export LimitedCollection --- src/index.js | 1 + typings/index.d.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/index.js b/src/index.js index 8ec1ab8ddfda..34cc9f298c68 100644 --- a/src/index.js +++ b/src/index.js @@ -21,6 +21,7 @@ module.exports = { DiscordAPIError: require('./rest/DiscordAPIError'), HTTPError: require('./rest/HTTPError'), RateLimitError: require('./rest/RateLimitError'), + LimitedCollection: require('./util/LimitedCollection'), MessageFlags: require('./util/MessageFlags'), Intents: require('./util/Intents'), Options: require('./util/Options'), diff --git a/typings/index.d.ts b/typings/index.d.ts index e2964a20d9cf..73eeb508c4eb 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1291,6 +1291,11 @@ declare module 'discord.js' { public welcomeScreen: WelcomeScreen | null; } + export class LimitedCollection extends Collection { + constructor(maxSize?: number, iterable?: Iterable); + public maxSize: number; + } + export class Message extends Base { constructor(client: Client, data: unknown, channel: TextChannel | DMChannel | NewsChannel | ThreadChannel); private patch(data: unknown): Message; From 7f51095e0800a6f4a85b79f205bfa8b48e739be8 Mon Sep 17 00:00:00 2001 From: PanSzelescik Date: Sun, 4 Jul 2021 23:48:13 +0200 Subject: [PATCH 2/3] fix: remove @private --- src/util/LimitedCollection.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/LimitedCollection.js b/src/util/LimitedCollection.js index caa49780f78c..0f6ea6c52939 100644 --- a/src/util/LimitedCollection.js +++ b/src/util/LimitedCollection.js @@ -8,7 +8,6 @@ const Collection = require('./Collection.js'); * @extends {Collection} * @param {number} [maxSize=0] The maximum size of the Collection * @param {Iterable} [iterable=null] Optional entries passed to the Map constructor. - * @private */ class LimitedCollection extends Collection { constructor(maxSize = 0, iterable = null) { From d7a117a83b0bf9c4a0243b8522007a61b8418412 Mon Sep 17 00:00:00 2001 From: PanSzelescik Date: Mon, 5 Jul 2021 14:46:05 +0200 Subject: [PATCH 3/3] fix: typings --- typings/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 0672df03e2d1..f3e4a3fd20a9 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1372,7 +1372,7 @@ export class Role extends Base { export class SelectMenuInteraction extends MessageComponentInteraction { public componentType: 'SELECT_MENU'; - public values: string[] | null; + public values: string[]; } export class Shard extends EventEmitter { @@ -4349,4 +4349,4 @@ export type InternalDiscordGatewayAdapterCreator = ( methods: InternalDiscordGatewayAdapterLibraryMethods, ) => InternalDiscordGatewayAdapterImplementerMethods; -//#endregion \ No newline at end of file +//#endregion