Skip to content

Commit

Permalink
feat: Actualizado!
Browse files Browse the repository at this point in the history
  • Loading branch information
SrGobi committed Oct 23, 2024
1 parent 1cd9fe9 commit 78843f2
Showing 1 changed file with 39 additions and 4 deletions.
43 changes: 39 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ rank.build("Cascadia Code PL")
</a>
</details>

## [WelcomeLeave Card](https://canvacard.srgobi.com/classes/welcomeleave)
## [Welcome / Leave Card](https://canvacard.srgobi.com/classes/welcomeleave)

```js
const canvacard = require("canvacard");
Expand Down Expand Up @@ -136,6 +136,44 @@ welcomer.build("Cascadia Code PL, Noto Color Emoji")
</a>
</details>

## [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));
```

<img src="https://raw.githubusercontent.com/SrGobi/canvacard/refs/heads/test/spotify.png" alt="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);
```

<img src="https://raw.githubusercontent.com/SrGobi/canvacard/refs/heads/test/images/circle" alt="Circle Preview">

## [Otros ejemplos](https://canvacard.srgobi.com)

```js
Expand Down Expand Up @@ -172,9 +210,6 @@ client.login('Tu_Bot_Token_aqui');
<details open>
<summary>PREVIEW</summary>
<br>
<a>
<img src="https://raw.githubusercontent.com/SrGobi/canvacard/refs/heads/test/fortnite_stats.png" alt="Fortnite Stats">
</a>
<a>
<img src="https://raw.githubusercontent.com/SrGobi/canvacard/refs/heads/test/fortnite_shop.png" alt="Fortnite Shop">
</a>
Expand Down

0 comments on commit 78843f2

Please sign in to comment.