Releases: Abadima/simply-xp
Releases · Abadima/simply-xp
v2.0.0-beta.1
Additions
- Add
setFlags()
function, to flag users in the database, useful for level tampering, annotating users, etc. - Add
flags
property toSQLite
andMongoDB
databases, to store user flags.
Improvements
db.updateOne()
will now throw better error when not enough parameters are provided. (SQLite)- Readability in
db
functions.
Bug Fixes
- Fixed a future bug where some
db
functions would returnnull
instead of actual data. (MongoDB)
Full Changelog: v2.0.0-beta.0-fix.1...v2.0.0-beta.1
v2.0.0-beta.0-fix.1
⚠️ Breaking Changes
db.find()
now takes new parameters,(collection, guildId)
for better syntax.
Bug Fixes
- Fix
fetch()
rare error when user doesn't exist, andauto_create
is true. - Fix
roleSetup.list()
not returning roles when using MongoDB (Thanks itz_hyp3r on Discord for the report)
Full Changelog: v2.0.0-beta.0-fix.0...v2.0.0-beta.0-fix.1
v2.0.0-beta.0-fix.0
Additions
- Add
fallbackFont
option tocharts()
,compareCard()
,leaderboardCard()
andrankCard()
, to use a fallback font, as part of
our bug fix.
Bug Fixes
- Fix typings for
updateOptions()
- Fix
compareCard()
andrankCard()
unnecessary username filter, and inconsistencies. - Swapped fonts from CDN to local, preventing future crashes.
Improvements
rank()
gets minor code improvements.- Remove URL ending checks (
comapreCard()
andrankCard()
), to allow for better image/gif support, while still
elegantly handling errors.
Full Changelog: v2.0.0-beta.0...v2.0.0-beta.0-fix.0
v2.0.0-beta.0
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
v2.0.0-dev.5-fix.0
⚠️ Breaking Changes
roleSetup()
now takesrole
instead ofroles
again, to make migration from V1 less painful
Bug Fixes
- Complete overhaul of
simply-xp-levelroles
in SQLite, making it actually functional - Fix
simply-xps-levelroles
not havingtimestamp
property in SQLite & MongoDB - Fix
roleSetup.add()
not actually returningtrue/false
Full Changelog: v2.0.0-dev.5...v2.0.0-dev.5-fix.0
v2.0.0-dev.5
Additions
- Added
better-sqlite3
V9 Support - Added
compareCard()
function, to compare two users. db.deleteMany()
is now added, to make deleting multiple users easier.rankCard()
now supports Modern Design, you can still override by passinglegacy: true
in options.
Changes
connect()
will now installmongodb v6
by default, versions down tov4
are still supported.
Bug Fixes
- Fix
charts()
handling invalidtype
&theme
parameters. - Missing
await
inmigrate.fromDB()
function. - SQLite deleting username on
updateOne()
.
Improvements
- Remove duplicate code in
charts()
. - Updated colours in
charts()
themes, to make them more accurate and easier to differentiate. leaderboard()
removes loop, and replaces with anAsyncronous
method to improve performance.- Tweaked
checkPackageVersion()
, which also updatesmigrate
class, andupdateOptions()
function. - Optimized font file (again), significantly lowers package size.
- Update
JSDocs
to feature our updated documentation urls.
Full Changelog: v2.0.0-dev.4...v2.0.0-dev.5
v2.0.0-dev.4
Additions
charts()
is now added, starting withbar
,doughnut
andpie
types, and many themes to choose from.migrate.fromDB()
now supports migrating from SQLite to MongoDB.
Bug Fixes
- Fix
db.createOne()
not returning created user (MongoDB), this should fix multiple functions not working properly. - Fix
db.addXP()
throwing unnecessary error when checking if new user is considered levelled up. rankCard()
andleaderboardCard()
now throws better error when image(s) provided can't be loaded.
Improvements
- Optimized font file, lowers package size (~57.31%)
- Updated JSDocs to improve accuracy.
Full Changelog: v2.0.0-dev.3...v2.0.0-dev.4
v2.0.0-dev.3
Additions
- Added
db.getCollection()
feature, useful for custom database implementations. - Implemented
migrate.fromDB()
, from MongoDB to SQLite. (Support for SQLite to MongoDB coming soon)
⚠️ Breaking Changes
migrate.discord_xp()
removesdbUrl
parameter.migrate.database()
=>migrate.fromDB()
reset()
switchesusername
anderase
parameters around.
Changes
- Overhauled
migrate.discord_xp()
function, should fix issues and remove unnecessary requirements.
Bug Fixes
- Fix
reset()
not properly resetting users.
Full Changelog: v2.0.0-dev.1...v2.0.0-dev.3
v2.0.0-dev.2
Additions
- Added
MongoDB
V4 Support setXP()
andaddXP()
now also returnhasLevelledUp
property
⚠️ Breaking Changes
convert(type, value)
=>convertFrom(value, type)
Changes
- Updated JSDocs, changed some types to interfaces.
- Optimized font file, lowers package size.
Full Changelog: v2.0.0-dev.0...v2.0.0-dev.2
v2.0.0-dev.1
Additions
updateOptions()
function- Added
MongoDB
V4 Support
⚠️ Breaking Changes
create()
swappeduserId
withguildId
to avoid future confusions.reset()
Updated Parameters.
Changes
- All
roleSetup
functions now create & returntimestamp
, useful for sorting by creation date. fetch()
has a newusername
parameter, to automatically create the user if it doesn't exist.connect()
now acceptsauto_create
, All functions can create the user if it doesn't exist, avoiding errors.- Updated JSDocs, changed some types to interfaces.
addLevel(), addXP(), setLevel(), setXP()
now has ausername
parameter, to automatically create the user if it doesn't exist.rank()
will now auto create the user if it doesn't exist ifauto_create
is set totrue
.
Full Changelog: v2.0.0-dev.0...v2.0.0-dev.1