Methods
findRecursively(options) → {Array.<any>}
Find recursively something inside a object
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
options
|
|
Returns:
- Type:
-
Array.<any>
All results founded.
isValidReactionRoleType(number) → {boolean}
Check if a number is valid reaction role type.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
number |
ReactionRoleType
|
Type of reaction role to check if it's valid. |
Returns:
- Type:
-
boolean
Type Definitions
ActionType
Reaction action Type
Properties:
Name | Type | Description |
---|---|---|
UNKNOWN |
number
|
Unknown type of this reaction action. |
GIVE |
number
|
The member will win some reaction role. |
TAKE |
number
|
The member will lose some reaction role. |
- Source:
Type:
-
object
IHooks
Pay attention: return value must be boolean! If is not, will not work like you wish.
Create your custom hooks to execute before/after Reaction Role Manager do things.
Properties:
Name | Type | Description |
---|---|---|
preRoleAddHook |
Promise.<boolean>
|
Function executed before add a role to some member. If return value is false, this action will be bypassed. |
preRoleRemoveHook |
Promise.<boolean>
|
Function executed before remove a role from some member. If return value is false, this action will be bypassed. |
- Source:
Type:
-
Object
IRequirementRolesType
Requirement type object struct
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
allowList |
Array.<RoleResolvable>
|
<optional> |
[] | List of roles ID's need to win this role. |
denyList |
Array.<RoleResolvable>
|
<optional> |
[] | List of roles ID's denied to win this role. |
- Source:
Type:
-
object
IRequirementType
Requirement type object struct
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
boost |
boolean
|
<optional> |
false | User need have boost in server to win this role. |
verifiedDeveloper |
boolean
|
<optional> |
false | User need verified developer badge to win this role. |
roles |
IRequirementRolesType
|
<optional> |
{} | Roles requirements |
users |
IRequirementUsersType
|
<optional> |
false | Users requirements |
permissionsNeed |
Array.<PermissionResolvable>
|
<optional> |
[] | Permissions requirements |
- Source:
Type:
-
object
IRequirementUsersType
Requirement type object struct
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
allowList |
Array.<UserResolvable>
|
<optional> |
[] | List of users ID's allowed to win this role. |
denyList |
Array.<UserResolvable>
|
<optional> |
[] | List of users ID's denied to win this role. |
- Source:
Type:
-
object
ReactionRoleEvent
Reaction role manager events.
Properties:
Name | Type | Default | Description |
---|---|---|---|
REACTION_ROLE_ADD |
string
|
'reactionRoleAdd' | Triggered when a member won some role. |
REACTION_ROLE_REMOVE |
string
|
'reactionRoleRemove' | Triggered when a member lost some role. |
ALL_REACTIONS_REMOVE |
string
|
'allReactionsRemove' | Triggered when all reactions from message was removed. |
MISSING_REQUIREMENTS |
string
|
'missingRequirements' | Triggered when a member hasn't all requirements to win some role. |
MISSING_PERMISSIONS |
string
|
'missingPermissions' | Triggered when the bot doesn't have permissions to manage this role. |
DEBUG |
string
|
'debug' | Triggered for debug messages. |
READY |
string
|
'ready' | Triggered when reation role manager is ready. |
- Source:
Type:
-
Object
ReactionRoleType
Reaction Role Type
Properties:
Name | Type | Description |
---|---|---|
NORMAL |
number
|
This role works like basic reaction role. |
TOGGLE |
number
|
You can win only one role of all toggle roles in this message (like colors system) |
JUST_WIN |
number
|
This role you'll only win, not lose. |
JUST_LOSE |
number
|
This role you'll only lose, not win. |
REVERSED |
number
|
This is reversed role. When react, you'll lose it, when you take off reaction you'll win it. |
- Source:
Type:
-
object
RequirementType
Requirement type to win some role.
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
UNKNOWN |
number
|
<optional> |
0 | |
BOOST |
number
|
<optional> |
1 | Need be a booster to win this role. |
VERIFIED_DEVELOPER |
number
|
<optional> |
2 | Need be a verified developer to win this role. |
PERMISSION |
number
|
<optional> |
3 | Need has some permissions to win this role. |
ROLES |
number
|
<optional> |
4 | Need has all allow listed roles and hasn't all denied listed roles. |
USERS |
number
|
<optional> |
5 | Need be inluded in allow list and not included in deny list to win this role. |
- Source:
Type:
-
Object