AchievementBuilder

Represents an achievement that can be used to store in the guild or user.

Constructor

new AchievementBuilder(dataopt)

Parameters:
NameTypeAttributesDescription
dataAchievementData<optional>
Data to build the achievement

Members

data :AchievementData

- Data of the achievement.

Methods

setDescription(description) → {AchievementBuilder}

Sets the description of the achievement.
Parameters:
NameTypeDescription
descriptionStringDescription of the achievement
Returns:
Type: 
AchievementBuilder

setName(name) → {AchievementBuilder}

Sets the name of the achievement.
Parameters:
NameTypeDescription
nameStringName of the achievement
Returns:
Type: 
AchievementBuilder

setProgress(progress) → {AchievementBuilder}

Sets the progress of the achievement.
Parameters:
NameTypeDescription
progressArray.<Number>Progress of the achievement
Returns:
Type: 
AchievementBuilder

setReward(reward) → {AchievementBuilder}

Sets the reward of the achievement.
Parameters:
NameTypeDescription
rewardNumberReward of the achievement
Returns:
Type: 
AchievementBuilder

setThumbnail(thumbnail) → {AchievementBuilder}

Sets the thumbnail of the achievement.
Parameters:
NameTypeDescription
thumbnailStringThumbnail of the achievement
Returns:
Type: 
AchievementBuilder

setType(type) → {AchievementBuilder}

Sets the type of the achievement.
Parameters:
NameTypeDescription
typeAchievementTypeType of the achievement
Returns:
Type: 
AchievementBuilder

toJSON() → {AchievementData}

Returns the JSON representation of the achievement.
Returns:
Type: 
AchievementData