Package discord4j.core.spec
Class MessageReferenceSpec
- java.lang.Object
-
- discord4j.core.spec.MessageReferenceSpec
-
- All Implemented Interfaces:
Spec<discord4j.discordjson.json.MessageReferenceData>
public class MessageReferenceSpec extends Object implements Spec<discord4j.discordjson.json.MessageReferenceData>
Spec used to create a message reference.- See Also:
- Message Reference
-
-
Constructor Summary
Constructors Constructor Description MessageReferenceSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description discord4j.discordjson.json.MessageReferenceData
asRequest()
MessageReferenceSpec
setChannelId(Snowflake channelId)
Sets the ID of the originating message's channel.MessageReferenceSpec
setFailIfNotExists(boolean failIfNotExists)
Sets to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true.MessageReferenceSpec
setGuildId(Snowflake guildId)
Sets the ID of the originating message's guild.MessageReferenceSpec
setMessageId(Snowflake messageId)
Sets the ID of the originating message.
-
-
-
Method Detail
-
setMessageId
public MessageReferenceSpec setMessageId(Snowflake messageId)
Sets the ID of the originating message.- Parameters:
messageId
- The ID of the originating message.- Returns:
- This spec.
-
setChannelId
public MessageReferenceSpec 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 MessageReferenceSpec 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 MessageReferenceSpec 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.
-
-