1
0
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:
yvqc 2023-06-04 13:50:56 +02:00 committed by GitHub
parent a9bd698683
commit 6b6cbc44ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

@ -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