From f57fcd6c218b8ab719fa42039bafd4bd5ac47bd4 Mon Sep 17 00:00:00 2001 From: NeloBlivion <41271523+NeloBlivion@users.noreply.github.com> Date: Sat, 1 Oct 2022 20:10:07 +0100 Subject: [PATCH] Revert "Update modal-dialogs.mdx" --- docs/interactions/ui-components/modal-dialogs.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/interactions/ui-components/modal-dialogs.mdx b/docs/interactions/ui-components/modal-dialogs.mdx index 6f9049d6..08d06b98 100644 --- a/docs/interactions/ui-components/modal-dialogs.mdx +++ b/docs/interactions/ui-components/modal-dialogs.mdx @@ -32,8 +32,8 @@ class MyModal(discord.ui.Modal): def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) - self.add_item(discord.ui.TextInput(label="Short Input")) - self.add_item(discord.ui.TextInput(label="Long Input", style=discord.TextStyle.long)) + self.add_item(discord.ui.InputText(label="Short Input")) + self.add_item(discord.ui.InputText(label="Long Input", style=discord.InputTextStyle.long)) async def callback(self, interaction: discord.Interaction): embed = discord.Embed(title="Modal Results") @@ -63,7 +63,7 @@ The `interaction` parameter we define in UI Components receives an [`Interaction ```py class MyView(discord.ui.View): @discord.ui.button(label="Send Modal") - async def button_callback(self, interaction, button): + async def button_callback(self, button, interaction): await interaction.response.send_modal(MyModal(title="Modal via Button")) @bot.slash_command()