Package org.javacord.api.entity.message
Interface MessageReference
-
public interface MessageReference
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description DiscordApigetApi()Gets the discord api instance.default java.util.Optional<TextChannel>getChannel()Gets the server of the message reference.longgetChannelId()Gets the channel id of the message reference.java.util.Optional<Message>getMessage()Gets the referenced message.java.util.Optional<java.lang.Long>getMessageId()Gets the message id of the message reference.default java.util.Optional<Server>getServer()Gets the server of the message reference.java.util.Optional<java.lang.Long>getServerId()Gets the server id of the message reference.default java.util.Optional<java.util.concurrent.CompletableFuture<Message>>requestMessage()Requests the referenced message if it isn't present.
-
-
-
Method Detail
-
getApi
DiscordApi getApi()
Gets the discord api instance.- Returns:
- The discord api instance.
-
getServerId
java.util.Optional<java.lang.Long> getServerId()
Gets the server id of the message reference.- Returns:
- The server if of the message reference.
-
getChannelId
long getChannelId()
Gets the channel id of the message reference.- Returns:
- The channel if of the message reference.
-
getMessageId
java.util.Optional<java.lang.Long> getMessageId()
Gets the message id of the message reference.- Returns:
- The message if of the message reference.
-
getMessage
java.util.Optional<Message> getMessage()
Gets the referenced message.- Returns:
- The referenced Message.
-
getServer
default java.util.Optional<Server> getServer()
Gets the server of the message reference.- Returns:
- The server of the message reference.
-
getChannel
default java.util.Optional<TextChannel> getChannel()
Gets the server of the message reference.- Returns:
- The server of the message reference.
-
requestMessage
default java.util.Optional<java.util.concurrent.CompletableFuture<Message>> requestMessage()
Requests the referenced message if it isn't present.- Returns:
- The referenced Message.
-
-