Compare commits
No commits in common. "2d7eeedfe674bd1393773795fdf615285f59fbe4" and "e01c27d79d48219c9f7cec420ed9ce5f8f8cbef0" have entirely different histories.
2d7eeedfe6
...
e01c27d79d
2 changed files with 7 additions and 8 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 moderation cog, meant to copy GalacticBot.
|
"""Custom cog intended for use on the Galaxy discord server.
|
||||||
Developed by SeaswimmerTheFsh."""
|
Developed by SeaswimmerTheFsh."""
|
||||||
|
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
|
|
|
@ -64,13 +64,12 @@ 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)
|
if role in target.roles:
|
||||||
if role in target.roles:
|
await interaction.response.send_message(content="You're trying to shortmute someone who is immune from shortmuting.", ephemeral=True)
|
||||||
await interaction.response.send_message(content="You're trying to shortmute someone who is immune from shortmuting.", ephemeral=True)
|
return
|
||||||
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