reset
Sur cette page
reset()
Ce contenu n’est pas encore disponible dans votre langue.
This function is used to reset the XP and level of a user.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| userId | string | ✅ | The ID of the user. | |
| guildId | string | ✅ | The guild ID. | |
| erase | boolean | ❌ | false |
Erase user entry from database? |
| username | string | ❌ | Username to use if auto_create is enabled. |
Returns
Section titled “Returns”- Promise<
boolean>
Throws
Section titled “Throws”XpFatal- If invalid parameters are provided, or if there is a database error.
[JS] Example
Section titled “[JS] Example”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