Skip to content

Commit

Permalink
feat(interactions): add messageId parameter to deleteReply() (#8896)
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx authored Dec 7, 2022
1 parent 976b234 commit 3f555d5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/core/src/api/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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');
}

/**
Expand Down

0 comments on commit 3f555d5

Please sign in to comment.