Constructor
# new RolePrompt()
Methods
# (async, static) multi(promptInfo, amountopt) → {Promise.<Collection.<String, Role>>}
Prompts the user for multiple roles, can be set to an exact amount.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
promptInfo |
PromptInfo | |||
amount |
Number |
<optional> |
Infinity | the amount of roles to prompt for |
Throws:
-
-
if the user does not respond within the given time.
- Type
- TimeOutError
-
-
-
if the user cancels the prompt.
- Type
- CancelError
-
Returns:
- Type
- Promise.<Collection.<String, Role>>
# (async, static) single(promptInfo) → {Promise.<Role>}
Prompts the user for a role.
Parameters:
Name | Type | Description |
---|---|---|
promptInfo |
PromptInfo |
Throws:
-
-
if the user does not respond within the given time.
- Type
- TimeOutError
-
-
-
if the user cancels the prompt.
- Type
- CancelError
-
Returns:
- Type
- Promise.<Role>