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
Modifier and TypeClassDescriptionstatic enum
The possible chat room settings that can be configured. -
Constructor Summary
ConstructorDescriptionChannelStateEvent
(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 boolean
boolean
@Nullable Object
getState
(@NotNull ChannelStateEvent.ChannelState state) Contains the singular chat room setting that was updated (or all chat room settings upon joining the channel).int
hashCode()
toString()
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
-
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:
toString
in classAbstractChannelEvent
-
equals
- Overrides:
equals
in classAbstractChannelEvent
-
canEqual
- Overrides:
canEqual
in classAbstractChannelEvent
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractChannelEvent
-