Package io.manebot.user
Interface UserPrompt.Builder
-
- Enclosing interface:
- UserPrompt
public static interface UserPrompt.Builder
-
-
Method Summary
Modifier and Type Method Description User
getCaller()
Gets the user that is constructing this prompt.User
getUser()
Gets the user that the prompt will be for.UserPrompt.Builder
setCallback(ThrowingConsumer<UserPrompt,CommandExecutionException> callback)
Applies the designated callback to the prompt.default UserPrompt.Builder
setDescription(java.lang.String description)
Sets the description of the prompt.UserPrompt.Builder
setDescription(java.util.function.Consumer<TextBuilder> textBuilder)
Sets the description of the prompt.UserPrompt.Builder
setName(java.lang.String name)
Sets the name, or title, of the prompt.
-
-
-
Method Detail
-
getUser
User getUser()
Gets the user that the prompt will be for.- Returns:
- user.
-
getCaller
User getCaller()
Gets the user that is constructing this prompt.- Returns:
- caller.
-
setName
UserPrompt.Builder setName(java.lang.String name)
Sets the name, or title, of the prompt.- Parameters:
name
- name, or title, of the prompt.- Returns:
- Builder instance.
-
setDescription
default UserPrompt.Builder setDescription(java.lang.String description)
Sets the description of the prompt.- Parameters:
description
- description of the prompt.- Returns:
- Builder instance.
-
setDescription
UserPrompt.Builder setDescription(java.util.function.Consumer<TextBuilder> textBuilder)
Sets the description of the prompt.- Parameters:
textBuilder
- TextBuilder instance to format the description of the prompt.- Returns:
- Builder instance.
-
setCallback
UserPrompt.Builder setCallback(ThrowingConsumer<UserPrompt,CommandExecutionException> callback)
Applies the designated callback to the prompt.- Parameters:
callback
- callback to use for the prompt.- Returns:
- Builder instance.
-
-