Как исключить сообщения бота, когда он удаляет сообщения?
@bot.slash_command()
async def clear(inter, count: int):
if inter.user.guild_permissions.manage_messages:
if count > 100:
await inter.send("You can't delete more than 100 messages.", ephemeral=True)
return
else:
message = await inter.send("Clearing messages...")
await inter.channel.purge(limit=count)
await inter.edit_original_response(f"{count} messages cleared.")
else:
await inter.send("You don't have permission to use this command.", ephemeral=True)