@@ -22,7 +22,7 @@ def __init__(self, *args, **kwargs) -> None:
22
22
label = "Longer Input" ,
23
23
value = "Longer Value\n Super Long Value" ,
24
24
style = discord .InputTextStyle .long ,
25
- description = "You can also describe the purpose of this input."
25
+ description = "You can also describe the purpose of this input." ,
26
26
),
27
27
discord .ui .TextDisplay ("# Personal Questions" ),
28
28
discord .ui .Select (
@@ -34,7 +34,7 @@ def __init__(self, *args, **kwargs) -> None:
34
34
discord .SelectOption (label = "Blue" , emoji = "🟦" ),
35
35
],
36
36
description = "If it is not listed, skip this question." ,
37
- required = False
37
+ required = False ,
38
38
),
39
39
* args ,
40
40
** kwargs ,
@@ -83,6 +83,7 @@ async def modal_user(ctx: discord.ApplicationContext, member: discord.Member):
83
83
async def modaltest (ctx : commands .Context ):
84
84
"""Shows an example of modals being invoked from an interaction component (e.g. a button or select menu)"""
85
85
86
+
86
87
class MyView (discord .ui .View ):
87
88
@discord .ui .button (label = "Modal Test" , style = discord .ButtonStyle .primary )
88
89
async def button_callback (
@@ -111,6 +112,7 @@ async def select_callback(
111
112
modal .title = select .values [0 ]
112
113
await interaction .response .send_modal (modal )
113
114
115
+
114
116
view = MyView ()
115
117
await ctx .send ("Click Button, Receive Modal" , view = view )
116
118
0 commit comments