Constructor
# new SpecialPrompt()
Methods
# (async, static) boolean(promptInfo) → {Promise.<Boolean>}
Prompts the user for a yes/no prompt to return a boolean.
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.<Boolean>
# (async, static) multiReaction(promptInfo, amount) → {Promise.<Collection.<String, MessageReaction>>}
Prompts the user to react to a message with a specific amount of reactions.
Parameters:
Name | Type | Description |
---|---|---|
promptInfo |
PromptInfo | cancelable is not used! User can not cancel this prompt! |
amount |
Number | the amount of reactions to prompt and wait for. |
Throws:
-
if the user takes longer than the given time to react
- Type
- TimeOutError
Returns:
- Type
- Promise.<Collection.<String, MessageReaction>>
# (async, static) singleEmoji(promptInfo) → {Promise.<(GuildEmoji|ReactionEmoji)>}
Returns the emoji from a single reaction prompt.
Parameters:
Name | Type | Description |
---|---|---|
promptInfo |
PromptInfo |
Throws:
-
if the user takes longer than the given time to react
- Type
- TimeOutError
Returns:
- Type
- Promise.<(GuildEmoji|ReactionEmoji)>
# (async, static) singleReaction(promptInfo) → {Promise.<MessageReaction>}
Prompts the user for one emoji by reacting to a message.
Parameters:
Name | Type | Description |
---|---|---|
promptInfo |
PromptInfo | cancelable is not used! user can not cancel this prompt! |
Throws:
-
if the user takes longer than the given time to react
- Type
- TimeOutError
Returns:
- Type
- Promise.<MessageReaction>
# (async, static) singleRestrictedEmoji(promptInfo, unavailableEmojis) → {Promise.<(GuildEmoji|ReactionEmoji)>}
Returns the emoji from a single restricted reaction prompt.
Parameters:
Name | Type | Description |
---|---|---|
promptInfo |
PromptInfo | |
unavailableEmojis |
Collection.<String, *> |
Throws:
-
if the user takes longer than the given time to react
- Type
- TimeOutError
Returns:
- Type
- Promise.<(GuildEmoji|ReactionEmoji)>
# (async, static) singleRestrictedReaction(promptInfo, unavailableEmojis) → {Promise.<MessageReaction>}
Prompts the user for an emoji. If the emoji is part of the unavailable emojis, they will be re-prompted.
Parameters:
Name | Type | Description |
---|---|---|
promptInfo |
PromptInfo | |
unavailableEmojis |
Collection.<String, *> |
Throws:
-
if the user takes longer than the given time to react
- Type
- TimeOutError
Returns:
- Type
- Promise.<MessageReaction>