7
7
from interactions .models .discord .channel import TYPE_MESSAGEABLE_CHANNEL
8
8
from interactions .models .discord .embed import Embed
9
9
from interactions .models .discord .file import UPLOADABLE_TYPE
10
- from interactions .models .discord .message import Message
10
+ from interactions .models .discord .message import Message , MessageReference
11
11
from interactions .models .internal .context import BaseContext
12
12
from interactions .models .misc .context_manager import Typing
13
13
@@ -86,6 +86,7 @@ async def reply(
86
86
content : Optional [str ] = None ,
87
87
embeds : Optional [Union [Iterable [Union [Embed , dict ]], Union [Embed , dict ]]] = None ,
88
88
embed : Optional [Union [Embed , dict ]] = None ,
89
+ fail_if_not_exists : bool = True ,
89
90
** kwargs : Any ,
90
91
) -> Message :
91
92
"""
@@ -95,10 +96,12 @@ async def reply(
95
96
content: Message text content.
96
97
embeds: Embedded rich content (up to 6000 characters).
97
98
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.
98
100
**kwargs: Additional options to pass to `send`.
99
101
100
102
Returns:
101
103
New message object.
102
104
103
105
"""
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