https://github.com/unburn/greetify
Greetify is futuristic welcome card canvas library
https://github.com/unburn/greetify
canvas discord-canvas welcome-card welcome-card-discord
Last synced: 28 days ago
JSON representation
Greetify is futuristic welcome card canvas library
- Host: GitHub
- URL: https://github.com/unburn/greetify
- Owner: unburn
- License: gpl-3.0
- Created: 2023-10-10T04:37:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-21T04:13:22.000Z (about 1 year ago)
- Last Synced: 2024-09-23T22:12:56.290Z (8 months ago)
- Topics: canvas, discord-canvas, welcome-card, welcome-card-discord
- Language: TypeScript
- Homepage:
- Size: 2.5 MB
- Stars: 21
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Futuristic welcome card canvas library
[](https://www.npmjs.com/package/greetify)
[](https://www.npmjs.com/package/greetify)
[](https://github.com/unburn/greetify/blob/main/LICENCE)
[](https://github.com/unburn/greetify)# Installation
```
npm install greetify
```# Usage
## Using File System (FS)
```javascript
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
```javascript
// 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
```javascript
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
```javascript
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](https://github.com/unburn/greetify/blob/main/LICENCE)