Package io.manebot.chat
Interface ChatMessage.Builder
-
- All Known Implementing Classes:
BasicTextChatMessage.Builder
- Enclosing interface:
- ChatMessage
public static interface ChatMessage.Builder
-
-
Method Summary
Modifier and Type Method Description ChatMessage.Builder
embed(java.util.function.Consumer<ChatEmbed.Builder> function)
Appends an abstract embed to the message.Chat
getChat()
Gets the chat associated with building this message.PlatformUser
getUser()
Gets the platform user that will be sending this message.default ChatMessage.Builder
message(java.lang.String message)
Sets the message to get on this chat message.default ChatMessage.Builder
message(java.util.function.Consumer<TextBuilder> function)
Sets the message to get on this chat message.ChatMessage.Builder
rawMessage(java.lang.String message)
Sets the raw message to get on this chat message.
-
-
-
Method Detail
-
getUser
PlatformUser getUser()
Gets the platform user that will be sending this message.- Returns:
- platform user sending the message.
-
getChat
Chat getChat()
Gets the chat associated with building this message.- Returns:
- Chat instance.
-
rawMessage
ChatMessage.Builder rawMessage(java.lang.String message)
Sets the raw message to get on this chat message.- Parameters:
message
- raw message to set.- Returns:
- Builder instance.
-
message
default ChatMessage.Builder message(java.lang.String message)
Sets the message to get on this chat message.- Parameters:
message
- message to set.- Returns:
- Builder instance.
-
message
default ChatMessage.Builder message(java.util.function.Consumer<TextBuilder> function)
Sets the message to get on this chat message.- Parameters:
function
- message formatter function to use.- Returns:
- Builder instance.
-
embed
ChatMessage.Builder embed(java.util.function.Consumer<ChatEmbed.Builder> function) throws java.lang.UnsupportedOperationException
Appends an abstract embed to the message.- Parameters:
function
- embed to append.- Returns:
- Builder instance.
- Throws:
java.lang.UnsupportedOperationException
- if embeds are not supported in this chat.
-
-