From 5357b9319b0fd8c4ba4c58646ab32154f0bad077 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Thu, 21 Apr 2022 02:06:37 -0400 Subject: [PATCH] [commands] Ignore delete_after for ephemeral interaction sends --- discord/ext/commands/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index 654407dda..d5ab7ebc9 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -732,6 +732,6 @@ class Context(discord.abc.Messageable, Generic[BotT]): await self.interaction.response.send_message(**kwargs) msg = await self.interaction.original_message() - if delete_after is not None: + if delete_after is not None and not (ephemeral and self.interaction is not None): await msg.delete(delay=delete_after) return msg