Теперь он удаляет только "содержимое" последних сообщений:
@commands.command()
@commands.has_permissions(manage_guild=True)
async def clear(self, ctx, content:int):
await ctx.message.delete()
if content > 0:
await ctx.channel.purge(limit=content)
if content == 1:
title = f'Usunięto {content} wiadomość'
colour = discord.Colour.blue()
else:
title = f'Usunięto {content} wiadomości'
colour = discord.Colour.blue()
else:
title = 'Hej! Wartość nie może być mniejsza od 0!'
colour = discord.Colour.red()
clear = discord.Embed(
title = title,
colour = colour
)
clear.set_author(name=ctx.bot.user.name, icon_url=ctx.bot.user.avatar_url)
clear.set_footer(text=version)
textMsg = await ctx.send(embed=clear)
await textMsg.delete(delay=2)
Я хочу, чтобы бот удалял только указанное c лицо (например, "! Clear 5 @ Thundo # 0000 <= упоминание) - удалит только последние пять сообщений Thundo и не удалит другие сообщения </p>