77from interactions .models .discord .channel import TYPE_MESSAGEABLE_CHANNEL
88from interactions .models .discord .embed import Embed
99from interactions .models .discord .file import UPLOADABLE_TYPE
10- from interactions .models .discord .message import Message
10+ from interactions .models .discord .message import Message , MessageReference
1111from interactions .models .internal .context import BaseContext
1212from interactions .models .misc .context_manager import Typing
1313
@@ -86,6 +86,7 @@ async def reply(
8686 content : Optional [str ] = None ,
8787 embeds : Optional [Union [Iterable [Union [Embed , dict ]], Union [Embed , dict ]]] = None ,
8888 embed : Optional [Union [Embed , dict ]] = None ,
89+ fail_if_not_exists : bool = True ,
8990 ** kwargs : Any ,
9091 ) -> Message :
9192 """
@@ -95,10 +96,12 @@ async def reply(
9596 content: Message text content.
9697 embeds: Embedded rich content (up to 6000 characters).
9798 embed: Embedded rich content (up to 6000 characters).
99+ fail_if_not_exists: Whether to error if the command invocation doesn't exist instead of sending as a normal (non-reply) message.
98100 **kwargs: Additional options to pass to `send`.
99101
100102 Returns:
101103 New message object.
102104
103105 """
104- return await self .send (content = content , reply_to = self .message , embeds = embeds or embed , ** kwargs )
106+ ref = MessageReference .for_message (self .message , fail_if_not_exists = fail_if_not_exists )
107+ return await self .send (content = content , reply_to = ref , embeds = embeds or embed , ** kwargs )
0 commit comments