RBWCM-SDK Documentation - v1.1.0
    Preparing search index...

    Class RankEntity

    Represents a specific Rank within a Ranked System. Provides helper methods to easily update, delete, or upload an icon for this rank.

    Index

    Constructors

    Properties

    color: string
    iconUrl: string | null
    id: string
    lose: number
    mvp: number
    name: string
    rankedSystemId: string
    start: number
    win: number

    Methods

    • Uploads or updates the icon image for this rank.

      Parameters

      • fileBuffer: Buffer

        The binary buffer of the image file.

      • filename: string

        The name of the file (e.g., 'gold.png').

      Returns Promise<string>

      A promise resolving to the new icon URL.

      const fs = require('fs');
      const buffer = fs.readFileSync('./icons/diamond.png');
      const newUrl = await rank.uploadIcon(buffer, 'diamond.png');