From 4844ab4b138d75cc830ccfd0d06464351a030a12 Mon Sep 17 00:00:00 2001 From: Xithrius Date: Sun, 20 Nov 2022 14:02:14 -0800 Subject: Partial requested reviews resolved --- .../apps/content/resources/guides/python-guides/app-commands.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pydis_site/apps/content/resources') diff --git a/pydis_site/apps/content/resources/guides/python-guides/app-commands.md b/pydis_site/apps/content/resources/guides/python-guides/app-commands.md index 1354a136..3afe342a 100644 --- a/pydis_site/apps/content/resources/guides/python-guides/app-commands.md +++ b/pydis_site/apps/content/resources/guides/python-guides/app-commands.md @@ -279,9 +279,9 @@ bot = commands.Bot(command_prefix="!", intents=discord.Intents.default()) @bot.tree.command(name="time", description="...") async def _time(interaction: discord.Interaction, time_to_wait: int): # ------------------------------------------------------------- - await interaction.response.defer(ephemeral=True, thinking=True) + await interaction.response.defer(ephemeral=True) # ------------------------------------------------------------- - await interaction.edit_original_message(content=f"I will notify you after {time_to_wait} seconds have passed!") + await interaction.edit_original_response(content=f"I will notify you after {time_to_wait} seconds have passed!") await asyncio.sleep(time_to_wait) await interaction.edit_original_message(content=f"{interaction.user.mention}, {time_to_wait} seconds have already passed!") ``` @@ -396,7 +396,7 @@ bot = commands.Bot(command_prefix="!", intents=discord.Intents.default()) #sync commands @bot.tree.command(name="ping") -app_commands.checks.cooldown(1, 30) +@app_commands.checks.cooldown(1, 30) async def ping(interaction: discord.Interaction): await interaction.response.send_message("pong!") -- cgit v1.2.3