Browse Source

Always use last value as a fallback for Select.values

pull/8338/head
Rapptz 3 years ago
parent
commit
ff1dd586d3
  1. 4
      discord/ui/select.py

4
discord/ui/select.py

@ -263,8 +263,8 @@ class Select(Item[V]):
@property
def values(self) -> List[str]:
"""List[:class:`str`]: A list of values that have been selected by the user."""
values = selected_values.get(None)
return self._values if values is None else values.get(self.custom_id, [])
values = selected_values.get({})
return values.get(self.custom_id, self._values)
@property
def width(self) -> int:

Loading…
Cancel
Save