Skip to content

Commit 605ae4c

Browse files
Add note about defering in quickstart
1 parent b86eb43 commit 605ae4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/quickstart.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ slash commands just yet. We can do that by adding this code shown here:
5454
async def _ping(ctx): # Defines a new "context" (ctx) command called "ping."
5555
await ctx.send(f"Pong! ({client.latency*1000}ms)")
5656
57+
.. note::
58+
In this example we responded directly to the interaction, however if you want to delay the response (if you need more than 3 seconds before sending a message)
59+
you can defer the response for up to 15 miniuties with :meth:`ctx.defer() <.SlashContext.defer()>`, this displays a "Bot is thinking" message.
60+
However do not defer the response if you will be able to respond (send) within three seconds as this will cause a message to flash up
61+
5762
Let's compare some of the major code differences between the prior examples in order
5863
to explain what's going on here:
5964

0 commit comments

Comments
 (0)