Interface DiscordMessageContext

All Superinterfaces:
MessageContext, StringMessageContext

public interface DiscordMessageContext extends StringMessageContext
A message that came from Discord. Builds on StringMessageContext.
  • Method Details

    • builder

      static net.flectone.pulse.module.integration.discord.model.DiscordMessageContextImpl.DiscordMessageContextImplBuilder builder()
      Starts building this context.
      Returns:
      a new builder
    • globalName

      @NonNull String globalName()
      The author's Discord display name.
      Returns:
      the author's Discord display name
    • nickname

      @NonNull String nickname()
      The author's nickname on the server.
      Returns:
      the author's nickname on the server
    • displayName

      @NonNull String displayName()
      The name shown for the author.
      Returns:
      the name shown for the author
    • userName

      @NonNull String userName()
      The author's Discord handle.
      Returns:
      the author's Discord handle
    • reply

      @Nullable Pair<String,String> reply()
      The author and text of the replied-to message, or null.
      Returns:
      the author and text of the replied-to message, or null
    • withGlobalName

      DiscordMessageContext withGlobalName(@NonNull String globalName)
      Returns a copy carrying a different value.
      Parameters:
      globalName - the author's Discord display name
      Returns:
      the copy
    • withNickname

      DiscordMessageContext withNickname(@NonNull String nickname)
      Returns a copy carrying a different value.
      Parameters:
      nickname - the author's nickname on the server
      Returns:
      the copy
    • withDisplayName

      DiscordMessageContext withDisplayName(@NonNull String displayName)
      Returns a copy carrying a different value.
      Parameters:
      displayName - the name shown for the author
      Returns:
      the copy
    • withUserName

      DiscordMessageContext withUserName(@NonNull String userName)
      Returns a copy carrying a different value.
      Parameters:
      userName - the author's Discord handle
      Returns:
      the copy
    • withReply

      DiscordMessageContext withReply(@Nullable Pair<String,String> reply)
      Returns a copy carrying a different value.
      Parameters:
      reply - the author and text of the replied-to message, or null
      Returns:
      the copy