Compare commits

..

No commits in common. "4795fac5acf17987afa90e2fc696ed9e73ba3afb" and "56857554e9a242b4064fb403fdf84eade478e331" have entirely different histories.

View file

@ -19,7 +19,7 @@ class Overrides(ui.View):
current_setting = await config.user(self.ctx.author).auto_evidenceformat() current_setting = await config.user(self.ctx.author).auto_evidenceformat()
if current_setting is False: if current_setting is False:
await config.user(self.ctx.author).auto_evidenceformat.clear() await config.user(self.ctx.author).auto_evidenceformat.clear()
elif current_setting is None: if current_setting is None:
await config.user(self.ctx.author).auto_evidenceformat.set(True) await config.user(self.ctx.author).auto_evidenceformat.set(True)
else: else:
await config.user(self.ctx.author).auto_evidenceformat.set(False) await config.user(self.ctx.author).auto_evidenceformat.set(False)
@ -34,7 +34,7 @@ class Overrides(ui.View):
current_setting = await config.user(self.ctx.author).history_ephemeral() current_setting = await config.user(self.ctx.author).history_ephemeral()
if current_setting is False: if current_setting is False:
await config.user(self.ctx.author).history_ephemeral.clear() await config.user(self.ctx.author).history_ephemeral.clear()
elif current_setting is None: if current_setting is None:
await config.user(self.ctx.author).history_ephemeral.set(True) await config.user(self.ctx.author).history_ephemeral.set(True)
else: else:
await config.user(self.ctx.author).history_ephemeral.set(False) await config.user(self.ctx.author).history_ephemeral.set(False)
@ -49,7 +49,7 @@ class Overrides(ui.View):
current_setting = await config.user(self.ctx.author).history_inline() current_setting = await config.user(self.ctx.author).history_inline()
if current_setting is False: if current_setting is False:
await config.user(self.ctx.author).history_inline.clear() await config.user(self.ctx.author).history_inline.clear()
elif current_setting is None: if current_setting is None:
await config.user(self.ctx.author).history_inline.set(True) await config.user(self.ctx.author).history_inline.set(True)
else: else:
await config.user(self.ctx.author).history_inline.set(False) await config.user(self.ctx.author).history_inline.set(False)
@ -61,10 +61,7 @@ class Overrides(ui.View):
await interaction.response.send_message("You cannot change this setting for other users.", ephemeral=True) await interaction.response.send_message("You cannot change this setting for other users.", ephemeral=True)
return return
await interaction.response.defer() await interaction.response.defer()
if select.values[0] == "default": await config.user(self.ctx.author).history_inline_pagesize.set(int(select.values[0]))
await config.user(self.ctx.author).history_inline_pagesize.clear()
else:
await config.user(self.ctx.author).history_inline_pagesize.set(int(select.values[0]))
await interaction.message.edit(embed=await embed(self.ctx)) await interaction.message.edit(embed=await embed(self.ctx))
@ui.select(placeholder="Pagesize", options=create_pagesize_options(), row=2) @ui.select(placeholder="Pagesize", options=create_pagesize_options(), row=2)
@ -73,8 +70,5 @@ class Overrides(ui.View):
await interaction.response.send_message("You cannot change this setting for other users.", ephemeral=True) await interaction.response.send_message("You cannot change this setting for other users.", ephemeral=True)
return return
await interaction.response.defer() await interaction.response.defer()
if select.values[0] == "default": await config.user(self.ctx.author).history_pagesize.set(int(select.values[0]))
await config.user(self.ctx.author).history_pagesize.clear()
else:
await config.user(self.ctx.author).history_pagesize.set(int(select.values[0]))
await interaction.message.edit(embed=await embed(self.ctx)) await interaction.message.edit(embed=await embed(self.ctx))