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,MirrorableEvent
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
ConstructorsConstructorDescriptionGiftSubscriptionsEvent(IRCMessageEvent event, EventChannel channel, EventUser user, String subscriptionPlan, int count, int totalCount, String giftId) Event Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanintgetCount()X subscriptions giftedA unique identifier that links the community gift event to each individual recipient gifted event.Raw Message EventDeprecated.getTier()intX subscriptions gifted totallygetUser()Event Target UserinthashCode()toString()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, waitMethods inherited from interface com.github.twitch4j.chat.events.channel.MirrorableEvent
getSourceBadgeInfo, getSourceBadges, getSourceChannelId, getSourceMessageId, getSourceNoticeType, isMirrored
-
Constructor Details
-
GiftSubscriptionsEvent
@Internal public GiftSubscriptionsEvent(IRCMessageEvent event, EventChannel channel, EventUser user, String subscriptionPlan, int count, int totalCount, String giftId) Event Constructor- Parameters:
event- The raw message eventchannel- 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
-
getSubscriptionPlan
Deprecated.in favor ofgetTier()- Returns:
- the raw subscription plan
-
getTier
- Returns:
- the tier of the subscription that was gifted
-
getMessageEvent
Raw Message Event- Specified by:
getMessageEventin interfaceMirrorableEvent- Returns:
- the raw message event
-
getUser
Event Target User -
getCount
public int getCount()X subscriptions gifted -
getTotalCount
public int getTotalCount()X subscriptions gifted totally -
getGiftId
A unique identifier that links the community gift event to each individual recipient gifted event. -
equals
- Overrides:
equalsin classAbstractChannelEvent
-
canEqual
- Overrides:
canEqualin classAbstractChannelEvent
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractChannelEvent
-
toString
- Overrides:
toStringin classAbstractChannelEvent
-
getTier()