Package discord4j.core.spec.legacy
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:
- Message Reference
-
-
Constructor Summary
Constructors Constructor Description LegacyMessageReferenceSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description discord4j.discordjson.json.MessageReferenceDataasRequest()LegacyMessageReferenceSpecsetChannelId(Snowflake channelId)Sets the ID of the originating message's channel.LegacyMessageReferenceSpecsetFailIfNotExists(boolean failIfNotExists)Sets to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true.LegacyMessageReferenceSpecsetGuildId(Snowflake guildId)Sets the ID of the originating message's guild.LegacyMessageReferenceSpecsetMessageId(Snowflake messageId)Sets the ID of the originating message.
-
-
-
Method Detail
-
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:
asRequestin interfaceLegacySpec<discord4j.discordjson.json.MessageReferenceData>
-
-