Package io.manebot.chat
Class BasicTextChatMessage
- java.lang.Object
-
- io.manebot.chat.AbstractChatMessage
-
- io.manebot.chat.AbstractTextChatMessage
-
- io.manebot.chat.BasicTextChatMessage
-
- All Implemented Interfaces:
ChatMessage
public class BasicTextChatMessage extends AbstractTextChatMessage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBasicTextChatMessage.Builder
-
Constructor Summary
Constructors Constructor Description BasicTextChatMessage(ChatSender sender, java.lang.String message)
-
Method Summary
Modifier and Type Method Description voiddelete()Deletes the message.ChatMessageedit(java.util.function.Consumer<ChatMessage.Builder> function)Edits the message to match the provided message.java.util.DategetEditedDate()Gets the time at which the message was edited.booleanwasEdited()Finds if the message was edited.-
Methods inherited from class io.manebot.chat.AbstractTextChatMessage
getEmbeds, getMessage
-
Methods inherited from class io.manebot.chat.AbstractChatMessage
getDate, getSender
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.manebot.chat.ChatMessage
doesMentionSelf, edit, getMentions, getRawMessage
-
-
-
-
Constructor Detail
-
BasicTextChatMessage
public BasicTextChatMessage(ChatSender sender, java.lang.String message)
-
-
Method Detail
-
delete
public void delete() throws java.lang.UnsupportedOperationExceptionDescription copied from interface:ChatMessageDeletes the message.- Throws:
java.lang.UnsupportedOperationException
-
edit
public ChatMessage edit(java.util.function.Consumer<ChatMessage.Builder> function) throws java.lang.UnsupportedOperationException
Description copied from interface:ChatMessageEdits the message to match the provided message.- Parameters:
function- function to express a new message.- Returns:
- edited message.
- Throws:
java.lang.UnsupportedOperationException
-
wasEdited
public boolean wasEdited()
Description copied from interface:ChatMessageFinds if the message was edited.- Returns:
- true if the message was edited, false otherwise.
-
getEditedDate
public java.util.Date getEditedDate()
Description copied from interface:ChatMessageGets the time at which the message was edited.- Returns:
- edited date.
-
-