fix: shortened docstrings again

This commit is contained in:
Seaswimmer 2023-08-08 02:33:43 -04:00
parent 8de47b3e71
commit dc0bdcbd42
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -167,13 +167,13 @@ class Shortmute(commands.Cog):
@commands.guild_only() @commands.guild_only()
@commands.admin() @commands.admin()
async def shortmute_config(self, ctx: commands.Context): async def shortmute_config(self, ctx: commands.Context):
"""Used to configure the /shortmute slash command.""" """Used to configure the /shortmute command."""
@shortmute_config.group(name='channel', invoke_without_command=True, aliases=['channels']) @shortmute_config.group(name='channel', invoke_without_command=True, aliases=['channels'])
@commands.guild_only() @commands.guild_only()
@commands.admin() @commands.admin()
async def shortmute_config_channel(self, ctx: commands.Context): async def shortmute_config_channel(self, ctx: commands.Context):
"""Checks the existing list of channels that /shortmute is logging to.""" """Lists the channels that /shortmute is logging to."""
current_list = await self.config.guild(ctx.guild).logging_channels() current_list = await self.config.guild(ctx.guild).logging_channels()
already_in_list = [] already_in_list = []
for channel_id in current_list: for channel_id in current_list:
@ -189,7 +189,7 @@ class Shortmute(commands.Cog):
@commands.guild_only() @commands.guild_only()
@commands.admin() @commands.admin()
async def shortmute_config_channel_add(self, ctx: commands.Context, channel: discord.TextChannel = None): async def shortmute_config_channel_add(self, ctx: commands.Context, channel: discord.TextChannel = None):
"""Changes where the /shortmute slash command will log shortmutes.""" """Adds a channel to the /shortmute logging channels list."""
current_list = await self.config.guild(ctx.guild).logging_channels() current_list = await self.config.guild(ctx.guild).logging_channels()
if channel: if channel:
if channel.id in current_list: if channel.id in current_list:
@ -206,7 +206,7 @@ class Shortmute(commands.Cog):
@commands.guild_only() @commands.guild_only()
@commands.admin() @commands.admin()
async def shortmute_config_channel_remove(self, ctx: commands.Context, channel: discord.TextChannel = None): async def shortmute_config_channel_remove(self, ctx: commands.Context, channel: discord.TextChannel = None):
"""Removes a channel from the /shortmuteslash command's logging channels list.""" """Removes a channel from the /shortmute logging channels list."""
current_list = await self.config.guild(ctx.guild).logging_channels() current_list = await self.config.guild(ctx.guild).logging_channels()
if channel.id in current_list: if channel.id in current_list:
current_list.remove(channel.id) current_list.remove(channel.id)
@ -219,7 +219,7 @@ class Shortmute(commands.Cog):
@commands.guild_only() @commands.guild_only()
@commands.admin() @commands.admin()
async def shortmute_config_role(self, ctx: commands.Context): async def shortmute_config_role(self, ctx: commands.Context):
"""Checks the existing list of roles that are immune from /shortmute.""" """Lists the roles that are immune from /shortmute."""
current_list = await self.config.guild(ctx.guild).immune_roles() current_list = await self.config.guild(ctx.guild).immune_roles()
already_in_list = [] already_in_list = []
for role_id in current_list: for role_id in current_list:
@ -233,7 +233,7 @@ class Shortmute(commands.Cog):
@commands.guild_only() @commands.guild_only()
@commands.admin() @commands.admin()
async def shortmute_config_role_add(self, ctx: commands.Context, role: discord.Role = None): async def shortmute_config_role_add(self, ctx: commands.Context, role: discord.Role = None):
"""Adds roles to the immune roles list for the /shortmute slash command.""" """Adds roles to the /shortmute immune roles list."""
current_list = await self.config.guild(ctx.guild).immune_roles() current_list = await self.config.guild(ctx.guild).immune_roles()
if role: if role:
if role.id in current_list: if role.id in current_list:
@ -250,7 +250,7 @@ class Shortmute(commands.Cog):
@commands.guild_only() @commands.guild_only()
@commands.admin() @commands.admin()
async def shortmute_config_role_remove(self, ctx: commands.Context, role: discord.Role = None): async def shortmute_config_role_remove(self, ctx: commands.Context, role: discord.Role = None):
"""Removes roles from the immune roles list for the /shortmute slash command.""" """Removes roles from the /shortmute immune roles list."""
current_list = await self.config.guild(ctx.guild).immune_roles() current_list = await self.config.guild(ctx.guild).immune_roles()
if role.id in current_list: if role.id in current_list:
current_list.remove(role.id) current_list.remove(role.id)
@ -263,7 +263,7 @@ class Shortmute(commands.Cog):
@commands.guild_only() @commands.guild_only()
@commands.admin() @commands.admin()
async def shortmute_config_blacklist(self, ctx: commands.Context): async def shortmute_config_blacklist(self, ctx: commands.Context):
"""Checks the existing list of users that are blacklisted from using /shortmute.""" """Lists the users that are blacklisted from using /shortmute."""
current_list = await self.config.guild(ctx.guild).blacklisted_users() current_list = await self.config.guild(ctx.guild).blacklisted_users()
already_in_list = [] already_in_list = []
for user_id in current_list: for user_id in current_list:
@ -277,7 +277,7 @@ class Shortmute(commands.Cog):
@commands.guild_only() @commands.guild_only()
@commands.admin() @commands.admin()
async def shortmute_config_blacklist_add(self, ctx: commands.Context, user: discord.User = None): async def shortmute_config_blacklist_add(self, ctx: commands.Context, user: discord.User = None):
"""Adds users to the blacklist for the /shortmute slash command.""" """Adds users to the /shortmute blacklist."""
current_list = await self.config.guild(ctx.guild).blacklisted_users() current_list = await self.config.guild(ctx.guild).blacklisted_users()
if user: if user:
if user.id in current_list: if user.id in current_list:
@ -294,7 +294,7 @@ class Shortmute(commands.Cog):
@commands.guild_only() @commands.guild_only()
@commands.admin() @commands.admin()
async def shortmute_config_blacklist_remove(self, ctx: commands.Context, user: discord.User = None): async def shortmute_config_blacklist_remove(self, ctx: commands.Context, user: discord.User = None):
"""Removes users from the blacklist for the /shortmute slash command.""" """Removes users from the /shortmute blacklist."""
current_list = await self.config.guild(ctx.guild).blacklisted_users() current_list = await self.config.guild(ctx.guild).blacklisted_users()
if user.id in current_list: if user.id in current_list:
current_list.remove(user.id) current_list.remove(user.id)
@ -307,7 +307,7 @@ class Shortmute(commands.Cog):
@commands.guild_only() @commands.guild_only()
@commands.admin() @commands.admin()
async def shortmute_config_message(self, ctx: commands.Context, enabled: bool = None): async def shortmute_config_message(self, ctx: commands.Context, enabled: bool = None):
"""Changes if the /shortmute slash command Direct Messages its target.""" """Changes if /shortmute Direct Messages its target."""
old_value = await self.config.guild(ctx.guild).dm() old_value = await self.config.guild(ctx.guild).dm()
if enabled: if enabled:
await self.config.guild(ctx.guild).dm.set(enabled) await self.config.guild(ctx.guild).dm.set(enabled)