forked from blizzthewolf/SeaCogs
fix(aurora): changed up the guild embed a bit
This commit is contained in:
parent
3d4b6800a5
commit
78a5103b1f
2 changed files with 18 additions and 18 deletions
|
@ -71,12 +71,12 @@ async def guild(ctx: commands.Context) -> Embed:
|
||||||
'- '+ bold("Ignore Modlog: ") + get_bool_emoji(guild_settings['ignore_modlog']),
|
'- '+ bold("Ignore Modlog: ") + get_bool_emoji(guild_settings['ignore_modlog']),
|
||||||
'- '+ bold("Ignore Other Bots: ") + get_bool_emoji(guild_settings['ignore_other_bots']),
|
'- '+ bold("Ignore Other Bots: ") + get_bool_emoji(guild_settings['ignore_other_bots']),
|
||||||
'- '+ bold("DM Users: ") + get_bool_emoji(guild_settings['dm_users']),
|
'- '+ bold("DM Users: ") + get_bool_emoji(guild_settings['dm_users']),
|
||||||
'- '+ bold("Log Channel: ") + channel,
|
|
||||||
'- '+ bold("Auto Evidence Format: ") + get_bool_emoji(guild_settings['auto_evidenceformat']),
|
'- '+ bold("Auto Evidence Format: ") + get_bool_emoji(guild_settings['auto_evidenceformat']),
|
||||||
'- '+ bold("Ephemeral: ") + get_bool_emoji(guild_settings['history_ephemeral']),
|
'- '+ bold("Ephemeral: ") + get_bool_emoji(guild_settings['history_ephemeral']),
|
||||||
'- '+ bold("History Inline: ") + get_bool_emoji(guild_settings['history_inline']),
|
'- '+ bold("History Inline: ") + get_bool_emoji(guild_settings['history_inline']),
|
||||||
'- '+ bold("History Pagesize: ") + get_pagesize_str(guild_settings['history_pagesize']),
|
'- '+ bold("History Pagesize: ") + get_pagesize_str(guild_settings['history_pagesize']),
|
||||||
'- '+ bold("History Inline Pagesize: ") + get_pagesize_str(guild_settings['history_inline_pagesize'])
|
'- '+ bold("History Inline Pagesize: ") + get_pagesize_str(guild_settings['history_inline_pagesize']),
|
||||||
|
'- '+ bold("Log Channel: ") + channel
|
||||||
]
|
]
|
||||||
guild_str = '\n'.join(guild_str)
|
guild_str = '\n'.join(guild_str)
|
||||||
|
|
||||||
|
|
|
@ -11,13 +11,13 @@ class Guild(ui.View):
|
||||||
self.ctx = ctx
|
self.ctx = ctx
|
||||||
|
|
||||||
@ui.button(label="Show Moderator", style=ButtonStyle.green, row=0)
|
@ui.button(label="Show Moderator", style=ButtonStyle.green, row=0)
|
||||||
async def show_modeartor(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
|
async def show_moderator(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
|
||||||
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)
|
||||||
return
|
return
|
||||||
await interaction.response.defer()
|
await interaction.response.defer()
|
||||||
current_setting = await config.guild(interaction.guild).show_modeartor
|
current_setting = await config.guild(interaction.guild).show_moderator
|
||||||
await config.guild(interaction.guild).show_modeartor.set(not current_setting)
|
await config.guild(interaction.guild).show_moderator.set(not current_setting)
|
||||||
await interaction.message.edit(embed=await guild(self.ctx))
|
await interaction.message.edit(embed=await guild(self.ctx))
|
||||||
|
|
||||||
@ui.button(label="Use Discord Permissions", style=ButtonStyle.green, row=0)
|
@ui.button(label="Use Discord Permissions", style=ButtonStyle.green, row=0)
|
||||||
|
@ -50,7 +50,7 @@ class Guild(ui.View):
|
||||||
await config.guild(interaction.guild).ignore_other_bots.set(not current_setting)
|
await config.guild(interaction.guild).ignore_other_bots.set(not current_setting)
|
||||||
await interaction.message.edit(embed=await guild(self.ctx))
|
await interaction.message.edit(embed=await guild(self.ctx))
|
||||||
|
|
||||||
@ui.button(label="DM Users", style=ButtonStyle.green, row=0)
|
@ui.button(label="DM Users", style=ButtonStyle.green, row=1)
|
||||||
async def dm_users(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
|
async def dm_users(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
|
||||||
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)
|
||||||
|
@ -60,16 +60,7 @@ class Guild(ui.View):
|
||||||
await config.guild(interaction.guild).dm_users.set(not current_setting)
|
await config.guild(interaction.guild).dm_users.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=1)
|
@ui.button(label="Auto Evidence Format", style=ButtonStyle.green, row=1)
|
||||||
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.button(label="Auto Evidence Format", style=ButtonStyle.green, row=2)
|
|
||||||
async def auto_evidenceformat(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
|
async def auto_evidenceformat(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
|
||||||
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)
|
||||||
|
@ -79,7 +70,7 @@ class Guild(ui.View):
|
||||||
await config.guild(interaction.guild).auto_evidenceformat.set(not current_setting)
|
await config.guild(interaction.guild).auto_evidenceformat.set(not current_setting)
|
||||||
await interaction.message.edit(embed=await guild(self.ctx))
|
await interaction.message.edit(embed=await guild(self.ctx))
|
||||||
|
|
||||||
@ui.button(label="Ephemeral", style=ButtonStyle.green, row=2)
|
@ui.button(label="Ephemeral", style=ButtonStyle.green, row=1)
|
||||||
async def ephemeral(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
|
async def ephemeral(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
|
||||||
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)
|
||||||
|
@ -89,7 +80,7 @@ class Guild(ui.View):
|
||||||
await config.guild(interaction.guild).history_ephemeral.set(not current_setting)
|
await config.guild(interaction.guild).history_ephemeral.set(not current_setting)
|
||||||
await interaction.message.edit(embed=await guild(self.ctx))
|
await interaction.message.edit(embed=await guild(self.ctx))
|
||||||
|
|
||||||
@ui.button(label="History Inline", style=ButtonStyle.green, row=2)
|
@ui.button(label="History Inline", style=ButtonStyle.green, row=1)
|
||||||
async def inline(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
|
async def inline(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
|
||||||
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)
|
||||||
|
@ -99,6 +90,15 @@ 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)
|
||||||
|
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=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:
|
||||||
|
|
Loading…
Reference in a new issue