client.on('guildMemberAdd', async (member) => {
const channel = member.guild.channels.cache.find(
(channel) => channel.name === 'general'
);
if (!channel) return;
const canvas = Canvas.createCanvas(700, 250);
const ctx = canvas.getContext('2d');
const background = await Canvas.loadImage('./wallpaper.jpg');
ctx.drawImage(background, 0, 0, canvas.width, canvas.height);
ctx.strokeStyle = '#ffffff';
ctx.strokeRect(0, 0, canvas.width, canvas.height);
// Select the font size and type from one of the natively available fonts
ctx.font = '60px ArialCE.ttf';
// Select the style that will be used to fill the text in
ctx.fillStyle = '#ffffff';
// Actually …
Run Code Online (Sandbox Code Playgroud)