mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-15 02:09:49 +00:00
Fix TextInput's is_persistent() flow
This commit is contained in:
parent
a9bd698683
commit
6b6cbc44ce
discord/ui
@ -162,10 +162,10 @@ class BaseSelect(Item[V]):
|
||||
@custom_id.setter
|
||||
def custom_id(self, value: str) -> None:
|
||||
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._provided_custom_id = value is not None
|
||||
self._provided_custom_id = True
|
||||
|
||||
@property
|
||||
def placeholder(self) -> Optional[str]:
|
||||
|
@ -137,10 +137,11 @@ class TextInput(Item[V]):
|
||||
@custom_id.setter
|
||||
def custom_id(self, value: str) -> None:
|
||||
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._provided_custom_id = True
|
||||
|
||||
@property
|
||||
def width(self) -> int:
|
||||
return 5
|
||||
|
Loading…
x
Reference in New Issue
Block a user