Package org.javacord.api.entity.message
Interface UncachedMessageUtil
-
- All Superinterfaces:
UncachedMessageAttachableListenerManager
public interface UncachedMessageUtil extends UncachedMessageAttachableListenerManager
This class provides methods to interact with messages without having an instance of it.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.Void>addReaction(long channelId, long messageId, java.lang.String unicodeEmoji)Adds a unicode reaction to the message.java.util.concurrent.CompletableFuture<java.lang.Void>addReaction(long channelId, long messageId, Emoji emoji)Adds a reaction to the message.java.util.concurrent.CompletableFuture<java.lang.Void>addReaction(java.lang.String channelId, java.lang.String messageId, java.lang.String unicodeEmoji)Adds a unicode reaction to the message.java.util.concurrent.CompletableFuture<java.lang.Void>addReaction(java.lang.String channelId, java.lang.String messageId, Emoji emoji)Adds a reaction to the message.default java.util.concurrent.CompletableFuture<Message>crossPost(long channelId, long messageId)Cross posts the message if it is in an announcement channel.java.util.concurrent.CompletableFuture<Message>crossPost(java.lang.String channelId, java.lang.String messageId)Cross posts the message if it is in an announcement channel.java.util.concurrent.CompletableFuture<java.lang.Void>delete(long channelId, long messageId)Deletes the message.java.util.concurrent.CompletableFuture<java.lang.Void>delete(long channelId, long... messageIds)Deletes multiple messages at once.java.util.concurrent.CompletableFuture<java.lang.Void>delete(long channelId, long messageId, java.lang.String reason)Deletes the message.java.util.concurrent.CompletableFuture<java.lang.Void>delete(java.lang.Iterable<Message> messages)Deletes multiple messages at once.java.util.concurrent.CompletableFuture<java.lang.Void>delete(java.lang.String channelId, java.lang.String messageId)Deletes the message.java.util.concurrent.CompletableFuture<java.lang.Void>delete(java.lang.String channelId, java.lang.String... messageIds)Deletes multiple messages at once.java.util.concurrent.CompletableFuture<java.lang.Void>delete(java.lang.String channelId, java.lang.String messageId, java.lang.String reason)Deletes the message.java.util.concurrent.CompletableFuture<java.lang.Void>delete(Message... messages)Deletes multiple messages at once.java.util.concurrent.CompletableFuture<Message>edit(long channelId, long messageId, java.lang.String content)Updates the content of the message.java.util.concurrent.CompletableFuture<Message>edit(long channelId, long messageId, java.lang.String content, boolean updateContent, java.util.List<EmbedBuilder> embeds, boolean updateEmbed)Updates the content and the embed of the message.default java.util.concurrent.CompletableFuture<Message>edit(long channelId, long messageId, java.lang.String content, boolean updateContent, EmbedBuilder embed, boolean updateEmbed)Updates the content and the embed of the message.java.util.concurrent.CompletableFuture<Message>edit(long channelId, long messageId, java.lang.String content, java.util.List<EmbedBuilder> embeds)Updates the content and the embed of the message.default java.util.concurrent.CompletableFuture<Message>edit(long channelId, long messageId, java.lang.String content, EmbedBuilder... embeds)Updates the content and the embed of the message.java.util.concurrent.CompletableFuture<Message>edit(long channelId, long messageId, java.util.List<EmbedBuilder> embeds)Updates the embed of the message.default java.util.concurrent.CompletableFuture<Message>edit(long channelId, long messageId, EmbedBuilder... embeds)Updates the embed of the message.java.util.concurrent.CompletableFuture<Message>edit(java.lang.String channelId, java.lang.String messageId, java.lang.String content)Updates the content of the message.java.util.concurrent.CompletableFuture<Message>edit(java.lang.String channelId, java.lang.String messageId, java.lang.String content, boolean updateContent, java.util.List<EmbedBuilder> embeds, boolean updateEmbed)Updates the content and the embed of the message.default java.util.concurrent.CompletableFuture<Message>edit(java.lang.String channelId, java.lang.String messageId, java.lang.String content, boolean updateContent, EmbedBuilder embed, boolean updateEmbed)Updates the content and the embed of the message.java.util.concurrent.CompletableFuture<Message>edit(java.lang.String channelId, java.lang.String messageId, java.lang.String content, java.util.List<EmbedBuilder> embeds)Updates the content and the embed of the message.default java.util.concurrent.CompletableFuture<Message>edit(java.lang.String channelId, java.lang.String messageId, java.lang.String content, EmbedBuilder... embeds)Updates the content and the embed of the message.java.util.concurrent.CompletableFuture<Message>edit(java.lang.String channelId, java.lang.String messageId, java.util.List<EmbedBuilder> embeds)Updates the embed of the message.default java.util.concurrent.CompletableFuture<Message>edit(java.lang.String channelId, java.lang.String messageId, EmbedBuilder... embeds)Updates the embed of the message.java.util.concurrent.CompletableFuture<java.util.List<User>>getUsersWhoReactedWithEmoji(long channelId, long messageId, Emoji emoji)Gets a list with all users who reacted with the given emoji.java.util.concurrent.CompletableFuture<java.util.List<User>>getUsersWhoReactedWithEmoji(java.lang.String channelId, java.lang.String messageId, Emoji emoji)Gets a list with all users who reacted with the given emoji.java.util.concurrent.CompletableFuture<java.lang.Void>pin(long channelId, long messageId)Pins this message.java.util.concurrent.CompletableFuture<java.lang.Void>pin(java.lang.String channelId, java.lang.String messageId)Pins this message.java.util.concurrent.CompletableFuture<java.lang.Void>removeAllReactions(long channelId, long messageId)Deletes all reactions on this message.java.util.concurrent.CompletableFuture<java.lang.Void>removeAllReactions(java.lang.String channelId, java.lang.String messageId)Deletes all reactions on this message.java.util.concurrent.CompletableFuture<Message>removeContent(long channelId, long messageId)Removes the content of the message.java.util.concurrent.CompletableFuture<Message>removeContent(java.lang.String channelId, java.lang.String messageId)Removes the content of the message.java.util.concurrent.CompletableFuture<Message>removeContentAndEmbed(long channelId, long messageId)Removes the content and embed of the message.java.util.concurrent.CompletableFuture<Message>removeContentAndEmbed(java.lang.String channelId, java.lang.String messageId)Removes the content and embed of the message.java.util.concurrent.CompletableFuture<Message>removeEmbed(long channelId, long messageId)Removes the embed of the message.java.util.concurrent.CompletableFuture<Message>removeEmbed(java.lang.String channelId, java.lang.String messageId)Removes the embed of the message.java.util.concurrent.CompletableFuture<java.lang.Void>removeUserReactionByEmoji(long channelId, long messageId, Emoji emoji, long userId)Removes the reaction of the given user.java.util.concurrent.CompletableFuture<java.lang.Void>removeUserReactionByEmoji(java.lang.String channelId, java.lang.String messageId, Emoji emoji, java.lang.String userId)Removes the reaction of the given user.java.util.concurrent.CompletableFuture<java.lang.Void>unpin(long channelId, long messageId)Unpins this message.java.util.concurrent.CompletableFuture<java.lang.Void>unpin(java.lang.String channelId, java.lang.String messageId)Unpins this message.-
Methods inherited from interface org.javacord.api.listener.message.UncachedMessageAttachableListenerManager
addButtonClickListener, addMessageAttachableListener, addMessageAttachableListener, addMessageComponentCreateListener, addMessageContextMenuCommandListener, addMessageDeleteListener, addMessageEditListener, addReactionAddListener, addReactionRemoveAllListener, addReactionRemoveListener, addSelectMenuChooseListener, getButtonClickListeners, getButtonClickListeners, getMessageAttachableListeners, getMessageAttachableListeners, getMessageComponentCreateListeners, getMessageComponentCreateListeners, getMessageContextMenuCommandListeners, getMessageContextMenuCommandListeners, getMessageDeleteListeners, getMessageDeleteListeners, getMessageEditListeners, getMessageEditListeners, getReactionAddListeners, getReactionAddListeners, getReactionRemoveAllListeners, getReactionRemoveAllListeners, getReactionRemoveListeners, getReactionRemoveListeners, getSelectMenuChooseListeners, getSelectMenuChooseListeners, removeListener, removeListener, removeMessageAttachableListener, removeMessageAttachableListener
-
-
-
-
Method Detail
-
crossPost
default java.util.concurrent.CompletableFuture<Message> crossPost(long channelId, long messageId)
Cross posts the message if it is in an announcement channel.- Parameters:
channelId- The id of the message's channel.messageId- The id of the message.- Returns:
- The new message object.
-
crossPost
java.util.concurrent.CompletableFuture<Message> crossPost(java.lang.String channelId, java.lang.String messageId)
Cross posts the message if it is in an announcement channel.- Parameters:
channelId- The id of the message's channel.messageId- The id of the message.- Returns:
- The new message object.
-
delete
java.util.concurrent.CompletableFuture<java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> delete(java.lang.String channelId, java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> delete(long channelId, long messageId, java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> delete(java.lang.String channelId, java.lang.String messageId, java.lang.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
java.util.concurrent.CompletableFuture<java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> delete(java.lang.String channelId, java.lang.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
java.util.concurrent.CompletableFuture<java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> delete(java.lang.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
java.util.concurrent.CompletableFuture<Message> edit(long channelId, long messageId, java.lang.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
java.util.concurrent.CompletableFuture<Message> edit(java.lang.String channelId, java.lang.String messageId, java.lang.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
default java.util.concurrent.CompletableFuture<Message> edit(long channelId, long messageId, EmbedBuilder... embeds)
Updates the embed of the message.- Parameters:
channelId- The id of the message's channel.messageId- The id of the message.embeds- An array of the new embeds of the message.- Returns:
- A future to check if the update was successful.
-
edit
java.util.concurrent.CompletableFuture<Message> edit(long channelId, long messageId, java.util.List<EmbedBuilder> embeds)
Updates the embed of the message.- Parameters:
channelId- The id of the message's channel.messageId- The id of the message.embeds- An array of the new embeds of the message.- Returns:
- A future to check if the update was successful.
-
edit
default java.util.concurrent.CompletableFuture<Message> edit(java.lang.String channelId, java.lang.String messageId, EmbedBuilder... embeds)
Updates the embed of the message.- Parameters:
channelId- The id of the message's channel.messageId- The id of the message.embeds- An array of the new embeds of the message.- Returns:
- A future to check if the update was successful.
-
edit
java.util.concurrent.CompletableFuture<Message> edit(java.lang.String channelId, java.lang.String messageId, java.util.List<EmbedBuilder> embeds)
Updates the embed of the message.- Parameters:
channelId- The id of the message's channel.messageId- The id of the message.embeds- An array of the new embeds of the message.- Returns:
- A future to check if the update was successful.
-
edit
default java.util.concurrent.CompletableFuture<Message> edit(long channelId, long messageId, java.lang.String content, EmbedBuilder... embeds)
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.embeds- An array of the new embeds of the message.- Returns:
- A future to check if the update was successful.
-
edit
java.util.concurrent.CompletableFuture<Message> edit(long channelId, long messageId, java.lang.String content, java.util.List<EmbedBuilder> embeds)
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.embeds- An array of the new embeds of the message.- Returns:
- A future to check if the update was successful.
-
edit
default java.util.concurrent.CompletableFuture<Message> edit(java.lang.String channelId, java.lang.String messageId, java.lang.String content, EmbedBuilder... embeds)
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.embeds- An array of the new embeds of the message.- Returns:
- A future to check if the update was successful.
-
edit
java.util.concurrent.CompletableFuture<Message> edit(java.lang.String channelId, java.lang.String messageId, java.lang.String content, java.util.List<EmbedBuilder> embeds)
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.embeds- An array of the new embeds of the message.- Returns:
- A future to check if the update was successful.
-
edit
default java.util.concurrent.CompletableFuture<Message> edit(long channelId, long messageId, java.lang.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
java.util.concurrent.CompletableFuture<Message> edit(long channelId, long messageId, java.lang.String content, boolean updateContent, java.util.List<EmbedBuilder> embeds, 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.embeds- An array of the new embeds of the message.updateEmbed- Whether to update or remove the embed.- Returns:
- A future to check if the update was successful.
-
edit
default java.util.concurrent.CompletableFuture<Message> edit(java.lang.String channelId, java.lang.String messageId, java.lang.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
java.util.concurrent.CompletableFuture<Message> edit(java.lang.String channelId, java.lang.String messageId, java.lang.String content, boolean updateContent, java.util.List<EmbedBuilder> embeds, 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.embeds- An array of the new embeds of the message.updateEmbed- Whether to update or remove the embed.- Returns:
- A future to check if the update was successful.
-
removeContent
java.util.concurrent.CompletableFuture<Message> 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
java.util.concurrent.CompletableFuture<Message> removeContent(java.lang.String channelId, java.lang.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
java.util.concurrent.CompletableFuture<Message> 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
java.util.concurrent.CompletableFuture<Message> removeEmbed(java.lang.String channelId, java.lang.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
java.util.concurrent.CompletableFuture<Message> 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
java.util.concurrent.CompletableFuture<Message> removeContentAndEmbed(java.lang.String channelId, java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> addReaction(long channelId, long messageId, java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> addReaction(java.lang.String channelId, java.lang.String messageId, java.lang.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
java.util.concurrent.CompletableFuture<java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> addReaction(java.lang.String channelId, java.lang.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
java.util.concurrent.CompletableFuture<java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> removeAllReactions(java.lang.String channelId, java.lang.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
java.util.concurrent.CompletableFuture<java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> pin(java.lang.String channelId, java.lang.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
java.util.concurrent.CompletableFuture<java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> unpin(java.lang.String channelId, java.lang.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
java.util.concurrent.CompletableFuture<java.util.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
java.util.concurrent.CompletableFuture<java.util.List<User>> getUsersWhoReactedWithEmoji(java.lang.String channelId, java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> removeUserReactionByEmoji(long channelId, long messageId, Emoji emoji, long userId)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.userId- The id of the user to remove.- Returns:
- A future to tell us if the action was successful.
-
removeUserReactionByEmoji
java.util.concurrent.CompletableFuture<java.lang.Void> removeUserReactionByEmoji(java.lang.String channelId, java.lang.String messageId, Emoji emoji, java.lang.String userId)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.userId- The id of the user to remove.- Returns:
- A future to tell us if the action was successful.
-
-