Coder Social home page Coder Social logo

unburn / greetify Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 5.0 2.56 MB

Greetify is futuristic welcome card canvas library

License: GNU General Public License v3.0

JavaScript 9.11% TypeScript 90.89%
canvas discord-canvas welcome-card welcome-card-discord

greetify's Introduction

Futuristic welcome card canvas library

Github โ€ข Support

NPM Version NPM Downloads NPM License GitHub Repo stars

Installation

npm install greetify

Usage

Using File System (FS)

import { Panorama } from "greetify";
import fs from "fs";

// OR

const { Panorama } = require("greetify");
const fs = require('fs')

Panorama({
    avatar: "https://cdn.discordapp.com/avatars/786504767358238720/f65e8322c0c290e7fc1d9ad20322256b.webp",
    name: "FLAMEFACE",
    type: "WELCOME",
}).then(x => {
    fs.writeFileSync("greetify.png", x)
})

In Discord Bot

// Assuming you defined client
const { Minimal } = require("greetify");

client.on("guildMemberAdd", async member => {
    const message = `YOU ARE ${member.guild.memberCount}TH MEMBER`

    const card = await Minimal({
        name: member.user.username,
        avatar: member.user.displayAvatarURL({
            size: 4096 // For High Res Avatar
        }),
        type: "WELCOME",
        message: message
    })

    const channel = member.guild.channels.cache.get("1201155869610627212");

    return channel.send({
        files: [{
            attachment: card
        }]
    })
})

Themes

Minimal

minimal

const { Minimal } = require("greetify");
const fs = require('fs')

Minimal({
    avatar: "https://cdn.discordapp.com/avatars/786504767358238720/f65e8322c0c290e7fc1d9ad20322256b.webp",
    name: "FLAMEFACE",
    type: "WELCOME",
    message: "YOUR ARE 100TH MEMBER"
}).then(x => {
    fs.writeFileSync("greetify.png", x)
})

Minimal Options

Parameters Types Default
avatar* string none
backgroundImage string https://ik.imagekit.io/unburn/greetify-default.png
circleBorder boolean false
message* string none
messageColor string #FFFFFF
name* string none
nameColor string #00FF9E
type string WELCOME
typeColor string #FFFFFF

Panorama

panorama

const { Panorama } = require("greetify");
const fs = require('fs')

Panorama({
    avatar: "https://cdn.discordapp.com/avatars/786504767358238720/f65e8322c0c290e7fc1d9ad20322256b.webp",
    name: "FLAMEFACE",
    type: "WELCOME"
}).then(x => {
    fs.writeFileSync("greetify.png", x)
})

Panorama Options

Parameters Types Default
avatar* string none
backgroundImage string https://ik.imagekit.io/unburn/greetify-default.png
circleBorder boolean false
name* string none
nameColor string #00FF9E
type string WELCOME
typeColor string #FFFFFF

Licence

GPL

greetify's People

Contributors

flameface avatar musalee avatar unschooledgamer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

greetify's Issues

Panorama theme

const card = await Panorama({
      name: member.user.username,
      avatar: member.user.displayAvatarURL({ size: 4096, format: "png" }),
      type: title,
});

Error: remote source rejected with status code 404
at /root/dev/node_modules/cropify/dist/index.js:90:11
at Generator.throw ()
at rejected (/root/dev/node_modules/cropify/dist/index.js:30:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Feature: Add font selector

Add the ability to choose a font for the card, since the included font does not support cyrillic-extended

Request failed with status code 429

Hi, I have this error code when running my code on my VPS, I don't understand the reason, previously I was testing this library on my PC and I had no errors when running my bot and everything worked perfect, now when uploading and running my bot on my VPS I have this error. I am new to this and would like to know if anyone knows how to fix it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.