misc(aurora): moved log_channel to the bottom of the guild view
This commit is contained in:
parent
78a5103b1f
commit
fc86db94da
1 changed files with 11 additions and 11 deletions
|
@ -90,16 +90,7 @@ class Guild(ui.View):
|
||||||
await config.guild(interaction.guild).history_inline.set(not current_setting)
|
await config.guild(interaction.guild).history_inline.set(not current_setting)
|
||||||
await interaction.message.edit(embed=await guild(self.ctx))
|
await interaction.message.edit(embed=await guild(self.ctx))
|
||||||
|
|
||||||
@ui.select(placeholder="Log Channel", cls=ui.ChannelSelect, row=2)
|
@ui.select(placeholder="History Pagesize", options=create_pagesize_options(), 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)
|
|
||||||
async def pagesize(self, interaction: Interaction, select: ui.Select,):
|
async def pagesize(self, interaction: Interaction, select: ui.Select,):
|
||||||
if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator:
|
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)
|
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.response.defer()
|
||||||
await interaction.message.edit(embed=await guild(self.ctx))
|
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,):
|
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:
|
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)
|
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 config.guild(interaction.guild).history_inline_pagesize.set(int(select.values[0]))
|
||||||
await interaction.response.defer()
|
await interaction.response.defer()
|
||||||
await interaction.message.edit(embed=await guild(self.ctx))
|
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))
|
||||||
|
|
Loading…
Reference in a new issue