resetバージョン: v2.0
目次
reset()
この関数は、ユーザーの XP とレベルをリセットするために使用します。
パラメーター
Section titled “パラメーター”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| userId | string | ✅ | ユーザーの ID。 | |
| guildId | string | ✅ | ギルド ID。 | |
| erase | boolean | ❌ | false |
データベースからユーザーエントリを削除するか。 |
| username | string | ❌ | auto_create が有効な場合に使うユーザー名。 |
- Promise<
boolean>
XpFatal- 無効なパラメーターが渡された場合、またはデータベースエラーが発生した場合。
[JS] 例
Section titled “[JS] 例”const {reset} = require('simply-xp');
const userid = "326815959358898189";const guildid = "867999056172052551";const username = "Abadima";const erase = false;
reset(userid, guildid, erase, username) .then(console.log) // Returns true if reset was successful .catch((err) => console.log(err)); // Returns the error