🪄
Canvacard
  • 🥳Welcome
  • 🗂️Classes
    • 🎨Welcome / Leave
    • 🎮FortniteShop
    • 🎯Canvacard
    • 🎶Spotify
    • 🏆Rank
    • 🖋️Plugins
  • 🧰Utils
    • 🔧Abbreviate
    • 🖼️Canvas
    • 🕒Discord Time
    • ⚠️Error
    • 🏳️Flags
    • 🔍Format and Validate Hex
    • ⏰Format Time
    • 📏Format Variable
    • 📅Get Date or String
    • 🔍Icon
    • 🔢Is Number
    • 🔤Is String
    • 🖼️Parse Image
    • 📄Parse PNG
    • 📄Parse SVG
    • 🔽Shorten
    • ✂️Truncate Text
    • 👤Username
Powered by GitBook
On this page
  • Classes
  • Functions
  • WelcomeLeave
  • setAvatar(value) ⇒ WelcomeLeave
  • setTitulo(value, color) ⇒ WelcomeLeave
  • setSubtitulo(value, color) ⇒ WelcomeLeave
  • setColorCircle(value) ⇒ WelcomeLeave
  • setColorOverlay(value) ⇒ WelcomeLeave
  • setOpacityOverlay(value) ⇒ WelcomeLeave
  • setBackground(type, data) ⇒ WelcomeLeave
  • setTypeOverlay(type) ⇒ WelcomeLeave
  • build([font]) ⇒ Promise.<Buffer>
  1. Classes

Welcome / Leave

PreviousClassesNextFortniteShop

Last updated 6 months ago

Classes

Functions

⇒

Set the avatar of the card

⇒

Set the title of the card

⇒

Set the subtitle of the card

⇒

Set the color of the circle

⇒

Set the color of the overlay

⇒

Set the opacity of the overlay

⇒

Set background image/color of the card

Set the type of overlay

Build the card

WelcomeLeave

Kind: global class

new WelcomeLeave()

Welcome or Leave card creator

PREVIEW

Example

const welcome = new canvacard.WelcomeLeave()
  .setAvatar(data.avatarURL)
  .setBackground('COLOR', '#000000')
  .setTitulo("Titulo de la Tarjeta👋", '#FFFFFF')
  .setSubtitulo("Subtitulo de la Tarjeta 👋", '#FFFFFF')
  .setOpacityOverlay(1)
  .setColorCircle('#FFFFFF')
  .setColorOverlay('#5865F2')
  .setTypeOverlay('ROUNDED');
const welcomeImage = await welcome.build("Suravaram");
canvacard.write(welcomeImage, "./welcomer.png");

Set the avatar of the card

  • APIError Missing field: avatar

Param
Type
Description

value

string | Buffer

Avatar URL or Buffer

Set the title of the card

  • APIError The title must be a string

Param
Type
Description

value

string

Title value

color

string

HTML5 color code "#000000"

Set the subtitle of the card

  • APIError The subtitle must be a string

Param
Type
Description

value

string

Subtitle value

color

string

HTML5 color code "#000000"

Set the color of the circle

  • APIError The color must be a string

Param
Type
Description

value

string

HTML5 color code "#000000"

Set the color of the overlay

  • APIError The color must be a string

Param
Type
Description

value

string

HTML5 color code "#000000"

Set the opacity of the overlay

  • APIError The opacity must be a number

Param
Type
Description

value

number

Opacity value (0 to 1)

Set background image/color of the card

  • APIError Missing field: data

Param
Type
Description

type

"COLOR" | "IMAGE"

Type of background

data

string

Image URL or HTML color code

Set the type of overlay

  • APIError Missing field: type

Param
Type
Description

type

"RECTANGLE" | "ROUNDED"

Type of overlay

build([font]) ⇒ Promise.<Buffer>

Build the card

Kind: global function Returns: Promise.<Buffer> - Card image in buffer format Throws:

  • APIError Error loading background image

Param
Type
Default
Description

[font]

string

"Arial"

Font to use in the card

⇒

⇒ Promise.<Buffer>

setAvatar(value) ⇒

Kind: global function Returns: - The current instance of WelcomeLeave Throws:

setTitulo(value, color) ⇒

Kind: global function Returns: - The current instance of WelcomeLeave Throws:

setSubtitulo(value, color) ⇒

Kind: global function Returns: - The current instance of WelcomeLeave Throws:

setColorCircle(value) ⇒

Kind: global function Returns: - The current instance of WelcomeLeave Throws:

setColorOverlay(value) ⇒

Kind: global function Returns: - The current instance of WelcomeLeave Throws:

setOpacityOverlay(value) ⇒

Kind: global function Returns: - The current instance of WelcomeLeave Throws:

setBackground(type, data) ⇒

Kind: global function Returns: - The current instance of WelcomeLeave Throws:

setTypeOverlay(type) ⇒

Kind: global function Returns: - The current instance of WelcomeLeave Throws:

🗂️
🎨
WelcomeLeave
setAvatar(value)
WelcomeLeave
setTitulo(value, color)
WelcomeLeave
setSubtitulo(value, color)
WelcomeLeave
setColorCircle(value)
WelcomeLeave
setColorOverlay(value)
WelcomeLeave
setOpacityOverlay(value)
WelcomeLeave
setBackground(type, data)
WelcomeLeave
setTypeOverlay(type)
WelcomeLeave
build([font])
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave
WelcomeLeave