removeLevel()
This function is used to remove levels from a user.
Parametersβ
Parameter | Type | Required | Description |
---|---|---|---|
userId | string | β | The ID of the user. |
guildId | string | β | The guild ID. |
level | number | β | The amount of levels to remove. |
username | string | β | The name of user. |
Returnsβ
- Promise<
UserResult
>
Throwsβ
XpFatal
- if invalid parameters are provided.
[JS] Exampleβ
const {removeLevel} = require('simply-xp');
const userid = "770551872309166090";
const guildid = "867999056172052551";
const level = 69;
const username = "Rahuletto";
removeLevel(userid, guildid, level, username)
.then(console.log) // Returns the user object
.catch((err) => console.log(err)); // Returns the error