Class RewardGiftEvent
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.RewardGiftEvent
- All Implemented Interfaces:
com.github.philippheuer.events4j.api.domain.IEvent
public final class RewardGiftEvent extends AbstractChannelEvent
Called when a monetary event (e.g. sub gift or cheer) results in rewards (e.g. emotes) being shared with others.
-
Constructor Summary
Constructors Constructor Description RewardGiftEvent(com.github.twitch4j.common.events.domain.EventChannel channel, com.github.twitch4j.common.events.domain.EventUser user, java.lang.String domain, java.lang.String triggerType, java.lang.Integer selectedCount, java.lang.Integer totalRewardCount, java.lang.Integer triggerAmount)Event Constructor -
Method Summary
Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.StringgetDomain()The domain of the rewards being gifted (e.g.java.lang.IntegergetSelectedCount()The number of gifted rewards as part of the primary selection.java.lang.IntegergetTotalRewardCount()The total number of rewards being gifted (e.g. 5 emotes).java.lang.IntegergetTriggerAmount()The number of instances of the trigger (e.g. 1 sub gift or 300 bits).java.lang.StringgetTriggerType()The type of monetary event that triggered the reward gift (e.g., "SUBGIFT", "CHEER").com.github.twitch4j.common.events.domain.EventUsergetUser()The user that triggered this event.inthashCode()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
-
RewardGiftEvent
public RewardGiftEvent(com.github.twitch4j.common.events.domain.EventChannel channel, com.github.twitch4j.common.events.domain.EventUser user, java.lang.String domain, java.lang.String triggerType, java.lang.Integer selectedCount, java.lang.Integer totalRewardCount, java.lang.Integer triggerAmount)Event Constructor- Parameters:
channel- The channel that this event originates from.user- The user that triggered this event.domain- The domain of the rewards being gifted.triggerType- The type of monetary event that triggered the reward gift.selectedCount- The number of gifted rewards as part of the primary selection.totalRewardCount- The total number of rewards being gifted.triggerAmount- The number of instances of the trigger.
-
-
Method Details
-
getUser
public com.github.twitch4j.common.events.domain.EventUser getUser()The user that triggered this event. -
getDomain
public java.lang.String getDomain()The domain of the rewards being gifted (e.g. "pride_megacommerce_2020"). -
getTriggerType
public java.lang.String getTriggerType()The type of monetary event that triggered the reward gift (e.g., "SUBGIFT", "CHEER"). -
getSelectedCount
public java.lang.Integer getSelectedCount()The number of gifted rewards as part of the primary selection. -
getTotalRewardCount
public java.lang.Integer getTotalRewardCount()The total number of rewards being gifted (e.g. 5 emotes). -
getTriggerAmount
public java.lang.Integer getTriggerAmount()The number of instances of the trigger (e.g. 1 sub gift or 300 bits). -
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
-