mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
feat(interactions): add messageId parameter to deleteReply() (#8896)
This commit is contained in:
@@ -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');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user