Class GiftSubscriptionsEvent

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.GiftSubscriptionsEvent
All Implemented Interfaces:
com.github.philippheuer.events4j.api.domain.IEvent

public final class GiftSubscriptionsEvent
extends AbstractChannelEvent
This event gets called when a user gifts x subscriptions to *random* users in chat.

This event will be called simultaneously with the chat announcement, not necessarily when the user presses the subscription button.

  • Constructor Summary

    Constructors
    Constructor Description
    GiftSubscriptionsEvent​(com.github.twitch4j.common.events.domain.EventChannel channel, com.github.twitch4j.common.events.domain.EventUser user, java.lang.String subscriptionPlan, java.lang.Integer count, java.lang.Integer totalCount)
    Event Constructor
  • Method Summary

    Modifier and Type Method Description
    protected boolean canEqual​(java.lang.Object other)  
    boolean equals​(java.lang.Object o)  
    java.lang.Integer getCount()
    X subscriptions gifted
    java.lang.String getSubscriptionPlan()
    The Subscription
    java.lang.Integer getTotalCount()
    X subscriptions gifted totally
    com.github.twitch4j.common.events.domain.EventUser getUser()
    Event Target User
    int hashCode()  
    java.lang.String 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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • GiftSubscriptionsEvent

      public GiftSubscriptionsEvent​(com.github.twitch4j.common.events.domain.EventChannel channel, com.github.twitch4j.common.events.domain.EventUser user, java.lang.String subscriptionPlan, java.lang.Integer count, java.lang.Integer totalCount)
      Event Constructor
      Parameters:
      channel - The channel that this event originates from.
      user - The user that gifted the subscriptions
      subscriptionPlan - The subscription plan
      count - The total amount of subs gifted
      totalCount - The amount the user gifted in total (all time)
  • Method Details

    • getUser

      public com.github.twitch4j.common.events.domain.EventUser getUser()
      Event Target User
    • getSubscriptionPlan

      public java.lang.String getSubscriptionPlan()
      The Subscription
    • getCount

      public java.lang.Integer getCount()
      X subscriptions gifted
    • getTotalCount

      public java.lang.Integer getTotalCount()
      X subscriptions gifted totally
    • equals

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

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

      public int hashCode()
      Overrides:
      hashCode in class AbstractChannelEvent
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class AbstractChannelEvent