aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mbaruh <[email protected]>2022-10-01 00:25:28 +0300
committerGravatar mbaruh <[email protected]>2022-10-01 00:25:28 +0300
commitf09f84274de172aaf1db15a294eb179846c77c44 (patch)
tree5961323ecc7c5f360d512f1efaf30182ea01c61a
parentUse try-except instead of is_digit in bypass_roles (diff)
Keep sequences as lists in editing UI
Sequences such as sets are not serializable, and it's going to be converted to the right type when loaded to the cog anyway.
-rw-r--r--bot/exts/filtering/_ui.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/filtering/_ui.py b/bot/exts/filtering/_ui.py
index d40d4d41e..2d0e7d891 100644
--- a/bot/exts/filtering/_ui.py
+++ b/bot/exts/filtering/_ui.py
@@ -337,10 +337,9 @@ class SequenceEditView(discord.ui.View):
@discord.ui.button(label="✅ Confirm", style=discord.ButtonStyle.green)
async def confirm(self, interaction: Interaction, button: discord.ui.Button) -> None:
"""Send the final value to the embed editor."""
- final_value = self.type_(self.stored_value)
# Edit first, it might time out otherwise.
await interaction.response.edit_message(content="✅ Edit confirmed", view=None)
- await self.update_callback(setting_name=self.setting_name, setting_value=final_value)
+ await self.update_callback(setting_name=self.setting_name, setting_value=self.stored_value)
self.stop()
@discord.ui.button(label="🚫 Cancel", style=discord.ButtonStyle.red)