Aller au contenu
Version: v1.2
Sur cette page

charts()

Ce contenu n’est pas encore disponible dans votre langue.

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

Parameter Type Required Description
message Message ✅ The message object.
options ChartOptions ❌ The options for the chart.
  • Promise<MessageAttachment>

Image

  • new Error() - if the guild ID is missing.
const { charts } = require("simply-xp");
charts(message, { type: "bar" })
.then((chart) => message.reply({ files: [chart] })) // Send the chart
.catch((err) => console.log(err)); // Returns the error

Options Type Required Default Description
background Hex Code ❌ #2F3136 Background color of the chart
type Chart Type ❌ bar Any one from these 'bar' (or) 'line' (or) 'radar' (or) 'doughnut' (or) 'pie' (or) 'polarArea'