Klasse SubscriptionEvent
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.SubscriptionEvent
- Alle implementierten Schnittstellen:
com.github.philippheuer.events4j.api.domain.IEvent,ReplyableEvent
This event gets called when a user gets a new subscriber or a user resubscribes.
This event will be called simultaneously with the chat announcement, not necessary when the user presses the subscription button.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungSubscriptionEvent(IRCMessageEvent event, EventChannel channel, EventUser user, String subPlan, Optional<String> message, Integer months, Boolean gifted, EventUser giftedBy, Integer subStreak, Integer giftMonths, Integer multiMonthDuration, Integer multiMonthTenure, List<AutoModFlag> flags) Event Constructor -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected booleanbooleangetFlags()The regions ofgetMessage()that were flagged by AutoMod (Unofficial)Was this sub gifted?User that gifted the subThe number of months gifted as part of a single, multi-month giftSubscription MessageRaw IRC Message EventCumulative months subscribedThe number of subscription months just purchased.The length of multi-month subscription tenure that has already been served.Subscription Plan, in enum formSubscription PlanVeraltet.will be removed in favor of .getSubPlan()Consecutive months subscribedgetUser()Event Target UserinthashCode()voidreply(ITwitchChat chat, String message) Replies to this sub event, if a message was included when the subscription was shared.toString()Von Klasse geerbte Methoden com.github.twitch4j.chat.events.AbstractChannelEvent
ban, getChannel, timeout, unbanVon Klasse geerbte Methoden com.github.twitch4j.chat.events.TwitchEvent
getTwitchChatVon Klasse geerbte Methoden com.github.philippheuer.events4j.core.domain.Event
getEventId, getFiredAt, getFiredAtInstant, getServiceMediator, setEventId, setFiredAt, setFiredAtInstant, setServiceMediatorVon Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden com.github.twitch4j.chat.events.channel.ReplyableEvent
getChannel
-
Konstruktordetails
-
SubscriptionEvent
public SubscriptionEvent(IRCMessageEvent event, EventChannel channel, EventUser user, String subPlan, Optional<String> message, Integer months, Boolean gifted, EventUser giftedBy, Integer subStreak, Integer giftMonths, Integer multiMonthDuration, Integer multiMonthTenure, List<AutoModFlag> flags) Event Constructor- Parameter:
event- The raw message event.channel- ChatChannel the user subscribed touser- User that subscribedsubPlan- Sub Planmessage- Sub Messagemonths- Cumulative number of months user has been subscribed (not consecutive)gifted- Is gifted?giftedBy- User that gifted the subsubStreak- Consecutive number of months user has been subscribed (not cumulative); 0 if no streak or user chooses not to share their streakgiftMonths- The number of months gifted as part of a single, multi-month giftmultiMonthDuration- The number of subscription months just purchasedmultiMonthTenure- The length of multi-month subscription tenure that has already been servedflags- The regions of the message that were flagged by AutoMod.
-
-
Methodendetails
-
reply
Replies to this sub event, if a message was included when the subscription was shared.Sends a reply to this chat message.
- Angegeben von:
replyin SchnittstelleReplyableEvent- Parameter:
chat- theITwitchChatinstance to send the message from.message- the message to be sent.
-
getSubscriptionPlanName
Veraltet.will be removed in favor of .getSubPlan()Gets the Subscription Plan- Gibt zurück:
- SubscriptionPlan
-
getMessageEvent
Raw IRC Message Event- Angegeben von:
getMessageEventin SchnittstelleReplyableEvent
-
getUser
Event Target User -
getSubscriptionPlan
Subscription Plan -
getMessage
Subscription Message -
getMonths
Cumulative months subscribed -
getGifted
Was this sub gifted? -
getGiftedBy
User that gifted the sub -
getSubStreak
Consecutive months subscribed -
getGiftMonths
The number of months gifted as part of a single, multi-month gift -
getMultiMonthDuration
The number of subscription months just purchased. (Unofficial) -
getMultiMonthTenure
The length of multi-month subscription tenure that has already been served. Can be null for gifts. (Unofficial) -
getFlags
The regions ofgetMessage()that were flagged by AutoMod (Unofficial) -
equals
- Setzt außer Kraft:
equalsin KlasseAbstractChannelEvent
-
canEqual
- Setzt außer Kraft:
canEqualin KlasseAbstractChannelEvent
-
hashCode
public int hashCode()- Setzt außer Kraft:
hashCodein KlasseAbstractChannelEvent
-
toString
- Setzt außer Kraft:
toStringin KlasseAbstractChannelEvent
-
getSubPlan
Subscription Plan, in enum form
-