mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-20 20:48:13 +00:00
Fix TextInput's is_persistent() flow
This commit is contained in:
parent
a9bd698683
commit
6b6cbc44ce
@ -162,10 +162,10 @@ class BaseSelect(Item[V]):
|
|||||||
@custom_id.setter
|
@custom_id.setter
|
||||||
def custom_id(self, value: str) -> None:
|
def custom_id(self, value: str) -> None:
|
||||||
if not isinstance(value, str):
|
if not isinstance(value, str):
|
||||||
raise TypeError('custom_id must be None or str')
|
raise TypeError('custom_id must be a str')
|
||||||
|
|
||||||
self._underlying.custom_id = value
|
self._underlying.custom_id = value
|
||||||
self._provided_custom_id = value is not None
|
self._provided_custom_id = True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def placeholder(self) -> Optional[str]:
|
def placeholder(self) -> Optional[str]:
|
||||||
|
@ -137,9 +137,10 @@ class TextInput(Item[V]):
|
|||||||
@custom_id.setter
|
@custom_id.setter
|
||||||
def custom_id(self, value: str) -> None:
|
def custom_id(self, value: str) -> None:
|
||||||
if not isinstance(value, str):
|
if not isinstance(value, str):
|
||||||
raise TypeError('custom_id must be None or str')
|
raise TypeError('custom_id must be a str')
|
||||||
|
|
||||||
self._underlying.custom_id = value
|
self._underlying.custom_id = value
|
||||||
|
self._provided_custom_id = True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def width(self) -> int:
|
def width(self) -> int:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user