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
    void ban​(java.lang.String user, java.lang.String reason)
    Ban a user
    protected boolean canEqual​(java.lang.Object other)  
    boolean equals​(java.lang.Object o)  
    com.github.twitch4j.common.events.domain.EventChannel getChannel()
    Event Channel
    int hashCode()  
    void timeout​(java.lang.String user, java.time.Duration duration, java.lang.String reason)
    Timeout a user
    java.lang.String toString()  
    void unban​(java.lang.String user)
    Unban a user

    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
  • 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 - username
      duration - duration
      reason - reason
    • ban

      public void ban​(java.lang.String user, java.lang.String reason)
      Ban a user
      Parameters:
      user - username
      reason - reason
    • unban

      public void unban​(java.lang.String user)
      Unban a user
      Parameters:
      user - username
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class TwitchEvent
    • getChannel

      public com.github.twitch4j.common.events.domain.EventChannel getChannel()
      Event Channel
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class TwitchEvent
    • canEqual

      protected boolean canEqual​(java.lang.Object other)
      Overrides:
      canEqual in class TwitchEvent
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class TwitchEvent