Skip to content
Discord-Rankup

setXP

Sets the XP of a user in a guild

Parameters

ParameterTypeDescriptionRequiredDefault
userIDString | SnowflakeThe ID of the userNone
guildIDString | SnowflakeThe ID of the guildNone
xpNumberThe amount of XP to setNone
emitEventBooleanIf the levelUp or levelDown event should be emittedTrue
metadataAnyMetadata to be sent with levelUp or levelDown eventsnull

Returns

Promise<Number> - The new XP amount of the user