charts()
This function is used to generate a chart of the top users in a guild.
Parametersβ
Parameter | Type | Required | Description |
---|---|---|---|
guildId | string | β | The guild ID. |
options | ChartOptions | β | The options for the chart. |
Returnsβ
- Promise<
{ attachment: Buffer; description: string; name: string; }
>
Throwsβ
XpFatal
- if invalid parameters are provided, or if there are not enough users to create a chart.
[JS] Exampleβ
const {charts} = require('simply-xp');
const guildid = "867999056172052551";
charts(guildid)
.then(console.log) // Returns the chart object
.catch((err) => console.log(err)); // Returns the error