Level class
Last updated
Last updated
The Level class requires two arguments. The first argument must be an instance of the Discord.js Client class which represents the bot. The second argument must be an instance of the Discord.js GuildMember class which represents the member where to get the level info from.
A number which represents the amount of XP the member has in the level system.
A number which represents the level the member has in the level system.
A number which represents the amount of messages the member has sent when the bot was online.
Changes the amount of XP the member has. It automatically updates the level of the member if necessary. The function returns a Promise
which returns an instance of the Level class with the updated data.
Argument | Description |
---|---|
Changes the level the member has. It automatically updates the amount of XP of the member if necessary to the required amount for this level. The function returns a Promise
which returns an instance of the Level class with the updated data.
Argument | Description |
---|---|
amount
A number which represents the new amount of XP the member should have.
amount
A number which represents the new level the member should have.