Files
discordeno/helpers/interactions/responses/deleteFollowupMessage.ts
T
Skillz4Killz 3a5bdce32d feat: helpers support strings in args (#2478)
* fix: helpers support strings in args

* fix: fmt
2022-09-15 20:59:02 -05:00

27 lines
1017 B
TypeScript

import type { Bot } from "../../../bot.ts";
import { BigString } from "../../../types/shared.ts";
/**
* Deletes a follow-up message to an interaction.
*
* @param bot - The bot instance to use to make the request.
* @param token - The interaction token to use, provided in the original interaction.
* @param messageId - The ID of the message to delete.
*
* @remarks
* Unlike `deleteMessage()`, this endpoint allows the bot user to act without needing to see the channel the message is in.
*
* Does not support ephemeral follow-up messages due to these being stateless.
*
* Fires a _Message Delete_ event.
*
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message}
*/
export async function deleteFollowupMessage(bot: Bot, token: string, messageId: BigString): Promise<void> {
return await bot.rest.runMethod<void>(
bot.rest,
"DELETE",
bot.constants.routes.INTERACTION_ID_TOKEN_MESSAGE_ID(bot.applicationId, token, messageId),
);
}