rankCard()
This function is used to generate an image of a user's rank.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| guild | {id: string, name: string} | ✅ | The guild object. |
| user | CardUserOptions | ✅ | The user object. |
| options | RankCardOptions | ❌ | The options. |
| locales | RankCardLocales | ❌ | The locales. |
Returns
- Promise<
{ attachment: Buffer; description: string; name: string; }>
Throws
XpFatal- if invalid parameters are provided.
[JS] Example
const {rankCard} = require('simply-xp');
const guild = {
id: "867999056172052551",
name: "Simply Develop"
};
const user = {
avatarURL: "https://avatarfiles.alphacoders.com/280/280594.jpg",
id: "326815959358898189",
username: "Abadima",
};
rankCard(guild, user)
.then(console.log) // Returns the rank card object
.catch((err) => console.log(err)); // Returns the error