Skip to content

Commit

Permalink
docs(InteractionResponses): Document missing properties (#6178)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite authored Jul 28, 2021
1 parent 9679b90 commit 5e433b5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
16 changes: 15 additions & 1 deletion src/structures/interfaces/InteractionResponses.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down Expand Up @@ -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<Message|void>}
* @example
* // Remove the components from the message
Expand Down
4 changes: 2 additions & 2 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1132,8 +1132,8 @@ export class MessageComponentInteraction extends Interaction {
public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message | APIMessage>;
public reply(options: InteractionReplyOptions & { fetchReply: true }): Promise<Message | APIMessage>;
public reply(options: string | MessagePayload | InteractionReplyOptions): Promise<void>;
public update(content: InteractionUpdateOptions & { fetchReply: true }): Promise<Message | APIMessage>;
public update(content: string | MessagePayload | InteractionUpdateOptions): Promise<void>;
public update(options: InteractionUpdateOptions & { fetchReply: true }): Promise<Message | APIMessage>;
public update(options: string | MessagePayload | InteractionUpdateOptions): Promise<void>;

public static resolveType(type: MessageComponentTypeResolvable): MessageComponentType;
}
Expand Down

0 comments on commit 5e433b5

Please sign in to comment.