Package com.github.twitch4j.chat.util
Class ChatCrowdChant
java.lang.Object
com.github.twitch4j.chat.util.ChatCrowdChant
@Unofficial
public final class ChatCrowdChant
extends java.lang.Object
Information regarding a Crowd Chant participation or initiation.
- See Also:
- Related Uservoice
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCHANT_MSG_ID_TAG_NAME -
Constructor Summary
Constructors Constructor Description ChatCrowdChant(java.lang.String messageId, java.lang.String text, boolean initiator, java.lang.String channelName) -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetMessageId()The id for the parent message in the Crowd Chant.java.lang.StringgetText()The text being chanted.inthashCode()booleanisInitiator()Whether this message initiated a crowd chat.static @Nullable ChatCrowdChantparse(IRCMessageEvent event)Attempts to parse theChatCrowdChantinformation from a chat event.voidparticipate(ITwitchChat chat)Sends the same message in the same channel to participate in the Crowd Chant, with the proper chat tag.java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
CHANT_MSG_ID_TAG_NAME
public static final java.lang.String CHANT_MSG_ID_TAG_NAME- See Also:
- Constant Field Values
-
-
Constructor Details
-
ChatCrowdChant
public ChatCrowdChant(java.lang.String messageId, java.lang.String text, boolean initiator, java.lang.String channelName)
-
-
Method Details
-
participate
Sends the same message in the same channel to participate in the Crowd Chant, with the proper chat tag.- Parameters:
chat- an authenticated TwitchChat instance.
-
parse
Attempts to parse theChatCrowdChantinformation from a chat event.- Parameters:
event- the raw IRCMessageEvent.- Returns:
- ChatCrowdChant (or null if parsing was unsuccessful)
-
getMessageId
public java.lang.String getMessageId()The id for the parent message in the Crowd Chant. -
getText
public java.lang.String getText()The text being chanted. -
isInitiator
public boolean isInitiator()Whether this message initiated a crowd chat. When false, the message is simply participating in the chant, rather than initiating. -
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
-