You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: discord_slash/context.py
+58Lines changed: 58 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -272,6 +272,64 @@ async def send(
272
272
else:
273
273
returnresp
274
274
275
+
asyncdefreply(
276
+
self,
277
+
content: str="",
278
+
*,
279
+
embed: discord.Embed=None,
280
+
embeds: typing.List[discord.Embed] =None,
281
+
tts: bool=False,
282
+
file: discord.File=None,
283
+
files: typing.List[discord.File] =None,
284
+
allowed_mentions: discord.AllowedMentions=None,
285
+
hidden: bool=False,
286
+
delete_after: float=None,
287
+
components: typing.List[dict] =None,
288
+
) ->model.SlashMessage:
289
+
"""
290
+
Sends response of the interaction. This is currently an alias of the ``.send()`` method.
291
+
292
+
.. warning::
293
+
- Since Release 1.0.9, this is completely changed. If you are migrating from older version, please make sure to fix the usage.
294
+
- You can't use both ``embed`` and ``embeds`` at the same time, also applies to ``file`` and ``files``.
295
+
- If you send files in the initial response, this will defer if it's not been deferred, and then PATCH with the message
296
+
297
+
:param content: Content of the response.
298
+
:type content: str
299
+
:param embed: Embed of the response.
300
+
:type embed: discord.Embed
301
+
:param embeds: Embeds of the response. Maximum 10.
302
+
:type embeds: List[discord.Embed]
303
+
:param tts: Whether to speak message using tts. Default ``False``.
304
+
:type tts: bool
305
+
:param file: File to send.
306
+
:type file: discord.File
307
+
:param files: Files to send.
308
+
:type files: List[discord.File]
309
+
:param allowed_mentions: AllowedMentions of the message.
310
+
:type allowed_mentions: discord.AllowedMentions
311
+
:param hidden: Whether the message is hidden, which means message content will only be seen to the author.
312
+
:type hidden: bool
313
+
:param delete_after: 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.
314
+
:type delete_after: float
315
+
:param components: Message components in the response. The top level must be made of ActionRows.
0 commit comments