Skip to main content

removeLevel()

This function is used to remove levels from a user.

Parameters​

ParameterTypeRequiredDescription
userIdstringβœ…The ID of the user.
guildIdstringβœ…The guild ID.
levelnumberβœ…The amount of levels to remove.
usernamestring❌The name of user.

Returns​

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