Interface MessageReference



  • public interface MessageReference
    • Method Detail

      • getApi

        DiscordApi getApi​()
        Gets the discord api instance.
        Returns:
        The discord api instance.
      • getServerId

        Optional<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

        Optional<Long> getMessageId​()
        Gets the message id of the message reference.
        Returns:
        The message if of the message reference.
      • getMessage

        Optional<Message> getMessage​()
        Gets the referenced message.
        Returns:
        The referenced Message.
      • getServer

        default Optional<Server> getServer​()
        Gets the server of the message reference.
        Returns:
        The server of the message reference.
      • getChannel

        default Optional<TextChannel> getChannel​()
        Gets the server of the message reference.
        Returns:
        The server of the message reference.
      • requestMessage

        default Optional<CompletableFuture<Message>> requestMessage​()
        Requests the referenced message if it isn't present.
        Returns:
        The referenced Message.