misc(aurora): moved log_channel to the bottom of the guild view

This commit is contained in:
Seaswimmer 2024-01-16 14:06:50 +00:00
parent 78a5103b1f
commit fc86db94da
Signed by untrusted user: cswimr
GPG key ID: D74DDDDF420E13DF

View file

@ -90,16 +90,7 @@ class Guild(ui.View):
await config.guild(interaction.guild).history_inline.set(not current_setting)
await interaction.message.edit(embed=await guild(self.ctx))
@ui.select(placeholder="Log Channel", cls=ui.ChannelSelect, row=2)
async def log_channel(self, interaction: Interaction, select: ui.ChannelSelect):
if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator:
await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True)
return
await interaction.response.defer()
await config.guild(interaction.guild).log_channel.set(select.values[0].id)
await interaction.message.edit(embed=await guild(self.ctx))
@ui.select(placeholder="History Pagesize", options=create_pagesize_options(), row=3)
@ui.select(placeholder="History Pagesize", options=create_pagesize_options(), row=2)
async def pagesize(self, interaction: Interaction, select: ui.Select,):
if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator:
await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True)
@ -111,7 +102,7 @@ class Guild(ui.View):
await interaction.response.defer()
await interaction.message.edit(embed=await guild(self.ctx))
@ui.select(placeholder="History Inline Pagesize", options=create_pagesize_options(), row=4)
@ui.select(placeholder="History Inline Pagesize", options=create_pagesize_options(), row=3)
async def inline_pagesize(self, interaction: Interaction, select: ui.Select,):
if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator:
await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True)
@ -122,3 +113,12 @@ class Guild(ui.View):
await config.guild(interaction.guild).history_inline_pagesize.set(int(select.values[0]))
await interaction.response.defer()
await interaction.message.edit(embed=await guild(self.ctx))
@ui.select(placeholder="Log Channel", cls=ui.ChannelSelect, row=4)
async def log_channel(self, interaction: Interaction, select: ui.ChannelSelect):
if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator:
await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True)
return
await interaction.response.defer()
await config.guild(interaction.guild).log_channel.set(select.values[0].id)
await interaction.message.edit(embed=await guild(self.ctx))