Class ChannelStateEvent
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.ChannelStateEvent
- All Implemented Interfaces:
com.github.philippheuer.events4j.api.domain.IEvent
Called upon successfully joining a channel, or when a moderator updates a public chat room setting.
This event corresponds to ROOMSTATE over IRC.
When inspecting the updated setting values, it is easier to utilize these individual events:
EmoteOnlyEvent,
FollowersOnlyEvent,
Robot9000Event,
SlowModeEvent,
SubscribersOnlyEvent.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe possible chat room settings that can be configured. -
Constructor Summary
ConstructorsConstructorDescriptionChannelStateEvent(EventChannel channel, ChannelStateEvent.ChannelState state, Object value) Deprecated.unused by Twitch4JChannelStateEvent(EventChannel channel, Map<ChannelStateEvent.ChannelState, Object> states) Event Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanboolean@Nullable ObjectgetState(@NotNull ChannelStateEvent.ChannelState state) Contains the singular chat room setting that was updated (or all chat room settings upon joining the channel).inthashCode()toString()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, setServiceMediator
-
Constructor Details
-
ChannelStateEvent
@Deprecated public ChannelStateEvent(EventChannel channel, ChannelStateEvent.ChannelState state, Object value) Deprecated.unused by Twitch4JEvent Constructor- Parameters:
channel- The channel that this event originates from.state- The changed state triggering the eventvalue- The value representing the state
-
ChannelStateEvent
Event Constructor- Parameters:
channel- The channel that this event originates from.states- The chat room settings.
-
-
Method Details
-
getState
- Parameters:
state- a chat room setting to query- Returns:
- the latest value for the setting if it was just adjusted
-
getStates
Contains the singular chat room setting that was updated (or all chat room settings upon joining the channel). -
toString
- Overrides:
toStringin classAbstractChannelEvent
-
equals
- Overrides:
equalsin classAbstractChannelEvent
-
canEqual
- Overrides:
canEqualin classAbstractChannelEvent
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractChannelEvent
-