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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondiscord4j.discordjson.json.MessageReferenceData
setChannelId
(Snowflake channelId) Sets the ID of the originating message's channel.setFailIfNotExists
(boolean failIfNotExists) Sets to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true.setGuildId
(Snowflake guildId) Sets the ID of the originating message's guild.setMessageId
(Snowflake messageId) Sets the ID of the originating message.
-
Constructor Details
-
LegacyMessageReferenceSpec
public LegacyMessageReferenceSpec()
-
-
Method Details
-
setMessageId
Sets the ID of the originating message.- Parameters:
messageId
- The ID of the originating message.- Returns:
- This spec.
-
setChannelId
Sets the ID of the originating message's channel.- Parameters:
channelId
- The ID of the originating message's channel.- Returns:
- This spec.
-
setGuildId
Sets the ID of the originating message's guild.- Parameters:
guildId
- The ID of the originating message's guild.- Returns:
- This spec.
-
setFailIfNotExists
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 interfaceLegacySpec<discord4j.discordjson.json.MessageReferenceData>
-