From 78843f23a0fc2855f0ad81e5d13daa9a76564ea6 Mon Sep 17 00:00:00 2001 From: SrGobi Date: Wed, 23 Oct 2024 12:56:16 +0200 Subject: [PATCH] feat: Actualizado! --- README.md | 43 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7276033..9100937 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ rank.build("Cascadia Code PL") -## [WelcomeLeave Card](https://canvacard.srgobi.com/classes/welcomeleave) +## [Welcome / Leave Card](https://canvacard.srgobi.com/classes/welcomeleave) ```js const canvacard = require("canvacard"); @@ -136,6 +136,44 @@ welcomer.build("Cascadia Code PL, Noto Color Emoji") +## [Spotify Card](https://canvacard.srgobi.com/classes/spotify) + +```js +const canvacard = require("canvacard"); + +const spotify = new canvacard.Spotify() + .setAuthor("SAIKO") + .setAlbum("SAKURA 👋") + .setStartTimestamp(Date.now() - 10000) + .setEndTimestamp(Date.now() + 50000) + .setImage("https://i.scdn.co/image/ab67616d00001e02e346fc6f767ca2ac8365fe60") + .setTitle("YO LO SOÑÉ"); + +spotify.build("Cascadia Code PL, Noto Color Emoji") + .then(data => { + // Usar AttachmentBuilder para enviar el archivo + const attachment = new AttachmentBuilder(data, { name: "WelcomeCard.png" }); + message.channel.send({ content: "Aquí está tu tarjeta de bienvenida:", files: [attachment] }); + }) + .catch(err => console.error("Error al crear la tarjeta de bienvenida:", err)); +``` + +Spotify Card Preview + +## [Spotify Card](https://canvacard.srgobi.com/classes/spotify) + +```js +const canvacard = require("canvacard"); + +canvacard.Canvas.circle(data.avatarURL) +.then(data => { + canvacard.write(data, "circle.png"); +}) +.catch(console.error); +``` + +Circle Preview + ## [Otros ejemplos](https://canvacard.srgobi.com) ```js @@ -172,9 +210,6 @@ client.login('Tu_Bot_Token_aqui');
PREVIEW
- - Fortnite Stats - Fortnite Shop