Class LegacyMessageReferenceSpec

java.lang.Object
discord4j.core.spec.legacy.LegacyMessageReferenceSpec
All Implemented Interfaces:
LegacySpec<discord4j.discordjson.json.MessageReferenceData>

public class LegacyMessageReferenceSpec extends Object implements LegacySpec<discord4j.discordjson.json.MessageReferenceData>
LegacySpec used to create a message reference.
See Also:
  • Constructor Details

    • LegacyMessageReferenceSpec

      public LegacyMessageReferenceSpec()
  • Method Details

    • setMessageId

      public LegacyMessageReferenceSpec setMessageId(Snowflake messageId)
      Sets the ID of the originating message.
      Parameters:
      messageId - The ID of the originating message.
      Returns:
      This spec.
    • setChannelId

      public LegacyMessageReferenceSpec setChannelId(Snowflake channelId)
      Sets the ID of the originating message's channel.
      Parameters:
      channelId - The ID of the originating message's channel.
      Returns:
      This spec.
    • setGuildId

      public LegacyMessageReferenceSpec setGuildId(Snowflake guildId)
      Sets the ID of the originating message's guild.
      Parameters:
      guildId - The ID of the originating message's guild.
      Returns:
      This spec.
    • setFailIfNotExists

      public LegacyMessageReferenceSpec setFailIfNotExists(boolean failIfNotExists)
      Sets to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true.
      Parameters:
      failIfNotExists - Whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message.
      Returns:
      This spec.
    • asRequest

      public discord4j.discordjson.json.MessageReferenceData asRequest()
      Specified by:
      asRequest in interface LegacySpec<discord4j.discordjson.json.MessageReferenceData>