From 7365dd1bd26256d986bc6f457d9fd04410a1a350 Mon Sep 17 00:00:00 2001 From: Steve C Date: Wed, 26 Oct 2022 04:29:25 -0400 Subject: [PATCH] [commands] Allow delete_after in Context.send on ephemeral messages --- discord/ext/commands/context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index 989af3140..3b20a50e4 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -769,7 +769,7 @@ class Context(discord.abc.Messageable, Generic[BotT]): delete_after: :class:`float` If provided, the number of seconds to wait in the background before deleting the message we just sent. If the deletion fails, - then it is silently ignored. This is ignored for interaction based contexts. + then it is silently ignored. allowed_mentions: :class:`~discord.AllowedMentions` Controls the mentions being processed in this message. If this is passed, then the object is merged with :attr:`~discord.Client.allowed_mentions`. @@ -876,6 +876,6 @@ class Context(discord.abc.Messageable, Generic[BotT]): await self.interaction.response.send_message(**kwargs) msg = await self.interaction.original_response() - if delete_after is not None and not (ephemeral and self.interaction is not None): + if delete_after is not None: await msg.delete(delay=delete_after) return msg