From 5e433b599522265f7257bdd6b58f69dd23311b79 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Wed, 28 Jul 2021 01:30:22 +0100 Subject: [PATCH] docs(InteractionResponses): Document missing properties (#6178) --- .../interfaces/InteractionResponses.js | 16 +++++++++++++++- typings/index.d.ts | 4 ++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/structures/interfaces/InteractionResponses.js b/src/structures/interfaces/InteractionResponses.js index 239c69fbf..413de09db 100644 --- a/src/structures/interfaces/InteractionResponses.js +++ b/src/structures/interfaces/InteractionResponses.js @@ -14,12 +14,26 @@ class InteractionResponses { * Options for deferring the reply to an {@link Interaction}. * @typedef {Object} InteractionDeferOptions * @property {boolean} [ephemeral] Whether the reply should be ephemeral + * @property {boolean} [fetchReply] Whether to fetch the reply + */ + + /** + * Options for deferring and updating the reply to a {@link ButtonInteraction}. + * @typedef {Object} InteractionDeferUpdateOptions + * @property {boolean} [fetchReply] Whether to fetch the reply */ /** * Options for a reply to an {@link Interaction}. * @typedef {BaseMessageOptions} InteractionReplyOptions * @property {boolean} [ephemeral] Whether the reply should be ephemeral + * @property {boolean} [fetchReply] Whether to fetch the reply + */ + + /** + * Options for updating the message received from a {@link ButtonInteraction}. + * @typedef {MessageEditOptions} InteractionUpdateOptions + * @property {boolean} [fetchReply] Whether to fetch the reply */ /** @@ -178,7 +192,7 @@ class InteractionResponses { /** * Updates the original message of the component on which the interaction was received on. - * @param {string|MessagePayload|WebhookEditMessageOptions} options The options for the updated message + * @param {string|MessagePayload|InteractionUpdateOptions} options The options for the updated message * @returns {Promise} * @example * // Remove the components from the message diff --git a/typings/index.d.ts b/typings/index.d.ts index 46c7ae47a..281fa3a2e 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1132,8 +1132,8 @@ export class MessageComponentInteraction extends Interaction { public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise; public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise; public reply(options: string | MessagePayload | InteractionReplyOptions): Promise; - public update(content: InteractionUpdateOptions & { fetchReply: true }): Promise; - public update(content: string | MessagePayload | InteractionUpdateOptions): Promise; + public update(options: InteractionUpdateOptions & { fetchReply: true }): Promise; + public update(options: string | MessagePayload | InteractionUpdateOptions): Promise; public static resolveType(type: MessageComponentTypeResolvable): MessageComponentType; }