Package com.github.twitch4j.chat.events
Class AbstractChannelEvent
java.lang.Object
com.github.philippheuer.events4j.core.domain.Event
com.github.twitch4j.chat.events.TwitchEvent
com.github.twitch4j.chat.events.AbstractChannelEvent
- All Implemented Interfaces:
com.github.philippheuer.events4j.api.domain.IEvent
- Direct Known Subclasses:
BitsBadgeEarnedEvent,ChannelJoinEvent,ChannelLeaveEvent,ChannelMessageActionEvent,ChannelMessageEvent,ChannelModEvent,ChannelNoticeEvent,ChannelStateEvent,ChannelStatesEvent,CheerEvent,ClearChatEvent,DonationEvent,ExtendSubscriptionEvent,FollowEvent,GiftSubscriptionsEvent,GiftSubUpgradeEvent,HostOnEvent,ListModsEvent,ListVipsEvent,MessageDeleteError,MessageDeleteSuccess,PayForwardEvent,PrimeGiftReceivedEvent,PrimeSubUpgradeEvent,RaidCancellationEvent,RaidEvent,RewardGiftEvent,RitualEvent,SubscriptionEvent,UserBanEvent,UserStateEvent,UserTimeoutEvent
public class AbstractChannelEvent extends TwitchEvent
This event is a base for events that originate from a channel
-
Constructor Summary
Constructors Constructor Description AbstractChannelEvent(com.github.twitch4j.common.events.domain.EventChannel channel)Event Constructor -
Method Summary
Modifier and Type Method Description voidban(java.lang.String user, java.lang.String reason)Ban a userprotected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)com.github.twitch4j.common.events.domain.EventChannelgetChannel()Event ChannelinthashCode()voidtimeout(java.lang.String user, java.time.Duration duration, java.lang.String reason)Timeout a userjava.lang.StringtoString()voidunban(java.lang.String user)Unban a userMethods 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
-
AbstractChannelEvent
public AbstractChannelEvent(com.github.twitch4j.common.events.domain.EventChannel channel)Event Constructor- Parameters:
channel- The channel that this event originates from.
-
-
Method Details
-
timeout
public void timeout(java.lang.String user, java.time.Duration duration, java.lang.String reason)Timeout a user- Parameters:
user- usernameduration- durationreason- reason
-
ban
public void ban(java.lang.String user, java.lang.String reason)Ban a user- Parameters:
user- usernamereason- reason
-
unban
public void unban(java.lang.String user)Unban a user- Parameters:
user- username
-
toString
public java.lang.String toString()- Overrides:
toStringin classTwitchEvent
-
getChannel
public com.github.twitch4j.common.events.domain.EventChannel getChannel()Event Channel -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classTwitchEvent
-
canEqual
protected boolean canEqual(java.lang.Object other)- Overrides:
canEqualin classTwitchEvent
-
hashCode
public int hashCode()- Overrides:
hashCodein classTwitchEvent
-