npm

@deathinside/canvas.senpai.js

0.0.1ย โ€ขย Publicย โ€ขย Published

CANVAS SENPAI FOR DISCORD

Package that will let you do canvas things very easily :D

WELCOME IMAGE GENERATOR

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");

OPTIONS OF WELCOME

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

Readme

Keywords

Package Sidebar

Install

npm i @deathinside/canvas.senpai.js

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

5.47 kB

Total Files

5

Last publish

Collaborators