Constructor
# new MessagePrompt()
Members
# InstructionType :Number
The instruction types available for a prompt to explain.
Type:
- Number
Methods
# (async, static) instructionPrompt(promptInfo, instructionTypeopt, amountopt) → {Promise.<Message>}
Message prompt with custom prompt message depending on responseType.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
promptInfo |
PromptInfo | |||
instructionType |
InstructionType |
<optional> |
the type of response, one of string, number, boolean, mention | |
amount |
Number |
<optional> |
Infinity |
Throws:
-
-
if the user does not respond within the given time.
- Type
- TimeOutError
-
-
-
if the user cancels the prompt.
- Type
- CancelError
-
Returns:
- the message response to the prompt or false if it timed out!
- Type
- Promise.<Message>
# (async, static) prompt(promptInfo) → {Promise.<Message>}
Simple message prompt.
Parameters:
Name | Type | Description |
---|---|---|
promptInfo |
PromptInfo | the common data, prompt, channel, userId |
Throws:
-
-
if the user does not respond within the given time.
- Type
- TimeOutError
-
-
-
if the user cancels the prompt.
- Type
- CancelError
-
Returns:
- the message response to the prompt or false if it timed out!
- Type
- Promise.<Message>