Class ChannelModerate

java.lang.Object
com.gmt2001.twitch.eventsub.EventSubSubscriptionType
com.gmt2001.twitch.eventsub.subscriptions.channel.ChannelModerate
All Implemented Interfaces:
Flow.Subscriber<EventSubInternalEvent>

public final class ChannelModerate extends EventSubSubscriptionType
A moderator command has been executed.
Author:
gmt2001
  • Field Details

  • Constructor Details

    • ChannelModerate

      public ChannelModerate()
      Only used by EventSub for handler registration
    • ChannelModerate

      public ChannelModerate(EventSubInternalNotificationEvent e)
      Parameters:
      e - The event
    • ChannelModerate

      public ChannelModerate(String broadcaster_user_id)
      Constructor
      Parameters:
      broadcaster_user_id - The user id of the broadcaster
    • ChannelModerate

      public ChannelModerate(String broadcaster_user_id, String moderator_user_id)
      Constructor
      Parameters:
      broadcaster_user_id - The user id of the broadcaster
      moderator_user_id - The ID of the moderator of the channel you want to get notifications for. If you have authorization from the broadcaster rather than a moderator, specify the broadcaster's user ID here
  • Method Details

    • proposeSubscription

      protected EventSubSubscription proposeSubscription()
      Description copied from class: EventSubSubscriptionType
      Compiles the parameters of this object into an EventSubSubscription that can be created
      Specified by:
      proposeSubscription in class EventSubSubscriptionType
      Returns:
    • validateParameters

      protected void validateParameters() throws IllegalArgumentException
      Description copied from class: EventSubSubscriptionType
      Validates that the provided parameters are acceptable for use in EventSubSubscriptionType.proposeSubscription()
      Specified by:
      validateParameters in class EventSubSubscriptionType
      Throws:
      IllegalArgumentException - One of the parameters is not acceptable
    • onEventSubInternalNotificationEvent

      protected void onEventSubInternalNotificationEvent(EventSubInternalNotificationEvent e)
      Overrides:
      onEventSubInternalNotificationEvent in class EventSubSubscriptionType
    • isMatch

      protected boolean isMatch(EventSubSubscription subscription)
      Description copied from class: EventSubSubscriptionType
      Returns true if the provided subscription is an instance of the current subscription type and matches the current subscription conditions
      Specified by:
      isMatch in class EventSubSubscriptionType
      Returns:
    • broadcasterUserId

      public String broadcasterUserId()
      The broadcaster's user ID.
      Returns:
    • broadcasterUserLogin

      public String broadcasterUserLogin()
      The broadcaster's user login.
      Returns:
    • broadcasterUserName

      public String broadcasterUserName()
      The broadcaster's user display name.
      Returns:
    • moderatorUserId

      public String moderatorUserId()
      The executing moderator's user ID.
      Returns:
    • moderatorUserLogin

      public String moderatorUserLogin()
      The executing moderator's user login.
      Returns:
    • moderatorUserName

      public String moderatorUserName()
      The executing moderator's user display name.
      Returns:
    • action

      public String action()
      The action that was executed.

      Known actions:

      • ban
      • unban
      • timeout
      • untimeout
      • clear
      • delete
      • emoteonly
      • emoteonlyoff
      • followers
      • followersoff
      • uniquechat
      • uniquechatoff
      • slow
      • slowoff
      • subscribers
      • subscribersoff
      • raid
      • unraid
      • add_blocked_term
      • remove_blocked_term
      • add_permitted_term
      • remove_permitted_term
      • approve_unban_request
      • deny_unban_request
      • mod
      • unmod
      • vip
      • unvip

      Returns:
    • followers

      public FollowerModeData followers()
      The minimum follow time for followers mode. Available when action() is followers
      Returns:
    • slow

      public SlowModeData slow()
      The minimum time between messages for followers mode. Available when action() is slow
      Returns:
    • vip

      public UserData vip()
      The user who was added as VIP. Available when action() is vip
      Returns:
    • unvip

      public UserData unvip()
      The user who was removed from VIP. Available when action() is unvip
      Returns:
    • mod

      public UserData mod()
      The user who was added as mod. Available when action() is mod
      Returns:
    • unmod

      public UserData unmod()
      The user who was removed from mod. Available when action() is unmod
      Returns:
    • ban

      public BanData ban()
      The user who was banned. Available when action() is ban
      Returns:
    • unban

      public UserData unban()
      The user who was unbanned. Available when action() is unban
      Returns:
    • timeout

      public TimeoutData timeout()
      The user who was timed out. Available when action() is timeout
      Returns:
    • untimeout

      public UserData untimeout()
      The user who was removed from timeout. Available when action() is untimeout
      Returns:
    • raid

      public RaidData raid()
      The user who was raided and initial raider count. Available when action() is raid
      Returns:
    • unraid

      public UserData unraid()
      The user who is no longer being raided. Available when action() is unraid
      Returns:
    • deleteData

      public DeleteData deleteData()
      The user and message being deleted. Available when action() is delete
      Returns:
    • automodTerms

      public AutomodTermsData automodTerms()
      The data about terms being added or removed from automod. Available when action() is add_blocked_term, remove_blocked_term, add_permitted_term, or remove_permitted_term
      Returns:
    • unbanRequest

      public UnbanRequestData unbanRequest()
      The data about the updated unban request. Available when action() is approve_unban_request or deny_unban_request
      Returns: