From 37d55c8ec46d686a0c393d3d86f1345e28bbfe6e Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 5 Mar 2022 21:03:45 -0500 Subject: [PATCH] Add TextInput.__str__ special method Closes #7504 --- discord/ui/text_input.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/discord/ui/text_input.py b/discord/ui/text_input.py index 63e5c395d..e38ce5795 100644 --- a/discord/ui/text_input.py +++ b/discord/ui/text_input.py @@ -117,6 +117,9 @@ class TextInput(Item[V]): ) self.row: Optional[int] = row + def __str__(self) -> str: + return self.value or '' + @property def custom_id(self) -> str: """:class:`str`: The ID of the select menu that gets received during an interaction."""