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 boolean
boolean
int
getCount()
X subscriptions giftedA unique identifier that links the community gift event to each individual recipient gifted event.Raw Message EventDeprecated.getTier()
int
X subscriptions gifted totallygetUser()
Event Target Userint
hashCode()
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
Methods 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:
getMessageEvent
in 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:
equals
in classAbstractChannelEvent
-
canEqual
- Overrides:
canEqual
in classAbstractChannelEvent
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractChannelEvent
-
toString
- Overrides:
toString
in classAbstractChannelEvent
-
getTier()