From 60b3396f31a53ccd0cef4cc463b5eff15656f250 Mon Sep 17 00:00:00 2001 From: ryslandevds <87265715+ryslandevds@users.noreply.github.com> Date: Sat, 13 Jan 2024 15:59:13 +0300 Subject: [PATCH] Update bancommands.py --- cogs/bancommands.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cogs/bancommands.py b/cogs/bancommands.py index 2137123..7279a43 100644 --- a/cogs/bancommands.py +++ b/cogs/bancommands.py @@ -8,22 +8,22 @@ class BanCommands(commands.Cog): @commands.slash_command(name="бан", description="Изгоняет указанного участника с сервера навсегда.") async def ban(self, ctx: disnake.AppCommandInteraction, member: disnake.Member, *, reason=None): - if disnake.utils.get(ctx.author.roles, id=1060542125621649458): + if disnake.utils.get(ctx.author.roles, id=): await member.ban(reason=reason) await ctx.send(f'{member.mention} был забанен. Причина: {reason}') else: - await ctx.send(f'{ctx.author.mention}, у вас нет роли <@&1060542125621649458>.') + await ctx.send(f'{ctx.author.mention}, у вас нет роли .') - @commands.has_any_role(1060542125621649458) + @commands.has_any_role() @commands.slash_command(name="унбан", description="Снимает блокировку") async def unban(self, ctx: disnake.AppCommandInteraction, *, user: disnake.User): - if disnake.utils.get(ctx.author.roles, id=1060542125621649458): + if disnake.utils.get(ctx.author.roles, id=): await ctx.guild.unban(user) if (user.name, user.discriminator) == (user.name, user.discriminator): await ctx.guild.unban(user) await ctx.send(f'{user.mention} был разбанен.') else: - await ctx.send(f'{ctx.author.mention}, у вас нет роли <@&1060542125621649458>.') + await ctx.send(f'{ctx.author.mention}, у вас нет роли.') def setup(bot):