mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-07 17:39:03 +00:00
Fix settings example not resetting option default state
This commit is contained in:
1 parent
2a69ac4ca8
commit
5887ce1430
1 file changed
+1
-2
@@ -67,8 +67,7 @@ class FruitsSetting(ui.ActionRow['SettingsView']):
|
||||
|
||||
def update_options(self):
|
||||
for option in self.select_fruit.options:
|
||||
if option.value == self.settings.fruit_type.name:
|
||||
option.default = True
|
||||
option.default = option.value == self.settings.fruit_type.name
|
||||
|
||||
@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:
|
||||
|
||||
Reference in new issue
Block a user