From 3f555d5ddf53b778fc0e69e1ff77ec93d876dcdb Mon Sep 17 00:00:00 2001 From: Almeida Date: Wed, 7 Dec 2022 14:23:42 +0000 Subject: [PATCH] feat(interactions): add `messageId` parameter to `deleteReply()` (#8896) --- packages/core/src/api/interactions.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/core/src/api/interactions.ts b/packages/core/src/api/interactions.ts index 5db65e471650..cb8bae4e6f27 100644 --- a/packages/core/src/api/interactions.ts +++ b/packages/core/src/api/interactions.ts @@ -89,7 +89,7 @@ export class InteractionsAPI { applicationId: Snowflake, interactionToken: string, data: APIInteractionResponseCallbackData & { files?: RawFile[] }, - messageId?: string, + messageId?: Snowflake | '@original', ) { 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 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) { - await this.webhooks.deleteMessage(applicationId, interactionToken, '@original'); + public async deleteReply(applicationId: Snowflake, interactionToken: string, messageId?: Snowflake | '@original') { + await this.webhooks.deleteMessage(applicationId, interactionToken, messageId ?? '@original'); } /**