Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
twlite committed May 11, 2023
1 parent feb2666 commit df815b4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Rank.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ class Rank {
ctx.font = `36px ${ops.fontY}`;
ctx.fillStyle = this.data.discriminator.color;
ctx.textAlign = "center";
ctx.fillText(discrim.substring(0, 4), ctx.measureText(name).width + 20 + 335, yCoord);
ctx.fillText(discrim.substring(0, 5), ctx.measureText(name).width + 20 + 335, yCoord);
} else {
ctx.font = `26px ${ops.fontY}`;
ctx.fillStyle = this.data.discriminator.color;
Expand Down
Binary file modified test/Gamer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/Nerd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/Player.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 11 additions & 8 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@ const users = [
requiredXP: 845,
username: 'Gamer',
handle: '1000',
avatar: 'https://cdn.discordapp.com/embed/avatars/0.png'
avatar: 'https://cdn.discordapp.com/embed/avatars/0.png',
status: 'dnd'
},
{
xp: 467,
requiredXP: 754,
username: 'Player',
handle: 'player',
avatar: 'https://cdn.discordapp.com/embed/avatars/1.png'
avatar: 'https://cdn.discordapp.com/embed/avatars/2.png',
status: 'idle'
},
{
xp: 200,
requiredXP: 400,
xp: 450,
requiredXP: 500,
username: 'Nerd',
avatar: 'https://cdn.discordapp.com/embed/avatars/2.png'
avatar: 'https://cdn.discordapp.com/embed/avatars/4.png',
status: 'online'
}
];

Expand All @@ -28,9 +31,9 @@ Promise.all(users.map((userData) => {
.setAvatar(userData.avatar)
.setCurrentXP(userData.xp)
.setRequiredXP(userData.requiredXP)
.setStatus("dnd")
.setProgressBar(["#000000", "#FEFEFE"], "GRADIENT", true)
.setProgressBarTrack("#FFFFFF")
.setStatus(userData.status)
.setProgressBar("#5865F2")
.setProgressBarTrack("#F6F6F6")
.setUsername(userData.username)
.setDiscriminator(userData.handle)
.setMinXP(300);
Expand Down

0 comments on commit df815b4

Please sign in to comment.