reset()
This function is used to reset a user in the database.
Parametersβ
Parameter | Type | Required | Description |
---|---|---|---|
userId | string | β | The User ID |
guildId | string | β | The Guild ID |
Returnsβ
- Promise<
object
>
Example:
{
user: "326815959358898189",
guild: "867999056172052551",
level: 0,
xp: 0
}
Throwsβ
new Error()
- if invalid parameters are provided.
[JS] Exampleβ
const {create} = require('simply-xp');
const userid = "326815959358898189";
const guildid = "867999056172052551";
create(userid, guildid)
.then(console.log) // Returns the user object
.catch((err) => console.log(err)); // Returns the error