EasyLeveling

EasyLeveling

# new EasyLeveling(client, options)

Create a new Discord Easy Level

Parameters:
Name Type Description
client any

Your Discord.js Client

options DiscordEasyLevelingOptions

Discord XP level options

Source:

Methods

# (async) addLevels(userId, guildId)

add level to your desire user

Parameters:
Name Type Description
userId string

The id of the user you want to add levels

guildId string

The id of the guild that the user is in

Source:

# (async) deleteUserData(userId, guildId)

will delete a user's data from the database

Parameters:
Name Type Description
userId string

the id of the user you want to delete

guildId string

the id of the guild you want the data deleted from

Source:

# (async) generateXPChart(guildId, amountOfUsers) → {BufferEncoding}

Generate a chart of the XP usage in a guild

Parameters:
Name Type Description
guildId string

the id of a discord guild you want the chart to generate

amountOfUsers number

amount of users in a chart (do not set it higher than 5)

Source:
Returns:

Image of a chart buffered

Type
BufferEncoding

# (async) getAllData() → {AllData}

get all data from the database. powered by quick.db

Source:
Returns:
Type
AllData

# (async) getTopUser(guildId, amountOfUsers) → {array}

get the top users of a guild

Parameters:
Name Type Description
guildId string

The guild id of the top users

amountOfUsers number

Amount of people in the array

Source:
Returns:

top users

Type
array

# (async) getUserLevel(userId, guildId) → {object}

get the level and xp of the user

Parameters:
Name Type Description
userId string

user id

guildId string

guild id

Source:
Returns:

XP and the level of the user

Type
object

# (async) reduceLevels(userId, guildId, amount)

Reduce the amount of level(s) from a user

Parameters:
Name Type Description
userId string

Id of the user you want to reduce levels from

guildId string

Id of the guild you want to reduce Levels from

amount number

Amount of levels you want to reduce

Source:

# (async) reduceXP(userId, guildId, amount)

reduce the amount of xp(s) from a user

Parameters:
Name Type Description
userId string

Id of the user you want to reduce xp from

guildId string

Id of the guild you want to reduce xp from

amount number

Amount of xp(s) you want to reduce

Source:

# (async) setLevel(level, userId, guildId)

force set the level of a user

Parameters:
Name Type Description
level number

amount of level you want the author to have

userId string

user id of the user you want to set level to

guildId string

the discord guild you want the level to be set in

Source:

# (async) setXP(xp, userId, guildId)

force set the xp of a user

Parameters:
Name Type Description
xp string

amount of XP you want the author to have

userId string

user id of the user you want to set XP to

guildId string

the discord guild you want the XP to be set in

Source: