We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Optional Modal InputText fields with existing values do not accept empty strings
### Summary

Submitted Empty InputText fields revert to stored value

### Reproduction Steps

1. Create a Modal with an `InputText` that is both `required=False` and has a `value`
2. Delete the text in the Modal and submit
3. Inspect the Modal's children in the callback.

### Minimal Reproducible Code

_No response_

### Expected Results

Expected: The incoming field (e.g. `self.children[0].value`) should be empty

### Actual Results

Actual: The field retains its previous/existing `value` instead of being overwritten by the empty string.

### Intents

members

### System Information

Python 3.9
Pycord 2.0.0b4

### Checklist

- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.

### Additional Context

I did verify through logging that the Modal does indeed submit the empty value, but I was unable to find where in the code this was handled.
Optional Modal InputText fields with existing values do not accept empty strings
### Summary

Submitted Empty InputText fields revert to stored value

### Reproduction Steps

1. Create a Modal with an `InputText` that is both `required=False` and has a `value`
2. Delete the text in the Modal and submit
3. Inspect the Modal's children in the callback.

### Minimal Reproducible Code

_No response_

### Expected Results

Expected: The incoming field (e.g. `self.children[0].value`) should be empty

### Actual Results

Actual: The field retains its previous/existing `value` instead of being overwritten by the empty string.

### Intents

members

### System Information

Python 3.9
Pycord 2.0.0b4

### Checklist

- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.

### Additional Context

I did verify through logging that the Modal does indeed submit the empty value, but I was unable to find where in the code this was handled.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `discord/ui/input_text.py`
Content:
```
1 from __future__ import annotations
2 
3 import os
4 from typing import TYPE_CHECKING, Optional
5 
6 from ..components import InputText as InputTextComponent
7 from ..enums import ComponentType, InputTextStyle
8 from ..utils import MISSING
9 
10 __all__ = ("InputText",)
11 
12 if TYPE_CHECKING:
13     from ..types.components import InputText as InputTextComponentPayload
14 
15 
16 class InputText:
17     """Represents a UI text input field.
18 
19     Parameters
20     ----------
21     style: :class:`discord.InputTextStyle`
22         The style of the input text field.
23     custom_id: Optional[:class:`str`]
24         The ID of the input text field that gets received during an interaction.
25     label: :class:`str`
26         The label for the input text field.
27         Must be 45 characters or fewer.
28     placeholder: Optional[:class:`str`]
29         The placeholder text that is shown if nothing is selected, if any.
30         Must be 100 characters or fewer.
31     min_length: Optional[:class:`int`]
32         The minimum number of characters that must be entered.
33         Defaults to 0 and must be less than 4000.
34     max_length: Optional[:class:`int`]
35         The maximum number of characters that can be entered.
36         Must be between 1 and 4000.
37     required: Optional[:class:`bool`]
38         Whether the input text field is required or not. Defaults to `True`.
39     value: Optional[:class:`str`]
40         Pre-fills the input text field with this value.
41         Must be 4000 characters or fewer.
42     row: Optional[:class:`int`]
43         The relative row this input text field belongs to. A modal dialog can only have 5
44         rows. By default, items are arranged automatically into those 5 rows. If you'd
45         like to control the relative positioning of the row then passing an index is advised.
46         For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic
47         ordering. The row number must be between 0 and 4 (i.e. zero indexed).
48     """
49 
50     def __init__(
51         self,
52         *,
53         style: InputTextStyle = InputTextStyle.short,
54         custom_id: str = MISSING,
55         label: str,
56         placeholder: Optional[str] = None,
57         min_length: Optional[int] = None,
58         max_length: Optional[int] = None,
59         required: Optional[bool] = True,
60         value: Optional[str] = None,
61         row: Optional[int] = None,
62     ):
63         super().__init__()
64         custom_id = os.urandom(16).hex() if custom_id is MISSING else custom_id
65         if not (isinstance(custom_id, str) or custom_id is None):
66             raise TypeError(f"expected custom_id to be str, not {custom_id.__class__.__name__}")
67 
68         self._underlying = InputTextComponent._raw_construct(
69             type=ComponentType.input_text,
70             style=style,
71             custom_id=custom_id,
72             label=label,
73             placeholder=placeholder,
74             min_length=min_length,
75             max_length=max_length,
76             required=required,
77             value=value,
78         )
79         self._input_value = None
80         self.row = row
81         self._rendered_row: Optional[int] = None
82 
83     @property
84     def type(self) -> ComponentType:
85         return self._underlying.type
86 
87     @property
88     def style(self) -> InputTextStyle:
89         """:class:`discord.InputTextStyle`: The style of the input text field."""
90         return self._underlying.style
91 
92     @style.setter
93     def style(self, value: InputTextStyle):
94         if not isinstance(value, InputTextStyle):
95             raise TypeError(f"style must be of type InputTextStyle not {value.__class__}")
96         self._underlying.style = value
97 
98     @property
99     def custom_id(self) -> str:
100         """:class:`str`: The ID of the input text field that gets received during an interaction."""
101         return self._underlying.custom_id
102 
103     @custom_id.setter
104     def custom_id(self, value: str):
105         if not isinstance(value, str):
106             raise TypeError(f"custom_id must be None or str not {value.__class__}")
107         self._underlying.custom_id = value
108 
109     @property
110     def label(self) -> str:
111         """:class:`str`: The label of the input text field."""
112         return self._underlying.label
113 
114     @label.setter
115     def label(self, value: str):
116         if not isinstance(value, str):
117             raise TypeError(f"label should be str not {value.__class__}")
118         self._underlying.label = value
119 
120     @property
121     def placeholder(self) -> Optional[str]:
122         """Optional[:class:`str`]: The placeholder text that is shown before anything is entered, if any."""
123         return self._underlying.placeholder
124 
125     @placeholder.setter
126     def placeholder(self, value: Optional[str]):
127         if value and not isinstance(value, str):
128             raise TypeError(f"placeholder must be None or str not {value.__class__}")  # type: ignore
129         self._underlying.placeholder = value
130 
131     @property
132     def min_length(self) -> Optional[int]:
133         """Optional[:class:`int`]: The minimum number of characters that must be entered. Defaults to `0`."""
134         return self._underlying.min_length
135 
136     @min_length.setter
137     def min_length(self, value: Optional[int]):
138         if value and not isinstance(value, int):
139             raise TypeError(f"min_length must be None or int not {value.__class__}")  # type: ignore
140         self._underlying.min_length = value
141 
142     @property
143     def max_length(self) -> Optional[int]:
144         """Optional[:class:`int`]: The maximum number of characters that can be entered."""
145         return self._underlying.max_length
146 
147     @max_length.setter
148     def max_length(self, value: Optional[int]):
149         if value and not isinstance(value, int):
150             raise TypeError(f"min_length must be None or int not {value.__class__}")  # type: ignore
151         self._underlying.max_length = value
152 
153     @property
154     def required(self) -> Optional[bool]:
155         """Optional[:class:`bool`]: Whether the input text field is required or not. Defaults to `True`."""
156         return self._underlying.required
157 
158     @required.setter
159     def required(self, value: Optional[bool]):
160         if not isinstance(value, bool):
161             raise TypeError(f"required must be bool not {value.__class__}")  # type: ignore
162         self._underlying.required = bool(value)
163 
164     @property
165     def value(self) -> Optional[str]:
166         """Optional[:class:`str`]: The value entered in the text field."""
167         return self._input_value or self._underlying.value
168 
169     @value.setter
170     def value(self, value: Optional[str]):
171         if value and not isinstance(value, str):
172             raise TypeError(f"value must be None or str not {value.__class__}")  # type: ignore
173         self._underlying.value = value
174 
175     @property
176     def width(self) -> int:
177         return 5
178 
179     def to_component_dict(self) -> InputTextComponentPayload:
180         return self._underlying.to_dict()
181 
182     def refresh_state(self, data) -> None:
183         self._input_value = data["value"]
184
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/discord/ui/input_text.py b/discord/ui/input_text.py
--- a/discord/ui/input_text.py
+++ b/discord/ui/input_text.py
@@ -76,7 +76,7 @@
             required=required,
             value=value,
         )
-        self._input_value = None
+        self._input_value = False
         self.row = row
         self._rendered_row: Optional[int] = None
 
@@ -164,7 +164,10 @@
     @property
     def value(self) -> Optional[str]:
         """Optional[:class:`str`]: The value entered in the text field."""
-        return self._input_value or self._underlying.value
+        if self._input_value is not False:
+            # only False on init, otherwise the value was either set or cleared
+            return self._input_value  # type: ignore
+        return self._underlying.value
 
     @value.setter
     def value(self, value: Optional[str]):

{"golden_diff": "diff --git a/discord/ui/input_text.py b/discord/ui/input_text.py\n--- a/discord/ui/input_text.py\n+++ b/discord/ui/input_text.py\n@@ -76,7 +76,7 @@\n             required=required,\n             value=value,\n         )\n-        self._input_value = None\n+        self._input_value = False\n         self.row = row\n         self._rendered_row: Optional[int] = None\n \n@@ -164,7 +164,10 @@\n     @property\n     def value(self) -> Optional[str]:\n         \"\"\"Optional[:class:`str`]: The value entered in the text field.\"\"\"\n-        return self._input_value or self._underlying.value\n+        if self._input_value is not False:\n+            # only False on init, otherwise the value was either set or cleared\n+            return self._input_value  # type: ignore\n+        return self._underlying.value\n \n     @value.setter\n     def value(self, value: Optional[str]):\n", "issue": "Optional Modal InputText fields with existing values do not accept empty strings\n### Summary\n\nSubmitted Empty InputText fields revert to stored value\n\n### Reproduction Steps\n\n1. Create a Modal with an `InputText` that is both `required=False` and has a `value`\r\n2. Delete the text in the Modal and submit\r\n3. Inspect the Modal's children in the callback.\n\n### Minimal Reproducible Code\n\n_No response_\n\n### Expected Results\n\nExpected: The incoming field (e.g. `self.children[0].value`) should be empty\n\n### Actual Results\n\nActual: The field retains its previous/existing `value` instead of being overwritten by the empty string.\n\n### Intents\n\nmembers\n\n### System Information\n\nPython 3.9\r\nPycord 2.0.0b4\n\n### Checklist\n\n- [X] I have searched the open issues for duplicates.\n- [X] I have shown the entire traceback, if possible.\n- [X] I have removed my token from display, if visible.\n\n### Additional Context\n\nI did verify through logging that the Modal does indeed submit the empty value, but I was unable to find where in the code this was handled.\nOptional Modal InputText fields with existing values do not accept empty strings\n### Summary\n\nSubmitted Empty InputText fields revert to stored value\n\n### Reproduction Steps\n\n1. Create a Modal with an `InputText` that is both `required=False` and has a `value`\r\n2. Delete the text in the Modal and submit\r\n3. Inspect the Modal's children in the callback.\n\n### Minimal Reproducible Code\n\n_No response_\n\n### Expected Results\n\nExpected: The incoming field (e.g. `self.children[0].value`) should be empty\n\n### Actual Results\n\nActual: The field retains its previous/existing `value` instead of being overwritten by the empty string.\n\n### Intents\n\nmembers\n\n### System Information\n\nPython 3.9\r\nPycord 2.0.0b4\n\n### Checklist\n\n- [X] I have searched the open issues for duplicates.\n- [X] I have shown the entire traceback, if possible.\n- [X] I have removed my token from display, if visible.\n\n### Additional Context\n\nI did verify through logging that the Modal does indeed submit the empty value, but I was unable to find where in the code this was handled.\n", "before_files": [{"content": "from __future__ import annotations\n\nimport os\nfrom typing import TYPE_CHECKING, Optional\n\nfrom ..components import InputText as InputTextComponent\nfrom ..enums import ComponentType, InputTextStyle\nfrom ..utils import MISSING\n\n__all__ = (\"InputText\",)\n\nif TYPE_CHECKING:\n    from ..types.components import InputText as InputTextComponentPayload\n\n\nclass InputText:\n    \"\"\"Represents a UI text input field.\n\n    Parameters\n    ----------\n    style: :class:`discord.InputTextStyle`\n        The style of the input text field.\n    custom_id: Optional[:class:`str`]\n        The ID of the input text field that gets received during an interaction.\n    label: :class:`str`\n        The label for the input text field.\n        Must be 45 characters or fewer.\n    placeholder: Optional[:class:`str`]\n        The placeholder text that is shown if nothing is selected, if any.\n        Must be 100 characters or fewer.\n    min_length: Optional[:class:`int`]\n        The minimum number of characters that must be entered.\n        Defaults to 0 and must be less than 4000.\n    max_length: Optional[:class:`int`]\n        The maximum number of characters that can be entered.\n        Must be between 1 and 4000.\n    required: Optional[:class:`bool`]\n        Whether the input text field is required or not. Defaults to `True`.\n    value: Optional[:class:`str`]\n        Pre-fills the input text field with this value.\n        Must be 4000 characters or fewer.\n    row: Optional[:class:`int`]\n        The relative row this input text field belongs to. A modal dialog can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n    \"\"\"\n\n    def __init__(\n        self,\n        *,\n        style: InputTextStyle = InputTextStyle.short,\n        custom_id: str = MISSING,\n        label: str,\n        placeholder: Optional[str] = None,\n        min_length: Optional[int] = None,\n        max_length: Optional[int] = None,\n        required: Optional[bool] = True,\n        value: Optional[str] = None,\n        row: Optional[int] = None,\n    ):\n        super().__init__()\n        custom_id = os.urandom(16).hex() if custom_id is MISSING else custom_id\n        if not (isinstance(custom_id, str) or custom_id is None):\n            raise TypeError(f\"expected custom_id to be str, not {custom_id.__class__.__name__}\")\n\n        self._underlying = InputTextComponent._raw_construct(\n            type=ComponentType.input_text,\n            style=style,\n            custom_id=custom_id,\n            label=label,\n            placeholder=placeholder,\n            min_length=min_length,\n            max_length=max_length,\n            required=required,\n            value=value,\n        )\n        self._input_value = None\n        self.row = row\n        self._rendered_row: Optional[int] = None\n\n    @property\n    def type(self) -> ComponentType:\n        return self._underlying.type\n\n    @property\n    def style(self) -> InputTextStyle:\n        \"\"\":class:`discord.InputTextStyle`: The style of the input text field.\"\"\"\n        return self._underlying.style\n\n    @style.setter\n    def style(self, value: InputTextStyle):\n        if not isinstance(value, InputTextStyle):\n            raise TypeError(f\"style must be of type InputTextStyle not {value.__class__}\")\n        self._underlying.style = value\n\n    @property\n    def custom_id(self) -> str:\n        \"\"\":class:`str`: The ID of the input text field that gets received during an interaction.\"\"\"\n        return self._underlying.custom_id\n\n    @custom_id.setter\n    def custom_id(self, value: str):\n        if not isinstance(value, str):\n            raise TypeError(f\"custom_id must be None or str not {value.__class__}\")\n        self._underlying.custom_id = value\n\n    @property\n    def label(self) -> str:\n        \"\"\":class:`str`: The label of the input text field.\"\"\"\n        return self._underlying.label\n\n    @label.setter\n    def label(self, value: str):\n        if not isinstance(value, str):\n            raise TypeError(f\"label should be str not {value.__class__}\")\n        self._underlying.label = value\n\n    @property\n    def placeholder(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The placeholder text that is shown before anything is entered, if any.\"\"\"\n        return self._underlying.placeholder\n\n    @placeholder.setter\n    def placeholder(self, value: Optional[str]):\n        if value and not isinstance(value, str):\n            raise TypeError(f\"placeholder must be None or str not {value.__class__}\")  # type: ignore\n        self._underlying.placeholder = value\n\n    @property\n    def min_length(self) -> Optional[int]:\n        \"\"\"Optional[:class:`int`]: The minimum number of characters that must be entered. Defaults to `0`.\"\"\"\n        return self._underlying.min_length\n\n    @min_length.setter\n    def min_length(self, value: Optional[int]):\n        if value and not isinstance(value, int):\n            raise TypeError(f\"min_length must be None or int not {value.__class__}\")  # type: ignore\n        self._underlying.min_length = value\n\n    @property\n    def max_length(self) -> Optional[int]:\n        \"\"\"Optional[:class:`int`]: The maximum number of characters that can be entered.\"\"\"\n        return self._underlying.max_length\n\n    @max_length.setter\n    def max_length(self, value: Optional[int]):\n        if value and not isinstance(value, int):\n            raise TypeError(f\"min_length must be None or int not {value.__class__}\")  # type: ignore\n        self._underlying.max_length = value\n\n    @property\n    def required(self) -> Optional[bool]:\n        \"\"\"Optional[:class:`bool`]: Whether the input text field is required or not. Defaults to `True`.\"\"\"\n        return self._underlying.required\n\n    @required.setter\n    def required(self, value: Optional[bool]):\n        if not isinstance(value, bool):\n            raise TypeError(f\"required must be bool not {value.__class__}\")  # type: ignore\n        self._underlying.required = bool(value)\n\n    @property\n    def value(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The value entered in the text field.\"\"\"\n        return self._input_value or self._underlying.value\n\n    @value.setter\n    def value(self, value: Optional[str]):\n        if value and not isinstance(value, str):\n            raise TypeError(f\"value must be None or str not {value.__class__}\")  # type: ignore\n        self._underlying.value = value\n\n    @property\n    def width(self) -> int:\n        return 5\n\n    def to_component_dict(self) -> InputTextComponentPayload:\n        return self._underlying.to_dict()\n\n    def refresh_state(self, data) -> None:\n        self._input_value = data[\"value\"]\n", "path": "discord/ui/input_text.py"}], "after_files": [{"content": "from __future__ import annotations\n\nimport os\nfrom typing import TYPE_CHECKING, Optional\n\nfrom ..components import InputText as InputTextComponent\nfrom ..enums import ComponentType, InputTextStyle\nfrom ..utils import MISSING\n\n__all__ = (\"InputText\",)\n\nif TYPE_CHECKING:\n    from ..types.components import InputText as InputTextComponentPayload\n\n\nclass InputText:\n    \"\"\"Represents a UI text input field.\n\n    Parameters\n    ----------\n    style: :class:`discord.InputTextStyle`\n        The style of the input text field.\n    custom_id: Optional[:class:`str`]\n        The ID of the input text field that gets received during an interaction.\n    label: :class:`str`\n        The label for the input text field.\n        Must be 45 characters or fewer.\n    placeholder: Optional[:class:`str`]\n        The placeholder text that is shown if nothing is selected, if any.\n        Must be 100 characters or fewer.\n    min_length: Optional[:class:`int`]\n        The minimum number of characters that must be entered.\n        Defaults to 0 and must be less than 4000.\n    max_length: Optional[:class:`int`]\n        The maximum number of characters that can be entered.\n        Must be between 1 and 4000.\n    required: Optional[:class:`bool`]\n        Whether the input text field is required or not. Defaults to `True`.\n    value: Optional[:class:`str`]\n        Pre-fills the input text field with this value.\n        Must be 4000 characters or fewer.\n    row: Optional[:class:`int`]\n        The relative row this input text field belongs to. A modal dialog can only have 5\n        rows. By default, items are arranged automatically into those 5 rows. If you'd\n        like to control the relative positioning of the row then passing an index is advised.\n        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic\n        ordering. The row number must be between 0 and 4 (i.e. zero indexed).\n    \"\"\"\n\n    def __init__(\n        self,\n        *,\n        style: InputTextStyle = InputTextStyle.short,\n        custom_id: str = MISSING,\n        label: str,\n        placeholder: Optional[str] = None,\n        min_length: Optional[int] = None,\n        max_length: Optional[int] = None,\n        required: Optional[bool] = True,\n        value: Optional[str] = None,\n        row: Optional[int] = None,\n    ):\n        super().__init__()\n        custom_id = os.urandom(16).hex() if custom_id is MISSING else custom_id\n        if not (isinstance(custom_id, str) or custom_id is None):\n            raise TypeError(f\"expected custom_id to be str, not {custom_id.__class__.__name__}\")\n\n        self._underlying = InputTextComponent._raw_construct(\n            type=ComponentType.input_text,\n            style=style,\n            custom_id=custom_id,\n            label=label,\n            placeholder=placeholder,\n            min_length=min_length,\n            max_length=max_length,\n            required=required,\n            value=value,\n        )\n        self._input_value = False\n        self.row = row\n        self._rendered_row: Optional[int] = None\n\n    @property\n    def type(self) -> ComponentType:\n        return self._underlying.type\n\n    @property\n    def style(self) -> InputTextStyle:\n        \"\"\":class:`discord.InputTextStyle`: The style of the input text field.\"\"\"\n        return self._underlying.style\n\n    @style.setter\n    def style(self, value: InputTextStyle):\n        if not isinstance(value, InputTextStyle):\n            raise TypeError(f\"style must be of type InputTextStyle not {value.__class__}\")\n        self._underlying.style = value\n\n    @property\n    def custom_id(self) -> str:\n        \"\"\":class:`str`: The ID of the input text field that gets received during an interaction.\"\"\"\n        return self._underlying.custom_id\n\n    @custom_id.setter\n    def custom_id(self, value: str):\n        if not isinstance(value, str):\n            raise TypeError(f\"custom_id must be None or str not {value.__class__}\")\n        self._underlying.custom_id = value\n\n    @property\n    def label(self) -> str:\n        \"\"\":class:`str`: The label of the input text field.\"\"\"\n        return self._underlying.label\n\n    @label.setter\n    def label(self, value: str):\n        if not isinstance(value, str):\n            raise TypeError(f\"label should be str not {value.__class__}\")\n        self._underlying.label = value\n\n    @property\n    def placeholder(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The placeholder text that is shown before anything is entered, if any.\"\"\"\n        return self._underlying.placeholder\n\n    @placeholder.setter\n    def placeholder(self, value: Optional[str]):\n        if value and not isinstance(value, str):\n            raise TypeError(f\"placeholder must be None or str not {value.__class__}\")  # type: ignore\n        self._underlying.placeholder = value\n\n    @property\n    def min_length(self) -> Optional[int]:\n        \"\"\"Optional[:class:`int`]: The minimum number of characters that must be entered. Defaults to `0`.\"\"\"\n        return self._underlying.min_length\n\n    @min_length.setter\n    def min_length(self, value: Optional[int]):\n        if value and not isinstance(value, int):\n            raise TypeError(f\"min_length must be None or int not {value.__class__}\")  # type: ignore\n        self._underlying.min_length = value\n\n    @property\n    def max_length(self) -> Optional[int]:\n        \"\"\"Optional[:class:`int`]: The maximum number of characters that can be entered.\"\"\"\n        return self._underlying.max_length\n\n    @max_length.setter\n    def max_length(self, value: Optional[int]):\n        if value and not isinstance(value, int):\n            raise TypeError(f\"min_length must be None or int not {value.__class__}\")  # type: ignore\n        self._underlying.max_length = value\n\n    @property\n    def required(self) -> Optional[bool]:\n        \"\"\"Optional[:class:`bool`]: Whether the input text field is required or not. Defaults to `True`.\"\"\"\n        return self._underlying.required\n\n    @required.setter\n    def required(self, value: Optional[bool]):\n        if not isinstance(value, bool):\n            raise TypeError(f\"required must be bool not {value.__class__}\")  # type: ignore\n        self._underlying.required = bool(value)\n\n    @property\n    def value(self) -> Optional[str]:\n        \"\"\"Optional[:class:`str`]: The value entered in the text field.\"\"\"\n        if self._input_value is not False:\n            # only False on init, otherwise the value was either set or cleared\n            return self._input_value  # type: ignore\n        return self._underlying.value\n\n    @value.setter\n    def value(self, value: Optional[str]):\n        if value and not isinstance(value, str):\n            raise TypeError(f\"value must be None or str not {value.__class__}\")  # type: ignore\n        self._underlying.value = value\n\n    @property\n    def width(self) -> int:\n        return 5\n\n    def to_component_dict(self) -> InputTextComponentPayload:\n        return self._underlying.to_dict()\n\n    def refresh_state(self, data) -> None:\n        self._input_value = data[\"value\"]\n", "path": "discord/ui/input_text.py"}]}