From cdce8fae5b161b26112827dc5894dfd8daaddca4 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 17 Aug 2022 02:26:17 -0400 Subject: [PATCH] Change ui.TextInput.value to not be Optional --- discord/ui/text_input.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/discord/ui/text_input.py b/discord/ui/text_input.py index ec42546a8..5748a5ebb 100644 --- a/discord/ui/text_input.py +++ b/discord/ui/text_input.py @@ -126,7 +126,7 @@ class TextInput(Item[V]): self.row = row def __str__(self) -> str: - return self.value or '' + return self.value @property def custom_id(self) -> str: @@ -145,9 +145,9 @@ class TextInput(Item[V]): return 5 @property - def value(self) -> Optional[str]: - """Optional[:class:`str`]: The value of the text input.""" - return self._value + def value(self) -> str: + """:class:`str`: The value of the text input.""" + return self._value or '' @property def label(self) -> str: