Interface MessageReference


  • public interface MessageReference
    • 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.