const scanvas = require("scanvas")
(1) RankCard️
const scanvas = require("scanvas")
const Discord = require("discord.js")
const rank = await new scanvas.RankCard()
.setName("SAFAR")
.setAvatar(message.author.avatarURL)
.setXp(5)
.setColor("#0081ff")
.setFullXp(10)
.setBackground("https://site.com/background.jpg")
.toAttachment();
const attachment = new Discord.Attachment(rank.toBuffer(), "RankCard.png");
message.channel.send(attachment);
(2) Welcome image
const scanvas = require("scanvas")
const Discord = require("discord.js")
let Welcome = await new scanvas.Welcome()
.setName(message.user.username)
.setBackgroundColor("#0081ff") .setStrokeColor("#ffffff")
.setTextColor("#ffffff")
.setShadow(true) //no shadow set false
.setAvatar(av)
.setBackground("https://wallpapercave.com/wp/wp3469876.png")
.toAttachment()
const attachment = new Discord.MessageAttachment(Welcome.toBuffer(), "welcome.png")
message.channel.send(attachment);
(3) goodbye
const scanvas = require("scanvas")
const Discord = require("discord.js")
let goodbye = await new scanvas.Goodbye()
.setName(message.user.username)
.setBackgroundColor("#0081ff") .setStrokeColor("#ffffff")
.setTextColor("#ffffff")
.setShadow(true) //no shadow set false
.setAvatar(av)
.setBackground("https://wallpapercave.com/wp/wp3469876.png")
.toAttachment()
const attachment = new Discord.MessageAttachment(Welcome.toBuffer(), "goodbye.png")
message.channel.send(attachment);
- profile card
- level up card