Skip to content

Commit 25c657c

Browse files
authored
oops indent
1 parent 37c762d commit 25c657c

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

examples/modal_dialogs.py

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -84,37 +84,37 @@ async def modaltest(ctx: commands.Context):
8484
"""Shows an example of modals being invoked from an interaction component (e.g. a button or select menu)"""
8585

8686

87-
class MyView(discord.ui.View):
88-
@discord.ui.button(label="Modal Test", style=discord.ButtonStyle.primary)
89-
async def button_callback(
90-
self, button: discord.ui.Button, interaction: discord.Interaction
91-
):
92-
modal = MyModal(title="Modal Triggered from Button")
93-
await interaction.response.send_modal(modal)
94-
95-
@discord.ui.select(
96-
placeholder="Pick Your Modal",
97-
min_values=1,
98-
max_values=1,
99-
options=[
100-
discord.SelectOption(
101-
label="First Modal", description="Shows the first modal"
102-
),
103-
discord.SelectOption(
104-
label="Second Modal", description="Shows the second modal"
105-
),
106-
],
107-
)
108-
async def select_callback(
109-
self, select: discord.ui.Select, interaction: discord.Interaction
110-
):
111-
modal = MyModal(title="Temporary Title")
112-
modal.title = select.values[0]
113-
await interaction.response.send_modal(modal)
114-
115-
116-
view = MyView()
117-
await ctx.send("Click Button, Receive Modal", view=view)
87+
class MyView(discord.ui.View):
88+
@discord.ui.button(label="Modal Test", style=discord.ButtonStyle.primary)
89+
async def button_callback(
90+
self, button: discord.ui.Button, interaction: discord.Interaction
91+
):
92+
modal = MyModal(title="Modal Triggered from Button")
93+
await interaction.response.send_modal(modal)
94+
95+
@discord.ui.select(
96+
placeholder="Pick Your Modal",
97+
min_values=1,
98+
max_values=1,
99+
options=[
100+
discord.SelectOption(
101+
label="First Modal", description="Shows the first modal"
102+
),
103+
discord.SelectOption(
104+
label="Second Modal", description="Shows the second modal"
105+
),
106+
],
107+
)
108+
async def select_callback(
109+
self, select: discord.ui.Select, interaction: discord.Interaction
110+
):
111+
modal = MyModal(title="Temporary Title")
112+
modal.title = select.values[0]
113+
await interaction.response.send_modal(modal)
114+
115+
116+
view = MyView()
117+
await ctx.send("Click Button, Receive Modal", view=view)
118118

119119

120120
bot.run("TOKEN")

0 commit comments

Comments
 (0)