Skip to content

Commit 7211b29

Browse files
authored
Add a note about using ctx.respond
1 parent 025d772 commit 7211b29

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/app_commands/slash_basic.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
async def hello(ctx):
1515
"""Say hello to the bot""" # the command description can be supplied as the docstring
1616
await ctx.respond(f"Hello {ctx.author}!")
17+
# Please note that you MUST either use ctx.respond() or ctx.defer() in your
18+
# slash command code, otherwise the interaction will fail.
1719

1820

1921
@bot.slash_command(

0 commit comments

Comments
 (0)