Remove deprecated mute setting
This commit is contained in:
parent
1594ae32ab
commit
bf6571d776
1 changed files with 0 additions and 35 deletions
|
@ -33,28 +33,6 @@ class SettingsCog(commands.Cog):
|
||||||
"""Delete a guild setting."""
|
"""Delete a guild setting."""
|
||||||
return Setting.objects(setting=setting, guild=guild).delete()
|
return Setting.objects(setting=setting, guild=guild).delete()
|
||||||
|
|
||||||
@cog_ext.cog_subcommand(
|
|
||||||
base="settings",
|
|
||||||
base_desc="Settings management",
|
|
||||||
subcommand_group="set",
|
|
||||||
subcommand_group_description="Set a setting",
|
|
||||||
name="mute",
|
|
||||||
description="Set mute role",
|
|
||||||
options=[
|
|
||||||
create_option(
|
|
||||||
name="role",
|
|
||||||
description="Mute role",
|
|
||||||
option_type=8,
|
|
||||||
required=True,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
)
|
|
||||||
@admin_or_permissions(manage_guild=True)
|
|
||||||
async def _set_mute(self, ctx: SlashContext, role: Role) -> None:
|
|
||||||
await ctx.defer()
|
|
||||||
self.update_settings("mute", role.id, ctx.guild.id)
|
|
||||||
await ctx.send(f"Settings applied. New mute role is `{role.name}`")
|
|
||||||
|
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
base="settings",
|
base="settings",
|
||||||
subcommand_group="set",
|
subcommand_group="set",
|
||||||
|
@ -179,19 +157,6 @@ class SettingsCog(commands.Cog):
|
||||||
self.update_settings("noinvite", bool(active), ctx.guild.id)
|
self.update_settings("noinvite", bool(active), ctx.guild.id)
|
||||||
await ctx.send(f"Settings applied. Automatic invite active: {bool(active)}")
|
await ctx.send(f"Settings applied. Automatic invite active: {bool(active)}")
|
||||||
|
|
||||||
@cog_ext.cog_subcommand(
|
|
||||||
base="settings",
|
|
||||||
subcommand_group="unset",
|
|
||||||
subcommand_group_description="Unset a setting",
|
|
||||||
name="mute",
|
|
||||||
description="Unset mute role",
|
|
||||||
)
|
|
||||||
@admin_or_permissions(manage_guild=True)
|
|
||||||
async def _unset_mute(self, ctx: SlashContext) -> None:
|
|
||||||
await ctx.defer()
|
|
||||||
self.delete_settings("mute", ctx.guild.id)
|
|
||||||
await ctx.send("Setting removed.")
|
|
||||||
|
|
||||||
@cog_ext.cog_subcommand(
|
@cog_ext.cog_subcommand(
|
||||||
base="settings",
|
base="settings",
|
||||||
subcommand_group="unset",
|
subcommand_group="unset",
|
||||||
|
|
Loading…
Add table
Reference in a new issue