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
Deprecated.void
setCreatedBy
(String createdBy) Deprecated.void
setCreatedByUserId
(String createdByUserId) Deprecated.void
setFromAutomod
(Boolean fromAutomod) Deprecated.void
setModerationAction
(ChatModerationAction.ModerationAction moderationAction) Deprecated.void
Deprecated.void
setTargetUserId
(String targetUserId) Deprecated.void
setTargetUserLogin
(String targetUserLogin) Deprecated.void
Deprecated.toString()
-
Constructor Details
-
ChatModerationAction
public ChatModerationAction() -
ChatModerationAction
public ChatModerationAction(String type, ChatModerationAction.ModerationAction moderationAction, List<String> args, String createdBy, String createdByUserId, String msgId, String targetUserId, String targetUserLogin, Boolean fromAutomod) Creates a newChatModerationAction
instance.- Parameters:
type
- The raw string for the class of moderation action. Can be "chat_channel_moderation" or "chat_login_moderation" or "chat_targeted_login_moderation"moderationAction
- The specific moderation action that took place, in a convenient enum formargs
- The arguments passed to the moderation action command. Can be null.createdBy
- The login for the account that triggered the moderation actioncreatedByUserId
- The user id for the account that triggered the moderation actionmsgId
- The relevant message id, if the action was a message deletiontargetUserId
- The user id for the targeted account by the moderation action (e.g. the user id that was banned)targetUserLogin
- 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
fromAutomod
- Whether the moderation action was triggered by AutoMod- See Also:
-
-
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:
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
setType
Deprecated.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
Deprecated.The specific moderation action that took place, in a convenient enum form -
setArgs
Deprecated.The arguments passed to the moderation action command. Can be null. -
setCreatedBy
Deprecated.The login for the account that triggered the moderation action -
setCreatedByUserId
Deprecated.The user id for the account that triggered the moderation action -
setMsgId
Deprecated.The relevant message id, if the action was a message deletion -
setTargetUserId
Deprecated.The user id for the targeted account by the moderation action (e.g. the user id that was banned) -
setTargetUserLogin
Deprecated.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
Deprecated.Whether the moderation action was triggered by AutoMod- See Also:
-
getModType
The specific moderation type that took place, in a convenient enum form
-