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 booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.IntegergetCount()X subscriptions giftedjava.lang.StringgetSubscriptionPlan()The Subscriptionjava.lang.IntegergetTotalCount()X subscriptions gifted totallycom.github.twitch4j.common.events.domain.EventUsergetUser()Event Target UserinthashCode()java.lang.StringtoString()Methods inherited from class com.github.twitch4j.chat.events.AbstractChannelEvent
ban, getChannel, timeout, unbanMethods 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
-
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 subscriptionssubscriptionPlan- The subscription plancount- The total amount of subs giftedtotalCount- 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:
equalsin classAbstractChannelEvent
-
canEqual
protected boolean canEqual(java.lang.Object other)- Overrides:
canEqualin classAbstractChannelEvent
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractChannelEvent
-
toString
public java.lang.String toString()- Overrides:
toStringin classAbstractChannelEvent
-