Class ChannelMessageEvent
java.lang.Object
com.github.philippheuer.events4j.core.domain.Event
com.github.twitch4j.chat.events.TwitchEvent
com.github.twitch4j.chat.events.AbstractChannelEvent
com.github.twitch4j.chat.events.AbstractChannelMessageEvent
com.github.twitch4j.chat.events.channel.ChannelMessageEvent
- All Implemented Interfaces:
com.github.philippheuer.events4j.api.domain.IEvent,MirrorableEvent,ReplyableEvent
This event gets called when a message is received in a channel.
-
Constructor Summary
ConstructorsConstructorDescriptionChannelMessageEvent(EventChannel channel, IRCMessageEvent messageEvent, EventUser user, String message) Event Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanboolean@Nullable ChatCrowdChantDeprecated.Will be disabled on 2022-02-02Hype Chat Contribution@Nullable ChatReplyInformation regarding the parent message being replied to, if applicable.booleaninthashCode()booleanbooleanbooleanbooleanbooleantoString()Methods inherited from class com.github.twitch4j.chat.events.AbstractChannelMessageEvent
getFlags, getMessage, getMessageEvent, getNonce, getPermissions, getSubscriberMonths, getSubscriptionTier, getUserMethods inherited from class com.github.twitch4j.chat.events.AbstractChannelEvent
ban, getChannel, timeout, unbanMethods inherited from class com.github.twitch4j.chat.events.TwitchEvent
getTwitchChatMethods inherited from class com.github.philippheuer.events4j.core.domain.Event
getEventId, getFiredAt, getFiredAtInstant, getServiceMediator, setEventId, setFiredAt, setFiredAtInstant, setServiceMediatorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.twitch4j.chat.events.channel.MirrorableEvent
getSourceBadgeInfo, getSourceBadges, getSourceChannelId, getSourceMessageId, getSourceNoticeType, isMirroredMethods inherited from interface com.github.twitch4j.chat.events.channel.ReplyableEvent
getChannel, reply
-
Constructor Details
-
ChannelMessageEvent
public ChannelMessageEvent(EventChannel channel, IRCMessageEvent messageEvent, EventUser user, String message) Event Constructor- Parameters:
channel- The channel that this event originates from.messageEvent- The raw message eventuser- The user who triggered the event.message- The plain text of the message.
-
-
Method Details
-
isHighlightedMessage
- Returns:
- whether "Highlight My Message" was redeemed for this event
-
isSkipSubsModeMessage
- Returns:
- whether "Send a Message in Sub-Only Mode" was redeemed for this event
-
getCustomRewardId
- Returns:
- the id for the custom reward that was redeemed with this associated message, in an optional wrapper
-
isDesignatedFirstMessage
- Returns:
- whether this is the user's first message in the channel.
- See Also:
-
isUserIntroduction
- Returns:
- whether this message constitutes the user's designated introduction.
- See Also:
-
hasGiganticEmote
- Returns:
- whether the message is a "Gigantify an Emote" bits redemption
- See Also:
-
hasMessageEffects
- Returns:
- whether the message is a "Message Effects" bits redemption
- See Also:
-
getAnimationId
- Returns:
- returns the animation id associated with the "Message Effects" bits redemption. Possible values include "cosmic-abyss", "simmer", and "rainbow-eclipse".
- See Also:
-
getElevatedChatPayment
Hype Chat Contribution- Returns:
- the payment information related to this hype chat, if applicable.
- See Also:
-
getHypeChatLevel
- Returns:
- the
HypeChatLevelassociated with the hype chat contribution. - See Also:
-
toString
- Overrides:
toStringin classAbstractChannelMessageEvent
-
equals
- Overrides:
equalsin classAbstractChannelMessageEvent
-
canEqual
- Overrides:
canEqualin classAbstractChannelMessageEvent
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractChannelMessageEvent
-
getReplyInfo
Information regarding the parent message being replied to, if applicable. -
getChantInfo
Deprecated.Information regarding any associated Crowd Chant for this message, if applicable.
-