charts()
この関数は、ギルド内の上位ユーザーをグラフとして生成するために使用します。
パラメーター
| Parameter | Type | Required | Description |
|---|---|---|---|
| guildId | string | ✅ | ギルド ID。 |
| options | ChartOptions | ❌ | グラフのオプション。 |
戻り値
- Promise<
{ attachment: Buffer; description: string; name: string; }>
例外
XpFatal- 無効なパラメーターが渡された場合、またはグラフを作成するのに十分なユーザーデータがない場合。
[JS] 例
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