Package that will let you do canvas things very easily :D
const Discord = require("discord.js");
const client = new Discord.Client();
const { CanvasSenpai } = require("@deathinside/canvas.senpai.js")
const canva = new CanvasSenpai();
client.once("ready", () => {
console.log("Ready!");
});
client.on('guildMemberAdd', async member => {
const channel = member.guild.channels.cache.find(ch => ch.name === 'general');
if (!channel) return;
let data = await canva.welcome(member, { link: "https://wallpapercave.com/wp/wp5128415.jpg" })
const attachment = new Discord.MessageAttachment(
data,
"welcome-image.png"
);
channel.send(
`Welcome to the server, ${member.user.username}!`,
attachment
);
});
client.login("TOKEN");
let data = await canva.welcome(member, {options})
link: Link of the background image of welcome image || String
let data = await canva.welcome(member, { link: "https://wallpapercave.com/wp/wp5128415.jpg" })
blur: Disable and enable blur effect (default = true) || Boolean
let data = await canva.welcome(member, { link: "https://wallpapercave.com/wp/wp5128415.jpg", blur: false }) //Disables The Blur
gradiant: Add gradiant image as background image of welcome image || String
let data = await canva.welcome(member, { gradiant: "peakblue" })
//GRADIANTS NAME - coldsky, peakblue, pinkman, aqua, darkness, angel