1.0.5 ā¢ Published 2 months ago
welcomify v1.0.5
š Homepage
Install
npm i welcomify
Usage
This example code will create a welcome card and save it as a png.
(async () => {
// Importing modules
const { Card } = require("welcomify");
const fs = require("fs");
// Card details here
const card = new Card()
.setName("Shiorii")
.setAvatar(
"https://raw.githubusercontent.com/Shiioriii/Welcomify/main/assets/avatar.png"
)
.setMessage("YOU ARE 300 MEMBERS!")
.setBackground('https://raw.githubusercontent.com/Shiioriii/Welcomify/main/assets/background.jpg')
.setColor("00FF38") // without #
.setTitle("Welcome");
// Building process
const cardoutput = await card.build();
// Save as image
fs.writeFileSync("cardout.png", cardoutput);
console.log("Done");
})();
Example For Discord.js Bot Used
// Importing modules
const { Card } = require("welcomify");
const { AttachmentBuilder } = require("discord.js");
// Make sure to define client
client.on("guildMemberAdd", async (member) => {
// Card details here
const card = new Card()
.setName("Shiorii")
.setAvatar(
"https://raw.githubusercontent.com/Shiioriii/Welcomify/main/assets/avatar.png"
)
.setMessage("YOU ARE 300 MEMBER!")
.setBackground('https://raw.githubusercontent.com/Shiioriii/Welcomify/main/assets/background.jpg')
.setColor("00FF38") // without #
.setTitle("Welcome");
// Building process
const cardoutput = await card.build();
// Fetch channel from members guild using ID
const channel = member.guild.channels.cache.get("0000000000000000000");
// Sends card to the "channel"
await channel.send({
files: [
{
attachment: cardoutput,
name: `${member.id}.png`,
},
],
});
});
Author
š¤ Shiorii
- Website: https://fypmoon.org
- Twitter: @shioriikwkmi
- Github: @Shiioriii
š¤ Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page. You can also take a look at the contributing guide.
Show your support
Give a āļø if this project helped you!
š License
Copyright Ā© 2024 Shiorii. This project is GPL-3.0 licensed.
1.0.4-testsecurity
2 months ago
1.0.4-test
2 months ago
1.0.5
2 months ago
1.0.4
2 months ago
1.0.3
3 months ago
1.0.2
3 months ago
1.0.1
3 months ago
1.0.0
3 months ago