Compare commits

..

No commits in common. "7c69a894422e0db8a9d1771b0a21432aebd80ad4" and "c134a3ed181e285cd52501a8210811e99d12f8ce" have entirely different histories.

2 changed files with 4 additions and 13 deletions

View file

@ -56,12 +56,3 @@ class Types(ui.View):
current_setting = await config.custom("types", interaction.guild.id, self.type.key).dm_users()
await config.custom("types", interaction.guild.id, self.type.key).dm_users.set(not current_setting)
await interaction.message.edit(embed=await type_embed(self.ctx, self.type))
@ui.button(label="Reset", style=ButtonStyle.red, row=1)
async def reset(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:
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.custom("types", interaction.guild.id, self.type.key).clear()
await interaction.message.edit(embed=await type_embed(self.ctx, self.type))

View file

@ -29,10 +29,10 @@ def register_config(config_obj: Config):
)
moderation_type = {
"show_in_history": None,
"show_moderator": None,
"use_discord_permissions": None,
"dm_users": None,
"show_in_history": bool,
"show_moderator": bool,
"use_discord_permissions": bool,
"dm_users": bool,
}
config_obj.init_custom("types", 2)