#clear command
@client.command(aliases = ['очистить','клеар','clr','клр'])
@commands.has_permissions(administrator = True)
async def clear( ctx, amount : int):
await ctx.channel.purge(limit = 1)
await ctx.channel.purge(limit = amount)
await ctx.send(embed = discord.Embed(description = f':white_check_mark: удалено {amount} сообщений(я)'))
delete_after
функции send
.@client.command(aliases = ['очистить', 'клеар', 'clr' ,'клр'])
@commands.has_permissions(administrator = True)
async def clear( ctx, amount : int):
await ctx.message.delete()
await ctx.channel.purge(limit = amount)
await ctx.send(embed = discord.Embed(description = f':white_check_mark: удалено {amount} сообщений(я)'), delete_after=5)