feat(interactions): add messageId parameter to deleteReply() (#8896)

This commit is contained in:
Almeida
2022-12-07 14:23:42 +00:00
committed by GitHub
parent 976b234e9d
commit 3f555d5ddf

View File

@@ -89,7 +89,7 @@ export class InteractionsAPI {
applicationId: Snowflake, applicationId: Snowflake,
interactionToken: string, interactionToken: string,
data: APIInteractionResponseCallbackData & { files?: RawFile[] }, data: APIInteractionResponseCallbackData & { files?: RawFile[] },
messageId?: string, messageId?: Snowflake | '@original',
) { ) {
return this.webhooks.editMessage(applicationId, interactionToken, messageId ?? '@original', data); return this.webhooks.editMessage(applicationId, interactionToken, messageId ?? '@original', data);
} }
@@ -113,9 +113,10 @@ export class InteractionsAPI {
* *
* @param applicationId - The application id of the interaction * @param applicationId - The application id of the interaction
* @param interactionToken - The token of the interaction * @param interactionToken - The token of the interaction
* @param messageId - The id of the message to delete. If omitted, the original reply will be deleted
*/ */
public async deleteReply(applicationId: Snowflake, interactionToken: string) { public async deleteReply(applicationId: Snowflake, interactionToken: string, messageId?: Snowflake | '@original') {
await this.webhooks.deleteMessage(applicationId, interactionToken, '@original'); await this.webhooks.deleteMessage(applicationId, interactionToken, messageId ?? '@original');
} }
/** /**