Class UserStateEvent
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.channel.UserStateEvent
- All Implemented Interfaces:
com.github.philippheuer.events4j.api.domain.IEvent
public final class UserStateEvent extends AbstractChannelEvent
This event gets called when a user joins a channel or sends a PRIVMSG to a channel.
-
Constructor Summary
Constructors Constructor Description UserStateEvent(IRCMessageEvent messageEvent)Event constructor -
Method Summary
Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.util.Optional<java.lang.String>getColor()java.util.Optional<java.lang.String>getDisplayName()java.util.List<java.lang.String>getEmoteSets()List of emote sets.IRCMessageEventgetMessageEvent()RAW Message Eventjava.util.OptionalIntgetSubscriberMonth()inthashCode()booleanisBroadcaster()booleanisModerator()booleanisPrimeOrTurbo()booleanisStaff()booleanisSubscriber()java.lang.StringtoString()Methods 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, wait
-
Constructor Details
-
UserStateEvent
Event constructor- Parameters:
messageEvent- raw message event
-
-
Method Details
-
getColor
public java.util.Optional<java.lang.String> getColor()- Returns:
- Hexadecimal RGB color code, or empty if it is never set
-
getDisplayName
public java.util.Optional<java.lang.String> getDisplayName()- Returns:
- The user's display name, or empty if it is never set
-
isSubscriber
public boolean isSubscriber()- Returns:
- true if user is subscribed, false otherwise
-
getSubscriberMonth
public java.util.OptionalInt getSubscriberMonth()- Returns:
- number of months the user has been a subscriber, or empty if they are not subscribed
-
isBroadcaster
public boolean isBroadcaster()- Returns:
- true if user is broadcaster, false otherwise
-
isModerator
public boolean isModerator()- Returns:
- true if user is moderator, false otherwise
-
isStaff
public boolean isStaff()- Returns:
- true if user is staff, false otherwise
-
isPrimeOrTurbo
public boolean isPrimeOrTurbo()- Returns:
- true if user have prime or turbo badge, false otherwise
-
toString
public java.lang.String toString()- Overrides:
toStringin classAbstractChannelEvent
-
getMessageEvent
RAW Message Event -
getEmoteSets
public java.util.List<java.lang.String> getEmoteSets()List of emote sets. -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classAbstractChannelEvent
-
canEqual
protected boolean canEqual(java.lang.Object other)- Overrides:
canEqualin classAbstractChannelEvent
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractChannelEvent
-