forked from blizzthewolf/SeaCogs
fix(aurora): fixed setting overrides not working
This commit is contained in:
parent
a43f3de8bc
commit
219b18e34b
1 changed files with 9 additions and 9 deletions
|
@ -10,8 +10,8 @@ class Overrides(ui.View):
|
||||||
self.ctx = ctx
|
self.ctx = ctx
|
||||||
|
|
||||||
@ui.select(cls=ui.Select, placeholder="Auto Evidence Format", row=0, options=[
|
@ui.select(cls=ui.Select, placeholder="Auto Evidence Format", row=0, options=[
|
||||||
SelectOption(label="Enabled", value=True, emoji="✅"),
|
SelectOption(label="Enabled", value=1, emoji="✅"),
|
||||||
SelectOption(label="Disabled", value=False, emoji="❌"),
|
SelectOption(label="Disabled", value=0, emoji="❌"),
|
||||||
SelectOption(label="Default", value='None', emoji="🔁")
|
SelectOption(label="Default", value='None', emoji="🔁")
|
||||||
])
|
])
|
||||||
async def auto_evidenceformat(self, interaction: Interaction, select: ui.Select): # pylint: disable=unused-argument
|
async def auto_evidenceformat(self, interaction: Interaction, select: ui.Select): # pylint: disable=unused-argument
|
||||||
|
@ -22,12 +22,12 @@ class Overrides(ui.View):
|
||||||
if select.values[0] == 'None':
|
if select.values[0] == 'None':
|
||||||
await config.user(self.ctx.author).auto_evidenceformat.clear()
|
await config.user(self.ctx.author).auto_evidenceformat.clear()
|
||||||
else:
|
else:
|
||||||
await config.user(self.ctx.author).auto_evidenceformat.set(select.values[0])
|
await config.user(self.ctx.author).auto_evidenceformat.set(bool(select.values[0]))
|
||||||
await interaction.message.edit(embed=await embed(self.ctx))
|
await interaction.message.edit(embed=await embed(self.ctx))
|
||||||
|
|
||||||
@ui.select(cls=ui.Select, placeholder="Epheremal", row=1, options=[
|
@ui.select(cls=ui.Select, placeholder="Epheremal", row=1, options=[
|
||||||
SelectOption(label="Enabled", value=True, emoji="✅"),
|
SelectOption(label="Enabled", value=1, emoji="✅"),
|
||||||
SelectOption(label="Disabled", value=False, emoji="❌"),
|
SelectOption(label="Disabled", value=0, emoji="❌"),
|
||||||
SelectOption(label="Default", value='None', emoji="🔁")
|
SelectOption(label="Default", value='None', emoji="🔁")
|
||||||
])
|
])
|
||||||
async def ephemeral(self, interaction: Interaction, select: ui.Select): # pylint: disable=unused-argument
|
async def ephemeral(self, interaction: Interaction, select: ui.Select): # pylint: disable=unused-argument
|
||||||
|
@ -38,12 +38,12 @@ class Overrides(ui.View):
|
||||||
if select.values[0] == 'None':
|
if select.values[0] == 'None':
|
||||||
await config.user(self.ctx.author).history_ephemeral.clear()
|
await config.user(self.ctx.author).history_ephemeral.clear()
|
||||||
else:
|
else:
|
||||||
await config.user(self.ctx.author).history_ephemeral.set(select.values[0])
|
await config.user(self.ctx.author).history_ephemeral.set(bool(select.values[0]))
|
||||||
await interaction.message.edit(embed=await embed(self.ctx))
|
await interaction.message.edit(embed=await embed(self.ctx))
|
||||||
|
|
||||||
@ui.select(cls=ui.Select, placeholder="Inline", row=2, options=[
|
@ui.select(cls=ui.Select, placeholder="Inline", row=2, options=[
|
||||||
SelectOption(label="Enabled", value=True, emoji="✅"),
|
SelectOption(label="Enabled", value=1, emoji="✅"),
|
||||||
SelectOption(label="Disabled", value=False, emoji="❌"),
|
SelectOption(label="Disabled", value=0, emoji="❌"),
|
||||||
SelectOption(label="Default", value='None', emoji="🔁")
|
SelectOption(label="Default", value='None', emoji="🔁")
|
||||||
])
|
])
|
||||||
async def inline(self, interaction: Interaction, select: ui.Select): # pylint: disable=unused-argument
|
async def inline(self, interaction: Interaction, select: ui.Select): # pylint: disable=unused-argument
|
||||||
|
@ -54,5 +54,5 @@ class Overrides(ui.View):
|
||||||
if select.values[0] == 'None':
|
if select.values[0] == 'None':
|
||||||
await config.user(self.ctx.author).history_inline.clear()
|
await config.user(self.ctx.author).history_inline.clear()
|
||||||
else:
|
else:
|
||||||
await config.user(self.ctx.author).history_inline.set(select.values[0])
|
await config.user(self.ctx.author).history_inline.set(bool(select.values[0]))
|
||||||
await interaction.message.edit(embed=await embed(self.ctx))
|
await interaction.message.edit(embed=await embed(self.ctx))
|
||||||
|
|
Loading…
Reference in a new issue