Skip to content

Commit

Permalink
additional fix for InputText.label being required
Browse files Browse the repository at this point in the history
  • Loading branch information
krittick committed Feb 27, 2022
1 parent 7a1e889 commit 6587861
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions discord/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ class InputText(Component):
The style of the input text field.
custom_id: Optional[:class:`str`]
The ID of the input text field that gets received during an interaction.
label: Optional[:class:`str`]
The label for the input text field, if any.
label: :class:`str`
The label for the input text field.
placeholder: Optional[:class:`str`]
The placeholder text that is shown if nothing is selected, if any.
min_length: Optional[:class:`int`]
Expand Down Expand Up @@ -182,7 +182,7 @@ def __init__(self, data: InputTextComponentPayload):
self.type = ComponentType.input_text
self.style: InputTextStyle = try_enum(InputTextStyle, data["style"])
self.custom_id = data["custom_id"]
self.label: Optional[str] = data.get("label", None)
self.label: str = data.get("label", None)
self.placeholder: Optional[str] = data.get("placeholder", None)
self.min_length: Optional[int] = data.get("min_length", None)
self.max_length: Optional[int] = data.get("max_length", None)
Expand Down

0 comments on commit 6587861

Please sign in to comment.