(PLEASE PIN THIS) canvacord have changed some names of classes and how parameters are implemented. Here is an example of how to create the rank card via the new version: under "let currentRank = allLevels.findIndex((lvl) => lvl.userId === targetUserId) + 1;" write: const { Font } = require('canvacord'); Font.loadDefault(); const rank = new canvacord.RankCardBuilder() [same as in the video] .setTextStyles({ level: "LEVEL:", xp: "EXP:", rank: "RANK:", }); const image = await rank.build({ format: 'png',}); const attachment = new AttachmentBuilder(image); interaction.editReply({ files: [attachment] }); *IF YOU WANT TO CHANGE THE COLOR OF THE PROGRESS BAR:* .setStyles({ progressbar: { thumb: { style: { backgroundColor: "color here, can be hex", }, }, }, })
How can we change the size of the text ? The new rank card seems different from the video it looks like the text is smaller and level/rank/xp are written below the progressBar do you know how we can change it to make like in the video ?
Great video and got it working on my side! Quick question that might be a bad one. Where does the Rank value come into play? Additionally, is it possible to replace the rank value to the name of a role instead of a number?
Rank is not longer working because of newer version of canvacord. Solution for this is importing Font and RankCardBuilder from canvacord. const { Font, RankCardBuilder } = require('canvacord'); and different using of creating cards: const card = new RankCardBuilder() .setDisplayName(name) .setUsername(username) .setAvatar(avatar_url) .setCurrentXP(currentXP) .setRequiredXP(requiredXP) .setLevel(level) .setRank(currentRank) .setOverlay(90) .setBackground("#000000") }); const image = await card.build({ format: "png", }); const attachment = new AttachmentBuilder(image); interaction.editReply({ files: [attachment] }); },
Hey! I followed this video for the rank card and it worked well... right to the point where I tried looking up someone who was offline. the Error was marked as Status = NULL. Apparently in the discord documentation there are only 3 status presences. online, idle and dnd. there is no presence for Offline members which breaks the .setStatus() entry of the rank card. Not sure if you have fixed his in further videos but thought I would point it out in case it went unnoticed. Keep up the flow in the channel. I like how you explain things!
For me, I just made a function to identify the user's status, and if it's not in the 3, then I just coded it so that it sets the status to offline, since it must be offlne.
It says: There was an error running this command: TypeError: canvacord.Rank is not a constructor. i have tryed to the code from github but it will not work can somebody please help?
(PLEASE PIN THIS)
canvacord have changed some names of classes and how parameters are implemented. Here is an example of how to create the rank card via the new version:
under "let currentRank = allLevels.findIndex((lvl) => lvl.userId === targetUserId) + 1;" write:
const { Font } = require('canvacord');
Font.loadDefault();
const rank = new canvacord.RankCardBuilder()
[same as in the video]
.setTextStyles({
level: "LEVEL:",
xp: "EXP:",
rank: "RANK:",
});
const image = await rank.build({ format: 'png',});
const attachment = new AttachmentBuilder(image);
interaction.editReply({ files: [attachment] });
*IF YOU WANT TO CHANGE THE COLOR OF THE PROGRESS BAR:*
.setStyles({
progressbar: {
thumb: {
style: {
backgroundColor: "color here, can be hex",
},
},
},
})
Thanks for this ❤
@@KAP3340 no worries at all :)
How can we change the size of the text ? The new rank card seems different from the video it looks like the text is smaller and level/rank/xp are written below the progressBar do you know how we can change it to make like in the video ?
Wait so what do you put in the "[same as in the video]" part?
This one:
.setAvatar(targetUserObj.user.displayAvatarURL({ size: 256 }))
.setRank(currentRank)
.setLevel(fetchedLevel.level)
.setCurrentXp(fetchedLevel.xp)
.setRequiredXP(calculateLevelXp(fetchedLevel.level))
.setStatus(targetUserObj.presence.status)
.setProgressBar("#FFC300", "COLOR")
.setUsername(targetUserObj.user.username)
.setDiscriminator(targetUserObj.user.discriminator);
Thank you very much for these videos. They're super informative, easy to understand and get straight to the point.
Keep up the amazing work!
Your videos are awsome and you deserve much more likes!
can u make a leaderboard?
Great video and got it working on my side! Quick question that might be a bad one. Where does the Rank value come into play? Additionally, is it possible to replace the rank value to the name of a role instead of a number?
Would love to expand the canvacord rank card into a full leaderboard for all users/top X users!
Agreed! That would be awesome. Great competitive feature to hopefully boost engagement
Why doees canvacord.Rank() is not working it tell me that canvacord.Rank() is not a consstructor
use canvacord.RankCardBuilder instead (from the canvacord docs)
Rank is not longer working because of newer version of canvacord.
Solution for this is importing Font and RankCardBuilder from canvacord.
const { Font, RankCardBuilder } = require('canvacord');
and different using of creating cards:
const card = new RankCardBuilder()
.setDisplayName(name)
.setUsername(username)
.setAvatar(avatar_url)
.setCurrentXP(currentXP)
.setRequiredXP(requiredXP)
.setLevel(level)
.setRank(currentRank)
.setOverlay(90)
.setBackground("#000000")
});
const image = await card.build({
format: "png",
});
const attachment = new AttachmentBuilder(image);
interaction.editReply({ files: [attachment] });
},
Hey! I followed this video for the rank card and it worked well... right to the point where I tried looking up someone who was offline. the Error was marked as Status = NULL. Apparently in the discord documentation there are only 3 status presences. online, idle and dnd. there is no presence for Offline members which breaks the .setStatus() entry of the rank card. Not sure if you have fixed his in further videos but thought I would point it out in case it went unnoticed. Keep up the flow in the channel. I like how you explain things!
For me, I just made a function to identify the user's status, and if it's not in the 3, then I just coded it so that it sets the status to offline, since it must be offlne.
How about modals (for moderator recruitment for example ?), or welcome / leave embeds ?
How would I change the text 'LEVEL' or 'RANK' to be different and how would I add a background image to the image
There was an error running this command: TypeError: canvacord.Rank is not a constructor
any one have a solution?
In Canvacord Status its showing undefined and not showing the status ?
could be a good idea to give roles while member is leveling
Thank you!!! Btw can you make a video of music bot?
Unfortunately it's against TOS :(
@@UnderCtrl and what about Spotify api?
TypeError: canvacord.Rank is not a constructor. Help please
same
Can you do a music bot? :>
is it work in discord.js 13 after doing some changes?
waiting for music commands tutorial
i got error: "Current xp data type must be a number, received undefined". how to fix that?
parseInt()
could you teach us how to add music as well?
Shit i don't know how to deploy this command in bot.
i'm getting error
undefined...
yo could you do an updated tutorial on how to make slash commands
The video I have is up to date
canvacord.Rank() not a constructor easiest way to fix do npm remove convacord and then do npm i convacord@latest
It says: There was an error running this command: TypeError: canvacord.Rank is not a constructor. i have tryed to the code from github but it will not work can somebody please help?
instead use:
const rank = new canvacord.RankCardBuilder()
its on there discord server in ther faq
canvacord.Rankbuilder()