RankBuilder

Represents a rank used in the guild, every rank must have a unique priority.

Constructor

new RankBuilder(dataopt)

Parameters:
NameTypeAttributesDescription
dataRankData<optional>
Data to build the rank

Members

data :RankData

- Data of the rank.

Methods

setColor(color) → {RankBuilder}

Sets the color of the rank.
Parameters:
NameTypeDescription
colorStringColor of the rank
Returns:
Type: 
RankBuilder

setMax(max) → {RankBuilder}

Sets the maximum XP required to get the rank (include this level).
Parameters:
NameTypeDescription
maxNumberMaximum XP required to get the rank
Returns:
Type: 
RankBuilder

setMin(min) → {RankBuilder}

Sets the minimum XP required to get the rank.
Parameters:
NameTypeDescription
minNumberMinimum XP required to get the rank
Returns:
Type: 
RankBuilder

setNameplate(nameplate) → {RankBuilder}

Sets the nameplate of the rank.
Parameters:
NameTypeDescription
nameplateStringNameplate of the rank
Returns:
Type: 
RankBuilder

setPriority(priority) → {RankBuilder}

Sets the priority of the rank.
Parameters:
NameTypeDescription
priorityNumberPriority of the rank, the higher the priority, the higher the rank
Returns:
Type: 
RankBuilder

toJSON() → {RankData}

Converts the rank builder to a rank object, used to store in the guild.
Returns:
Type: 
RankData