lvlRoleVersion: v1.3
目次
lvlRole()
このコンテンツはまだ日本語訳がありません。
This function is used to automatically add roles to the user depending on their level.
- (ALL ROLES BELOW & SAME LEVEL ARE GIVEN)
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| message | Message | ✅ | The message object. |
| userId | string | ✅ | The User ID |
| guildId | string | ✅ | The Guild ID |
Returns
Section titled “Returns”- Promise<
void>
Throws
Section titled “Throws”new Error()- if invalid parameters are provided.
[JS] Example
Section titled “[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