Skip to content

Commit 5410e00

Browse files
authored
adjust Label args (first arg label)
1 parent 8308615 commit 5410e00

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

discord/ui/label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ class Label(Item[V]):
5858

5959
def __init__(
6060
self,
61+
label: str,
6162
item: Item = None,
6263
*,
63-
label: str,
6464
description: str | None = None,
6565
id: int | None = None,
6666
):

examples/modal_dialogs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@
1414
class MyModal(discord.ui.DesignerModal):
1515
def __init__(self, *args, **kwargs) -> None:
1616
first_input = discord.ui.Label(
17+
"Short Input",
1718
discord.ui.InputText(
1819
placeholder="Placeholder Test",
1920
),
20-
label="Short Input",
2121
)
2222
second_input = discord.ui.Label(
23+
"Longer Input",
2324
discord.ui.InputText(
2425
placeholder="Placeholder Test",
2526
value="Longer Value\nSuper Long Value",
2627
style=discord.InputTextStyle.long,
2728
),
28-
label="Longer Input",
2929
description="You can also describe the purpose of this input.",
3030
)
3131
select = discord.ui.Label(
32+
"What's your favorite color?",
3233
discord.ui.Select(
3334
placeholder="Select a color",
3435
options=[
@@ -38,7 +39,6 @@ def __init__(self, *args, **kwargs) -> None:
3839
],
3940
required=False,
4041
),
41-
label="What's your favorite color?",
4242
description="If it is not listed, skip this question.",
4343
)
4444
super().__init__(

0 commit comments

Comments
 (0)