diff --git a/packages/discord.js/src/structures/ChannelSelectMenuInteraction.js b/packages/discord.js/src/structures/ChannelSelectMenuInteraction.js index 04d076e599f0..0e28c01edd6d 100644 --- a/packages/discord.js/src/structures/ChannelSelectMenuInteraction.js +++ b/packages/discord.js/src/structures/ChannelSelectMenuInteraction.js @@ -11,6 +11,12 @@ class ChannelSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); + /** + * An array of the selected channel ids + * @type {Snowflake[]} + */ + this.values = data.data.values ?? []; + /** * Collection of the selected channels * @type {Collection} diff --git a/packages/discord.js/src/structures/MentionableSelectMenuInteraction.js b/packages/discord.js/src/structures/MentionableSelectMenuInteraction.js index bd294a04a74a..4e14bda6137b 100644 --- a/packages/discord.js/src/structures/MentionableSelectMenuInteraction.js +++ b/packages/discord.js/src/structures/MentionableSelectMenuInteraction.js @@ -12,6 +12,12 @@ class MentionableSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); + /** + * An array of the selected user and role ids + * @type {Snowflake[]} + */ + this.values = data.data.values ?? []; + const { members, users, roles } = data.data.resolved ?? {}; /** diff --git a/packages/discord.js/src/structures/RoleSelectMenuInteraction.js b/packages/discord.js/src/structures/RoleSelectMenuInteraction.js index b45d356a2828..7c7896329156 100644 --- a/packages/discord.js/src/structures/RoleSelectMenuInteraction.js +++ b/packages/discord.js/src/structures/RoleSelectMenuInteraction.js @@ -11,6 +11,12 @@ class RoleSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); + /** + * An array of the selected role ids + * @type {Snowflake[]} + */ + this.values = data.data.values ?? []; + /** * Collection of the selected roles * @type {Collection} diff --git a/packages/discord.js/src/structures/UserSelectMenuInteraction.js b/packages/discord.js/src/structures/UserSelectMenuInteraction.js index d2af4176a5e7..f6d2623a93ab 100644 --- a/packages/discord.js/src/structures/UserSelectMenuInteraction.js +++ b/packages/discord.js/src/structures/UserSelectMenuInteraction.js @@ -12,6 +12,12 @@ class UserSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); + /** + * An array of the selected user ids + * @type {Snowflake[]} + */ + this.values = data.data.values ?? []; + /** * Collection of the selected users * @type {Collection} diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 542f29fc769a..7aa467adbc79 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -2371,8 +2371,12 @@ export class UserSelectMenuInteraction< UserSelectMenuComponent | APIUserSelectComponent >; public componentType: ComponentType.UserSelect; + public values: Snowflake[]; public users: Collection; - public members: Collection>; + public members: Collection< + Snowflake, + CacheTypeReducer + >; public inGuild(): this is UserSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is UserSelectMenuInteraction<'cached'>; public inRawGuild(): this is UserSelectMenuInteraction<'raw'>; @@ -2390,7 +2394,8 @@ export class RoleSelectMenuInteraction< RoleSelectMenuComponent | APIRoleSelectComponent >; public componentType: ComponentType.RoleSelect; - public roles: Collection>; + public values: Snowflake[]; + public roles: Collection>; public inGuild(): this is RoleSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is RoleSelectMenuInteraction<'cached'>; public inRawGuild(): this is RoleSelectMenuInteraction<'raw'>; @@ -2408,9 +2413,13 @@ export class MentionableSelectMenuInteraction< MentionableSelectMenuComponent | APIMentionableSelectComponent >; public componentType: ComponentType.MentionableSelect; + public values: Snowflake[]; public users: Collection; - public members: Collection>; - public roles: Collection>; + public members: Collection< + Snowflake, + CacheTypeReducer + >; + public roles: Collection>; public inGuild(): this is MentionableSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is MentionableSelectMenuInteraction<'cached'>; public inRawGuild(): this is MentionableSelectMenuInteraction<'raw'>; @@ -2428,7 +2437,11 @@ export class ChannelSelectMenuInteraction< ChannelSelectMenuComponent | APIChannelSelectComponent >; public componentType: ComponentType.ChannelSelect; - public channels: Collection>; + public values: Snowflake[]; + public channels: Collection< + Snowflake, + CacheTypeReducer + >; public inGuild(): this is ChannelSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ChannelSelectMenuInteraction<'cached'>; public inRawGuild(): this is ChannelSelectMenuInteraction<'raw'>;