Interface PollMessageContext

All Superinterfaces:
MessageContext, StringMessageContext

public interface PollMessageContext extends StringMessageContext
A poll being created, voted on or closed. Builds on StringMessageContext.
  • Method Details

    • builder

      static net.flectone.pulse.module.command.poll.model.PollMessageContextImpl.PollMessageContextImplBuilder builder()
      Starts building this context.
      Returns:
      a new builder
    • poll

      @NonNull Poll poll()
      The poll.
      Returns:
      the poll
    • status

      @NonNull PollModule.Status status()
      How the poll answered the request.
      Returns:
      how the poll answered the request
    • action

      @NonNull PollModule.Action action()
      What was done to the poll.
      Returns:
      what was done to the poll
    • withPoll

      PollMessageContext withPoll(@NonNull Poll poll)
      Returns a copy carrying a different value.
      Parameters:
      poll - the poll
      Returns:
      the copy
    • withStatus

      PollMessageContext withStatus(@NonNull PollModule.Status status)
      Returns a copy carrying a different value.
      Parameters:
      status - how the poll answered the request
      Returns:
      the copy
    • withAction

      PollMessageContext withAction(@NonNull PollModule.Action action)
      Returns a copy carrying a different value.
      Parameters:
      action - what was done to the poll
      Returns:
      the copy