Class ChatModerationAction
java.lang.Object
com.github.twitch4j.pubsub.domain.ChatModerationAction
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
getArgs()
The arguments passed to the moderation action command.The login for the account that triggered the moderation actionThe user id for the account that triggered the moderation actionWhether the moderation action was triggered by AutoModThe specific moderation action that took place, in a convenient enum formThe specific moderation type that took place, in a convenient enum formgetMsgId()
The relevant message id, if the action was a message deletionThe user id for the targeted account by the moderation action (e.g.The user name for the targeted account by the moderation action (e.g.getType()
The raw string for the class of moderation action.int
hashCode()
void
The arguments passed to the moderation action command.void
setCreatedBy
(String createdBy) The login for the account that triggered the moderation actionvoid
setCreatedByUserId
(String createdByUserId) The user id for the account that triggered the moderation actionvoid
setFromAutomod
(Boolean fromAutomod) Whether the moderation action was triggered by AutoModvoid
setModerationAction
(ChatModerationAction.ModerationAction moderationAction) The specific moderation action that took place, in a convenient enum formvoid
The relevant message id, if the action was a message deletionvoid
setTargetUserId
(String targetUserId) The user id for the targeted account by the moderation action (e.g.void
setTargetUserLogin
(String targetUserLogin) The user name for the targeted account by the moderation action (e.g.void
The raw string for the class of moderation action.toString()
-
Constructor Details
-
ChatModerationAction
public ChatModerationAction() -
ChatModerationAction
-
-
Method Details
-
getTargetedUserName
- Returns:
- optional wrapper around the username that was specified in a ban, unban, timeout, untimeout, vip, unvip, mod, unmod, host, raid, or delete message command
-
getReason
- Returns:
- optional wrapper around the reason associated with the ban or timeout (or an empty string if none was specified)
-
getDeletedMessage
- Returns:
- optional wrapper around the message that was deleted
-
getTimeoutDuration
- Returns:
- optional wrapper around the duration the user was timed out for, in seconds
-
getSlowDuration
- Returns:
- optional wrapper around the slow mode delay, in seconds
-
getFollowersDuration
- Returns:
- optional wrapper around the duration followers only mode was set to, in minutes
-
getType
The raw string for the class of moderation action. Can be "chat_channel_moderation" or "chat_login_moderation" or "chat_targeted_login_moderation"- See Also:
-
getModerationAction
The specific moderation action that took place, in a convenient enum form -
getArgs
The arguments passed to the moderation action command. Can be null. -
getCreatedBy
The login for the account that triggered the moderation action -
getCreatedByUserId
The user id for the account that triggered the moderation action -
getMsgId
The relevant message id, if the action was a message deletion -
getTargetUserId
The user id for the targeted account by the moderation action (e.g. the user id that was banned) -
getTargetUserLogin
The user name for the targeted account by the moderation action (e.g. the user login that was banned)Note: While this field is included in the pubsub response, the API appears to never populate it with a non-empty string
-
getFromAutomod
Whether the moderation action was triggered by AutoMod- See Also:
-
setType
The raw string for the class of moderation action. Can be "chat_channel_moderation" or "chat_login_moderation" or "chat_targeted_login_moderation"- See Also:
-
setModerationAction
The specific moderation action that took place, in a convenient enum form -
setArgs
The arguments passed to the moderation action command. Can be null. -
setCreatedBy
The login for the account that triggered the moderation action -
setCreatedByUserId
The user id for the account that triggered the moderation action -
setMsgId
The relevant message id, if the action was a message deletion -
setTargetUserId
The user id for the targeted account by the moderation action (e.g. the user id that was banned) -
setTargetUserLogin
The user name for the targeted account by the moderation action (e.g. the user login that was banned)Note: While this field is included in the pubsub response, the API appears to never populate it with a non-empty string
-
setFromAutomod
Whether the moderation action was triggered by AutoMod- See Also:
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getModType
The specific moderation type that took place, in a convenient enum form
-