v2.0.0-beta.0
Pre-release
Pre-release
Additions
- Added
clean()
to help reduce reduce RAM usage, and lower database usage. - Added
db.findAll()
for fetching all documents in a collection, without any filters. - Added
https()
Function, to make HTTP requests. - Added
lastUpdated
property toUserResult
, this might be useful for some people. - Added
leaderboard()
option to not include guildId, allowing for global leaderboards. - Added
registerPlugins()
function, now you can make and use plugins to makesimply-xp
even more powerful. - Added
removeLevel()
andremoveXP()
functions, to remove XP and Levels from a user. - Added
roleSetup.list()
for listing all roles in a guild. - Added
roleSetup.getRoles()
for getting user's level roles in a guild, has options. - Added
voice_time
andvoice_xp
for SQLite, allowing for a future@simply-xp/voice
package. - Added
xp_rate
option forconnect()
andupdateOptions()
functions, to set XP rate globally. - Added
xp_rate
as a database value, to update XP rates for all users upon xp_rate change. - Added
XpEvents
class, to handle events instead ofconsole.log
(READ DOCS). - More
leaderboardCard()
customization options (Suggested by notquarkhadron on Discord) - Moved fonts to CDNs, to reduce package size.
⚠️ Breaking Changes
ConnectionOptions
andNewClientOptions
replacesauto_purge
withauto_clean
.addXP()
,removeXP()
,setXP()
replaceshasLevelledUp
withlevelDifference
, returning the difference in
levels,
now always returnsnumber
.
Bug Fixes
- Fix
charts()
displaying bar funny when a user has infinity XP. - Fix
convertFrom()
returningNaN
when negative number is provided, now will return 0 by default. - (Hopefully) Fix
undefined
error when usingadd
andset
functions sometimes. - Fix
LevelRoleResult
returninglvlrole
as string, now returnsobject
as intended. - Fix
rankCard()
visual bug when user just levelled up. - Fix broken
JSDocs
documentation links.
Improvements
- Both
rankCard()
andcompareCard()
have visual & efficiency improvements. hasLevelledUp
now returns new level number if user levelled up, instead oftrue
.leaderboardCard()
no longer requiresmembers
when including Guild details, and adjusted default colours.leaderboardCard()
replacesfont
withprimaryFont
andsecondaryFont
, separating title from rest of the card.- Added method to clear canvas cache, enable by setting
auto_clean
totrue
inconnect()
, orupdateOptions()
. - If
username
is specified inaddXP()
,addLevel()
,setLevel()
, it will update the user's username. - Replaced
Baloo
font to re-add support for symbols, unfortunately this means increased package size. charts()
andleaderboardCard()
have attempted RAM usage improvements.- Downgraded
@napi-rs/canvas
, as a temporary fix for RAM
leaks. Issue #716 charts()
minor code improvements.- Made changes to
XpLog()
system. - Add support for
MongoDB
V3.
❌ Removals
rank()
is removed, userankCard()
instead.
Full Changelog: v2.0.0-dev.5-fix.0...v2.0.0-beta.0