mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-16 06:03:11 +00:00
[commands] Fix delete_after not working with interaction Context.send
This commit is contained in:
parent
cd0d6749ea
commit
84e6b9283d
@ -727,7 +727,11 @@ class Context(discord.abc.Messageable, Generic[BotT]):
|
||||
}
|
||||
|
||||
if self.interaction.response.is_done():
|
||||
return await self.interaction.followup.send(**kwargs, wait=True)
|
||||
msg = await self.interaction.followup.send(**kwargs, wait=True)
|
||||
else:
|
||||
await self.interaction.response.send_message(**kwargs)
|
||||
msg = await self.interaction.original_message()
|
||||
|
||||
await self.interaction.response.send_message(**kwargs)
|
||||
return await self.interaction.original_message()
|
||||
if delete_after is not None:
|
||||
await msg.delete(delay=delete_after)
|
||||
return msg
|
||||
|
Loading…
x
Reference in New Issue
Block a user