public class Action
extends Event
A user (or bot) action.
public Action(@NotNull
PlayerId playerId,
@NotNull
PlayerId recipientId,
@NotNull
java.lang.String applicationId,
@NotNull
org.litote.kmongo.Id<ai.tock.bot.engine.action.Action> id,
@NotNull
java.time.Instant date,
@NotNull
EventState state,
@NotNull
ActionMetadata metadata)
A user (or bot) action.
@NotNull public Message toMessage()
@NotNull public Event obfuscate(@NotNull ai.tock.shared.security.StringObfuscatorMode mode)
Obfuscate the event - by default this method does nothing.
@NotNull public Event obfuscate(@NotNull ai.tock.shared.security.StringObfuscatorMode mode, @NotNull PlayerId playerId)
@NotNull public org.litote.kmongo.Id<ai.tock.bot.engine.action.Action> toActionId()
@Nullable
public java.lang.String choice(@NotNull
ParameterKey key)
Returns the value of the specified choice parameter,
null if the user action is not a class SendChoice
or if this parameter is not set.
class SendChoicepublic boolean booleanChoice(@NotNull
ParameterKey key)
Returns true if the specified choice as the "true" value, false either.
@NotNull public PlayerId getPlayerId()
@NotNull public PlayerId getRecipientId()
@NotNull public ActionMetadata getMetadata()