Class AutomodMessage
java.lang.Object
com.gmt2001.twitch.eventsub.EventSubSubscriptionType
com.gmt2001.twitch.eventsub.subscriptions.automod.message.AutomodMessage
- All Implemented Interfaces:
Flow.Subscriber<EventSubInternalEvent>
- Direct Known Subclasses:
AutomodMessageHold
,AutomodMessageUpdate
public abstract sealed class AutomodMessage
extends EventSubSubscriptionType
permits AutomodMessageHold, AutomodMessageUpdate
Common message data for
AutomodMessageHold
and AutomodMessageUpdate
.- Author:
- gmt2001
-
Field Summary
Fields inherited from class com.gmt2001.twitch.eventsub.EventSubSubscriptionType
flowsubscription, messageId, messageTimestamp, subscription
-
Constructor Summary
ConstructorsConstructorDescriptionOnly used by EventSub for handler registrationUsed byEventSubSubscriptionType.onEventSubInternalNotificationEvent(com.gmt2001.twitch.eventsub.EventSubInternalNotificationEvent)
to construct an object from an incoming notificationAutomodMessage
(String broadcaster_user_id, String moderator_user_id) Constructor -
Method Summary
Modifier and TypeMethodDescriptionThe broadcaster's user ID.The broadcaster's user login.The broadcaster's user display name.category()
The automod category that triggered the message to be held.heldAt()
The timestamp of when the message was held.The timestamp of when the message was held as a string.int
level()
The automod severity rating of the message, according to thecategory()
trigger.message()
The body of the flagged message.The ID of the message that was flagged by automod.The moderator's user ID.userId()
The message sender's user ID.The message sender's user login.userName()
The message sender's user display name.protected void
Validates that the provided parameters are acceptable for use inEventSubSubscriptionType.proposeSubscription()
Methods inherited from class com.gmt2001.twitch.eventsub.EventSubSubscriptionType
create, delete, deleteAll, findMatchingSubscriptionId, findMatchingSubscriptionIds, getExistingSubscription, isAlreadySubscribed, isMatch, messageTimestamp, onComplete, onError, onEventSubInternalEvent, onEventSubInternalNotificationEvent, onEventSubInternalRevocationEvent, onEventSubInternalVerificationEvent, onNext, onSubscribe, proposeSubscription, proposeSubscriptionInternal, proposeTransport, subscribe, subscription
-
Constructor Details
-
AutomodMessage
public AutomodMessage()Only used by EventSub for handler registration -
AutomodMessage
Used byEventSubSubscriptionType.onEventSubInternalNotificationEvent(com.gmt2001.twitch.eventsub.EventSubInternalNotificationEvent)
to construct an object from an incoming notification- Parameters:
e
- The event
-
AutomodMessage
Constructor- Parameters:
broadcaster_user_id
- The user id of the broadcastermoderator_user_id
- The ID of the moderator of the channel you want to get notifications for. If you have authorization from the broadcaster rather than a moderator, specify the broadcaster's user ID here
-
-
Method Details
-
validateParameters
Description copied from class:EventSubSubscriptionType
Validates that the provided parameters are acceptable for use inEventSubSubscriptionType.proposeSubscription()
- Specified by:
validateParameters
in classEventSubSubscriptionType
- Throws:
IllegalArgumentException
- One of the parameters is not acceptable
-
broadcasterUserId
The broadcaster's user ID.- Returns:
-
broadcasterUserLogin
The broadcaster's user login.- Returns:
-
broadcasterUserName
The broadcaster's user display name.- Returns:
-
userId
The message sender's user ID.- Returns:
-
userLogin
The message sender's user login.- Returns:
-
userName
The message sender's user display name.- Returns:
-
moderatorUserId
The moderator's user ID.- Returns:
-
messageId
The ID of the message that was flagged by automod.- Overrides:
messageId
in classEventSubSubscriptionType
- Returns:
-
message
The body of the flagged message.- Returns:
-
category
The automod category that triggered the message to be held.- Returns:
-
level
public int level()The automod severity rating of the message, according to thecategory()
trigger.- Returns:
-
heldAtString
The timestamp of when the message was held as a string.- Returns:
-
heldAt
The timestamp of when the message was held.- Returns:
-