Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions cogs/moderation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ class Moderation(commands.Cog):
def __init__(self, client):
self.client = client

# Закрытие канала
# Closing channel

@commands.command(aliases=["lock"])
@commands.has_permissions(manage_channels=True)
async def lockdown(self, ctx):
await ctx.message.delete()
await ctx.channel.set_permissions(ctx.guild.default_role, send_messages=False)
await ctx.send( ctx.channel.mention + " - **Channel locked.**")
await ctx.send(ctx.channel.mention + " - **Channel locked.**")

# Открытие канала
# Opening channel

@commands.command()
@commands.has_permissions(manage_channels=True)
Expand All @@ -26,7 +26,7 @@ async def unlock(self, ctx):
await ctx.channel.set_permissions(ctx.guild.default_role, send_messages=True)
await ctx.send( ctx.channel.mention + " - **Channel unclocked.**")

# Бан
# Ban

@commands.command()
@commands.has_permissions(ban_members=True)
Expand All @@ -40,7 +40,7 @@ async def ban(self, ctx, member: Member, *, reason: Optional[str] = "No reason."
await ctx.send(embed=embed)
await member.ban(reason=reason)

# Разбан
# Unban

@commands.command()
@commands.has_permissions(administrator=True)
Expand All @@ -63,6 +63,8 @@ async def unban(self, ctx, *, member, reason: Optional[str] = "No reason."):
await ctx.send(embed=embed)
return

# Kick

@commands.command()
@commands.has_permissions(kick_members=True)
async def kick(self, ctx, member: nextcord.Member, *, reason: Optional[str] = "No reason."):
Expand All @@ -76,6 +78,8 @@ async def kick(self, ctx, member: nextcord.Member, *, reason: Optional[str] = "N
embed.set_footer(text=f'Administrator - {ctx.author.name}#{ctx.author.discriminator}', icon_url=ctx.author.avatar.url)
await ctx.send(embed=embed)

# Clear / Purge

@commands.command(aliases=["purge"])
@commands.has_permissions(manage_messages=True)
async def clear(self, ctx, *, amount: int = None):
Expand Down