mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
fix: backport allow deletion of ephemeral messages to v13 (#8811)
Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
@@ -145,6 +145,7 @@ const Messages = {
|
|||||||
|
|
||||||
INTERACTION_ALREADY_REPLIED: 'The reply to this interaction has already been sent or deferred.',
|
INTERACTION_ALREADY_REPLIED: 'The reply to this interaction has already been sent or deferred.',
|
||||||
INTERACTION_NOT_REPLIED: 'The reply to this interaction has not been sent or deferred.',
|
INTERACTION_NOT_REPLIED: 'The reply to this interaction has not been sent or deferred.',
|
||||||
|
/** @deprecated */
|
||||||
INTERACTION_EPHEMERAL_REPLIED: 'Ephemeral responses cannot be deleted.',
|
INTERACTION_EPHEMERAL_REPLIED: 'Ephemeral responses cannot be deleted.',
|
||||||
|
|
||||||
COMMAND_INTERACTION_OPTION_NOT_FOUND: name => `Required option "${name}" not found.`,
|
COMMAND_INTERACTION_OPTION_NOT_FOUND: name => `Required option "${name}" not found.`,
|
||||||
|
|||||||
@@ -164,7 +164,6 @@ class InteractionResponses {
|
|||||||
* .catch(console.error);
|
* .catch(console.error);
|
||||||
*/
|
*/
|
||||||
async deleteReply(message = '@original') {
|
async deleteReply(message = '@original') {
|
||||||
if (this.ephemeral) throw new Error('INTERACTION_EPHEMERAL_REPLIED');
|
|
||||||
await this.webhook.deleteMessage(message);
|
await this.webhook.deleteMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user