Skip to main content

charts()

This function is used to generate a chart of the top users in a guild.

Parameters​

ParameterTypeRequiredDescription
guildIdstringβœ…The guild ID.
optionsChartOptions❌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