Compare commits
2 commits
e01c27d79d
...
2d7eeedfe6
Author | SHA1 | Date | |
---|---|---|---|
2d7eeedfe6 | |||
4d9011c7a5 |
2 changed files with 8 additions and 7 deletions
|
@ -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):
|
||||||
|
|
|
@ -64,12 +64,13 @@ 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
|
||||||
immune_roles_list = await self.config.guild(interaction.guild).immune_roles()
|
if interaction.user.guild_permissions.administrator is False:
|
||||||
for role_id in immune_roles_list:
|
immune_roles_list = await self.config.guild(interaction.guild).immune_roles()
|
||||||
role = interaction.guild.get_role(role_id)
|
for role_id in immune_roles_list:
|
||||||
if role in target.roles:
|
role = interaction.guild.get_role(role_id)
|
||||||
await interaction.response.send_message(content="You're trying to shortmute someone who is immune from shortmuting.", ephemeral=True)
|
if role in target.roles:
|
||||||
return
|
await interaction.response.send_message(content="You're trying to shortmute someone who is immune from shortmuting.", ephemeral=True)
|
||||||
|
return
|
||||||
if duration in (1, -1):
|
if duration in (1, -1):
|
||||||
readable_duration = f"{duration} minute"
|
readable_duration = f"{duration} minute"
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue