Interface UncachedMessageUtil

    • Method Detail

      • delete

        CompletableFuture<Void> delete​(long channelId,
                                       long messageId)
        Deletes the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to tell us if the deletion was successful.
      • delete

        CompletableFuture<Void> delete​(String channelId,
                                       String messageId)
        Deletes the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to tell us if the deletion was successful.
      • delete

        CompletableFuture<Void> delete​(long channelId,
                                       long messageId,
                                       String reason)
        Deletes the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        reason - The audit log reason for the deletion.
        Returns:
        A future to tell us if the deletion was successful.
      • delete

        CompletableFuture<Void> delete​(String channelId,
                                       String messageId,
                                       String reason)
        Deletes the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        reason - The audit log reason for the deletion.
        Returns:
        A future to tell us if the deletion was successful.
      • delete

        CompletableFuture<Void> delete​(long channelId,
                                       long... messageIds)
        Deletes multiple messages at once. This method does not have a size or age restriction. Messages younger than two weeks are sent in batches of 100 messages to the bulk delete API, older messages are deleted with individual delete requests.
        Parameters:
        channelId - The id of the message's channel.
        messageIds - The ids of the messages to delete.
        Returns:
        A future to tell us if the deletion was successful.
      • delete

        CompletableFuture<Void> delete​(String channelId,
                                       String... messageIds)
        Deletes multiple messages at once. This method does not have a size or age restriction. Messages younger than two weeks are sent in batches of 100 messages to the bulk delete API, older messages are deleted with individual delete requests.
        Parameters:
        channelId - The id of the message's channel.
        messageIds - The ids of the messages to delete.
        Returns:
        A future to tell us if the deletion was successful.
      • delete

        CompletableFuture<Void> delete​(Message... messages)
        Deletes multiple messages at once. This method does not have a size or age restriction. Messages younger than two weeks are sent in batches of 100 messages to the bulk delete API, older messages are deleted with individual delete requests.
        Parameters:
        messages - The messages to delete.
        Returns:
        A future to tell us if the deletion was successful.
      • delete

        CompletableFuture<Void> delete​(Iterable<Message> messages)
        Deletes multiple messages at once. This method does not have a size or age restriction. Messages younger than two weeks are sent in batches of 100 messages to the bulk delete API, older messages are deleted with individual delete requests.
        Parameters:
        messages - The messages to delete.
        Returns:
        A future to tell us if the deletion was successful.
      • edit

        CompletableFuture<Void> edit​(long channelId,
                                     long messageId,
                                     String content)
        Updates the content of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        content - The new content of the message.
        Returns:
        A future to check if the update was successful.
      • edit

        CompletableFuture<Void> edit​(String channelId,
                                     String messageId,
                                     String content)
        Updates the content of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        content - The new content of the message.
        Returns:
        A future to check if the update was successful.
      • edit

        CompletableFuture<Void> edit​(long channelId,
                                     long messageId,
                                     EmbedBuilder embed)
        Updates the embed of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        embed - The new embed of the message.
        Returns:
        A future to check if the update was successful.
      • edit

        CompletableFuture<Void> edit​(String channelId,
                                     String messageId,
                                     EmbedBuilder embed)
        Updates the embed of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        embed - The new embed of the message.
        Returns:
        A future to check if the update was successful.
      • edit

        CompletableFuture<Void> edit​(long channelId,
                                     long messageId,
                                     String content,
                                     EmbedBuilder embed)
        Updates the content and the embed of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        content - The new content of the message.
        embed - The new embed of the message.
        Returns:
        A future to check if the update was successful.
      • edit

        CompletableFuture<Void> edit​(String channelId,
                                     String messageId,
                                     String content,
                                     EmbedBuilder embed)
        Updates the content and the embed of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        content - The new content of the message.
        embed - The new embed of the message.
        Returns:
        A future to check if the update was successful.
      • edit

        CompletableFuture<Void> edit​(long channelId,
                                     long messageId,
                                     String content,
                                     boolean updateContent,
                                     EmbedBuilder embed,
                                     boolean updateEmbed)
        Updates the content and the embed of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        content - The new content of the message.
        updateContent - Whether to update or remove the content.
        embed - The new embed of the message.
        updateEmbed - Whether to update or remove the embed.
        Returns:
        A future to check if the update was successful.
      • edit

        CompletableFuture<Void> edit​(String channelId,
                                     String messageId,
                                     String content,
                                     boolean updateContent,
                                     EmbedBuilder embed,
                                     boolean updateEmbed)
        Updates the content and the embed of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        content - The new content of the message.
        updateContent - Whether to update or remove the content.
        embed - The new embed of the message.
        updateEmbed - Whether to update or remove the embed.
        Returns:
        A future to check if the update was successful.
      • removeContent

        CompletableFuture<Void> removeContent​(long channelId,
                                              long messageId)
        Removes the content of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to check if the removal was successful.
      • removeContent

        CompletableFuture<Void> removeContent​(String channelId,
                                              String messageId)
        Removes the content of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to check if the removal was successful.
      • removeEmbed

        CompletableFuture<Void> removeEmbed​(long channelId,
                                            long messageId)
        Removes the embed of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to check if the removal was successful.
      • removeEmbed

        CompletableFuture<Void> removeEmbed​(String channelId,
                                            String messageId)
        Removes the embed of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to check if the removal was successful.
      • removeContentAndEmbed

        CompletableFuture<Void> removeContentAndEmbed​(long channelId,
                                                      long messageId)
        Removes the content and embed of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to check if the removal was successful.
      • removeContentAndEmbed

        CompletableFuture<Void> removeContentAndEmbed​(String channelId,
                                                      String messageId)
        Removes the content and embed of the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to check if the removal was successful.
      • addReaction

        CompletableFuture<Void> addReaction​(long channelId,
                                            long messageId,
                                            String unicodeEmoji)
        Adds a unicode reaction to the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        unicodeEmoji - The unicode emoji string.
        Returns:
        A future to tell us if the action was successful.
      • addReaction

        CompletableFuture<Void> addReaction​(String channelId,
                                            String messageId,
                                            String unicodeEmoji)
        Adds a unicode reaction to the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        unicodeEmoji - The unicode emoji string.
        Returns:
        A future to tell us if the action was successful.
      • addReaction

        CompletableFuture<Void> addReaction​(long channelId,
                                            long messageId,
                                            Emoji emoji)
        Adds a reaction to the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        emoji - The emoji.
        Returns:
        A future to tell us if the action was successful.
      • addReaction

        CompletableFuture<Void> addReaction​(String channelId,
                                            String messageId,
                                            Emoji emoji)
        Adds a reaction to the message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        emoji - The emoji.
        Returns:
        A future to tell us if the action was successful.
      • removeAllReactions

        CompletableFuture<Void> removeAllReactions​(long channelId,
                                                   long messageId)
        Deletes all reactions on this message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to tell us if the deletion was successful.
      • removeAllReactions

        CompletableFuture<Void> removeAllReactions​(String channelId,
                                                   String messageId)
        Deletes all reactions on this message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to tell us if the deletion was successful.
      • pin

        CompletableFuture<Void> pin​(long channelId,
                                    long messageId)
        Pins this message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to tell us if the pin was successful.
      • pin

        CompletableFuture<Void> pin​(String channelId,
                                    String messageId)
        Pins this message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to tell us if the pin was successful.
      • unpin

        CompletableFuture<Void> unpin​(long channelId,
                                      long messageId)
        Unpins this message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to tell us if the action was successful.
      • unpin

        CompletableFuture<Void> unpin​(String channelId,
                                      String messageId)
        Unpins this message.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        Returns:
        A future to tell us if the action was successful.
      • getUsersWhoReactedWithEmoji

        CompletableFuture<List<User>> getUsersWhoReactedWithEmoji​(long channelId,
                                                                  long messageId,
                                                                  Emoji emoji)
        Gets a list with all users who reacted with the given emoji.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        emoji - The emoji of the reaction.
        Returns:
        A list with all users who reacted with the given emoji
      • getUsersWhoReactedWithEmoji

        CompletableFuture<List<User>> getUsersWhoReactedWithEmoji​(String channelId,
                                                                  String messageId,
                                                                  Emoji emoji)
        Gets a list with all users who reacted with the given emoji.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        emoji - The emoji of the reaction.
        Returns:
        A list with all users who reacted with the given emoji
      • removeUserReactionByEmoji

        CompletableFuture<Void> removeUserReactionByEmoji​(long channelId,
                                                          long messageId,
                                                          Emoji emoji,
                                                          User user)
        Removes the reaction of the given user.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        emoji - The emoji of the reaction.
        user - The user to remove.
        Returns:
        A future to tell us if the action was successful.
      • removeUserReactionByEmoji

        CompletableFuture<Void> removeUserReactionByEmoji​(String channelId,
                                                          String messageId,
                                                          Emoji emoji,
                                                          User user)
        Removes the reaction of the given user.
        Parameters:
        channelId - The id of the message's channel.
        messageId - The id of the message.
        emoji - The emoji of the reaction.
        user - The user to remove.
        Returns:
        A future to tell us if the action was successful.