fix: made config commands still respond if you haven't configured anything yet

This commit is contained in:
Seaswimmer 2023-08-08 02:38:17 -04:00
parent 2fa0cf3de5
commit bb3d0c8bc0
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -183,7 +183,7 @@ class Shortmute(commands.Cog):
if already_in_list: if already_in_list:
await ctx.send("Channels already in the list:\n" + "\n".join(already_in_list)) await ctx.send("Channels already in the list:\n" + "\n".join(already_in_list))
else: else:
await ctx.send("Please provide a valid channel.") await ctx.send("No channels are currently in the logging list.")
@shortmute_config_channel.command(name='add') @shortmute_config_channel.command(name='add')
@commands.guild_only() @commands.guild_only()
@ -228,6 +228,8 @@ class Shortmute(commands.Cog):
already_in_list.append(role_obj.mention) already_in_list.append(role_obj.mention)
if already_in_list: if already_in_list:
await ctx.send("Roles already in the immune roles list:\n" + "\n".join(already_in_list), allowed_mentions = discord.AllowedMentions(roles=False)) await ctx.send("Roles already in the immune roles list:\n" + "\n".join(already_in_list), allowed_mentions = discord.AllowedMentions(roles=False))
else:
await ctx.send("No roles are currently in the immune roles list.")
@shortmute_config_role.command(name='add') @shortmute_config_role.command(name='add')
@commands.guild_only() @commands.guild_only()
@ -272,6 +274,8 @@ class Shortmute(commands.Cog):
already_in_list.append(user_obj.mention) already_in_list.append(user_obj.mention)
if already_in_list: if already_in_list:
await ctx.send("Users already blacklisted:\n" + "\n".join(already_in_list), allowed_mentions = discord.AllowedMentions(users=False)) await ctx.send("Users already blacklisted:\n" + "\n".join(already_in_list), allowed_mentions = discord.AllowedMentions(users=False))
else:
await ctx.send("No users are currently blacklisted.")
@shortmute_config_blacklist.command(name='add') @shortmute_config_blacklist.command(name='add')
@commands.guild_only() @commands.guild_only()