From f09f84274de172aaf1db15a294eb179846c77c44 Mon Sep 17 00:00:00 2001 From: mbaruh Date: Sat, 1 Oct 2022 00:25:28 +0300 Subject: 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. --- bot/exts/filtering/_ui.py | 3 +-- 1 file changed, 1 insertion(+), 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) -- cgit v1.2.3