Compare commits

..

2 commits

Author SHA1 Message Date
2d7eeedfe6
feat(shortmute): added the ability for people with administrator to shortmute people in the immune roles list
All checks were successful
Pylint / Pylint (push) Successful in 1m16s
2023-09-27 13:28:39 -04:00
4d9011c7a5
misc(moderation): changed description 2023-09-27 13:24:57 -04:00
2 changed files with 8 additions and 7 deletions

View file

@ -2,7 +2,7 @@ import discord
from redbot.core import checks, commands, Config from redbot.core import checks, commands, Config
class Moderation(commands.Cog): class Moderation(commands.Cog):
"""Custom cog intended for use on the Galaxy discord server. """Custom cog moderation cog, meant to copy GalacticBot.
Developed by SeaswimmerTheFsh.""" Developed by SeaswimmerTheFsh."""
def __init__(self, bot): def __init__(self, bot):

View file

@ -64,6 +64,7 @@ class Shortmute(commands.Cog):
if user_id == interaction.user.id: if user_id == interaction.user.id:
await interaction.response.send_message(content="You are blacklisted from `/shortmute`!", ephemeral=True) await interaction.response.send_message(content="You are blacklisted from `/shortmute`!", ephemeral=True)
return return
if interaction.user.guild_permissions.administrator is False:
immune_roles_list = await self.config.guild(interaction.guild).immune_roles() immune_roles_list = await self.config.guild(interaction.guild).immune_roles()
for role_id in immune_roles_list: for role_id in immune_roles_list:
role = interaction.guild.get_role(role_id) role = interaction.guild.get_role(role_id)