Package com.github.twitch4j.common.util
Class ChatReply
java.lang.Object
com.github.twitch4j.common.util.ChatReply
@Unofficial public final class ChatReply extends java.lang.Object
Meta-info regarding the parent message being replied to.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringREPLY_MSG_ID_TAG_NAME -
Constructor Summary
Constructors Constructor Description ChatReply(@NonNull java.lang.String messageId, java.lang.String messageBody, java.lang.String userId, java.lang.String userLogin, java.lang.String displayName) -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetDisplayName()The display name of the user who originally sent the message being replied to.java.lang.StringgetMessageBody()The text of the original message being replied to.@NonNull java.lang.StringgetMessageId()The msgId of the original message being replied to.java.lang.StringgetUserId()The id of the user who originally sent the message being replied to.java.lang.StringgetUserLogin()The login name of the user who originally sent the message being replied to.inthashCode()static ChatReplyparse(java.util.Map<java.lang.String,java.lang.String> tags)Attempts to parse aChatReplyinstance from chat tags.java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
REPLY_MSG_ID_TAG_NAME
public static final java.lang.String REPLY_MSG_ID_TAG_NAME- See Also:
- Constant Field Values
-
-
Constructor Details
-
ChatReply
public ChatReply(@NonNull @NonNull java.lang.String messageId, java.lang.String messageBody, java.lang.String userId, java.lang.String userLogin, java.lang.String displayName)
-
-
Method Details
-
parse
Attempts to parse aChatReplyinstance from chat tags.- Parameters:
tags- the message tags associated with a reply.- Returns:
- the parsed
ChatReply, or null if unsuccessful
-
getMessageId
@NonNull public @NonNull java.lang.String getMessageId()The msgId of the original message being replied to. -
getMessageBody
public java.lang.String getMessageBody()The text of the original message being replied to. -
getUserId
public java.lang.String getUserId()The id of the user who originally sent the message being replied to. -
getUserLogin
public java.lang.String getUserLogin()The login name of the user who originally sent the message being replied to. -
getDisplayName
public java.lang.String getDisplayName()The display name of the user who originally sent the message being replied to. -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-