lvlRole()
This function is used to automatically add roles to the user depending on their level.
- (ALL ROLES BELOW & SAME LEVEL ARE GIVEN)
Parametersβ
Parameter | Type | Required | Description |
---|---|---|---|
message | Message | β | The message object. |
userId | string | β | The User ID |
guildId | string | β | The Guild ID |
Returnsβ
- Promise<
void
>
Throwsβ
new Error()
- if invalid parameters are provided.
[JS] Exampleβ
const {lvlRole} = require("simply-xp");
const userid = "770551872309166090";
const guildid = "867999056172052551";
lvlRole(message, userid, guildid)
.catch((err) => console.log(err)); // Returns the error