Skip to content

Commit 6587861

Browse files
committed
additional fix for InputText.label being required
1 parent 7a1e889 commit 6587861

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

discord/components.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ class InputText(Component):
149149
The style of the input text field.
150150
custom_id: Optional[:class:`str`]
151151
The ID of the input text field that gets received during an interaction.
152-
label: Optional[:class:`str`]
153-
The label for the input text field, if any.
152+
label: :class:`str`
153+
The label for the input text field.
154154
placeholder: Optional[:class:`str`]
155155
The placeholder text that is shown if nothing is selected, if any.
156156
min_length: Optional[:class:`int`]
@@ -182,7 +182,7 @@ def __init__(self, data: InputTextComponentPayload):
182182
self.type = ComponentType.input_text
183183
self.style: InputTextStyle = try_enum(InputTextStyle, data["style"])
184184
self.custom_id = data["custom_id"]
185-
self.label: Optional[str] = data.get("label", None)
185+
self.label: str = data.get("label", None)
186186
self.placeholder: Optional[str] = data.get("placeholder", None)
187187
self.min_length: Optional[int] = data.get("min_length", None)
188188
self.max_length: Optional[int] = data.get("max_length", None)

0 commit comments

Comments
 (0)