From 1a9764e379c463a48d9f0ab9e75ca4901dfcfe86 Mon Sep 17 00:00:00 2001 From: Cit Date: Fri, 7 Oct 2022 22:56:28 +1100 Subject: [PATCH 1/2] Updated documentation for UserContextMenuCommandInteraction class --- packages/discord.js/src/structures/BaseInteraction.js | 2 +- .../src/structures/ContextMenuCommandInteraction.js | 2 +- .../src/structures/UserContextMenuCommandInteraction.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/discord.js/src/structures/BaseInteraction.js b/packages/discord.js/src/structures/BaseInteraction.js index 6177fb29ed12..5278c6781381 100644 --- a/packages/discord.js/src/structures/BaseInteraction.js +++ b/packages/discord.js/src/structures/BaseInteraction.js @@ -53,7 +53,7 @@ class BaseInteraction extends Base { this.guildId = data.guild_id ?? null; /** - * The user which sent this interaction + * The user who created this interaction * @type {User} */ this.user = this.client.users._add(data.user ?? data.member.user); diff --git a/packages/discord.js/src/structures/ContextMenuCommandInteraction.js b/packages/discord.js/src/structures/ContextMenuCommandInteraction.js index 0f5d37ab4862..fc49ca56d3eb 100644 --- a/packages/discord.js/src/structures/ContextMenuCommandInteraction.js +++ b/packages/discord.js/src/structures/ContextMenuCommandInteraction.js @@ -25,7 +25,7 @@ class ContextMenuCommandInteraction extends CommandInteraction { ); /** - * The id of the target of the interaction + * The id of the target of this interaction * @type {Snowflake} */ this.targetId = data.data.target_id; diff --git a/packages/discord.js/src/structures/UserContextMenuCommandInteraction.js b/packages/discord.js/src/structures/UserContextMenuCommandInteraction.js index a074de1ad0a8..01a577bc4c0b 100644 --- a/packages/discord.js/src/structures/UserContextMenuCommandInteraction.js +++ b/packages/discord.js/src/structures/UserContextMenuCommandInteraction.js @@ -8,7 +8,7 @@ const ContextMenuCommandInteraction = require('./ContextMenuCommandInteraction') */ class UserContextMenuCommandInteraction extends ContextMenuCommandInteraction { /** - * The user this interaction was sent from + * The user of the target for this interaction * @type {User} * @readonly */ @@ -17,7 +17,7 @@ class UserContextMenuCommandInteraction extends ContextMenuCommandInteraction { } /** - * The member this interaction was sent from + * The member of the target for this interaction * @type {?(GuildMember|APIGuildMember)} * @readonly */ From a10147cb7e8eebd648f414c0104d11e966688ed8 Mon Sep 17 00:00:00 2001 From: Noel Date: Sun, 9 Oct 2022 22:27:33 +0200 Subject: [PATCH 2/2] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: A. Román --- .../src/structures/UserContextMenuCommandInteraction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/discord.js/src/structures/UserContextMenuCommandInteraction.js b/packages/discord.js/src/structures/UserContextMenuCommandInteraction.js index 01a577bc4c0b..2e9dc7c62877 100644 --- a/packages/discord.js/src/structures/UserContextMenuCommandInteraction.js +++ b/packages/discord.js/src/structures/UserContextMenuCommandInteraction.js @@ -8,7 +8,7 @@ const ContextMenuCommandInteraction = require('./ContextMenuCommandInteraction') */ class UserContextMenuCommandInteraction extends ContextMenuCommandInteraction { /** - * The user of the target for this interaction + * The target user from this interaction * @type {User} * @readonly */ @@ -17,7 +17,7 @@ class UserContextMenuCommandInteraction extends ContextMenuCommandInteraction { } /** - * The member of the target for this interaction + * The target member from this interaction * @type {?(GuildMember|APIGuildMember)} * @readonly */