Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/interactions/ui-components/modal-dialogs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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()
Expand Down