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
,ReplyableEvent
This event gets called when a message is received in a channel.
-
Constructor Summary
ConstructorDescriptionChannelMessageEvent
(EventChannel channel, IRCMessageEvent messageEvent, EventUser user, String message) Event Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
@Nullable ChatCrowdChant
Deprecated.Will be disabled on 2022-02-02Hype Chat Contribution@Nullable ChatReply
Information regarding the parent message being replied to, if applicable.boolean
int
hashCode()
boolean
boolean
boolean
boolean
boolean
toString()
Methods inherited from class com.github.twitch4j.chat.events.AbstractChannelMessageEvent
getFlags, getMessage, getMessageEvent, getNonce, getPermissions, getSubscriberMonths, getSubscriptionTier, getUser
Methods inherited from class com.github.twitch4j.chat.events.AbstractChannelEvent
ban, getChannel, timeout, unban
Methods inherited from class com.github.twitch4j.chat.events.TwitchEvent
getTwitchChat
Methods inherited from class com.github.philippheuer.events4j.core.domain.Event
getEventId, getFiredAt, getFiredAtInstant, getServiceMediator, setEventId, setFiredAt, setFiredAtInstant, setServiceMediator
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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 "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
HypeChatLevel
associated with the hype chat contribution. - See Also:
-
toString
- Overrides:
toString
in classAbstractChannelMessageEvent
-
equals
- Overrides:
equals
in classAbstractChannelMessageEvent
-
canEqual
- Overrides:
canEqual
in classAbstractChannelMessageEvent
-
hashCode
public int hashCode()- Overrides:
hashCode
in 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.
-