Skip to content
Version: v2.0
On this page

charts()

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

Parameter Type Required Description
guildId string ✅ The guild ID.
options ChartOptions ❌ The options for the chart.
  • Promise<{ attachment: Buffer; description: string; name: string; }>
  • XpFatal - if invalid parameters are provided, or if there are not enough users to create a chart.
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