diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-29 23:05:39 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-29 23:05:39 -0400 |
commit | 48661511dd485957506e7900c8e86916aa3ea3af (patch) | |
tree | a32447c7899eea73eff004b31a0454817afac356 /src/commands/leveling/level.ts | |
parent | f1353ac5735158bca58a50535f43ff1561cf1e07 (diff) | |
download | tanzanite-48661511dd485957506e7900c8e86916aa3ea3af.tar.gz tanzanite-48661511dd485957506e7900c8e86916aa3ea3af.tar.bz2 tanzanite-48661511dd485957506e7900c8e86916aa3ea3af.zip |
the config command is basically done for now
Diffstat (limited to 'src/commands/leveling/level.ts')
-rw-r--r-- | src/commands/leveling/level.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts index a579df0..35a0a3e 100644 --- a/src/commands/leveling/level.ts +++ b/src/commands/leveling/level.ts @@ -58,7 +58,7 @@ export default class LevelCommand extends BushCommand { const xpForNextLevel = Level.convertLevelToXp(userLevelRow.level + 1) - currentLevelXP; const white = '#FFFFFF', gray = '#23272A', - newBlurple = '#5865F2'; + highlight = user.hexAccentColor ?? '#5865F2'; // Load roboto font because yes canvas.registerFont(join(__dirname, '..', '..', '..', '..', 'lib', 'assets', 'Roboto-Regular.ttf'), { family: 'Roboto' @@ -83,7 +83,7 @@ export default class LevelCommand extends BushCommand { const measuredTag = ctx.measureText(user.tag); ctx.fillText(user.tag, avatarImage.width + 70, 60); // Draw line under tag - ctx.fillStyle = newBlurple; + ctx.fillStyle = highlight; ctx.fillRect(avatarImage.width + 70, 65 + measuredTag.actualBoundingBoxDescent, measuredTag.width, 3); // Draw leveling bar const fullProgressBar = new CanvasProgressBar( @@ -106,7 +106,7 @@ export default class LevelCommand extends BushCommand { height: 30, width: 550 }, - newBlurple, + highlight, currentLevelXPProgress / xpForNextLevel ); progressBar.draw(); |