mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-08-23 11:46:18 +00:00
Fix settings example not resetting option default state
This commit is contained in:
parent
2a69ac4ca8
commit
5887ce1430
@ -67,8 +67,7 @@ class FruitsSetting(ui.ActionRow['SettingsView']):
|
|||||||
|
|
||||||
def update_options(self):
|
def update_options(self):
|
||||||
for option in self.select_fruit.options:
|
for option in self.select_fruit.options:
|
||||||
if option.value == self.settings.fruit_type.name:
|
option.default = option.value == self.settings.fruit_type.name
|
||||||
option.default = True
|
|
||||||
|
|
||||||
@ui.select(placeholder='Select a fruit', options=[fruit.as_option() for fruit in FruitType])
|
@ui.select(placeholder='Select a fruit', options=[fruit.as_option() for fruit in FruitType])
|
||||||
async def select_fruit(self, interaction: discord.Interaction[Bot], select: discord.ui.Select) -> None:
|
async def select_fruit(self, interaction: discord.Interaction[Bot], select: discord.ui.Select) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user