docs(InteractionResponses): Document missing properties (#6178)

This commit is contained in:
Jiralite
2021-07-28 01:30:22 +01:00
committed by GitHub
parent 9679b90872
commit 5e433b5995
2 changed files with 17 additions and 3 deletions

View File

@@ -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<Message|void>}
* @example
* // Remove the components from the message

4
typings/index.d.ts vendored
View File

@@ -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;
}