Package org.javacord.api.event.message
Interface OptionalMessageEvent
-
- All Superinterfaces:
ChannelEvent,Event,MessageEvent,TextChannelEvent
- All Known Subinterfaces:
MessageDeleteEvent,MessageEditEvent,ReactionAddEvent,ReactionEvent,ReactionRemoveAllEvent,ReactionRemoveEvent,RequestableMessageEvent,SingleReactionEvent
public interface OptionalMessageEvent extends MessageEvent
A message event where the message is NOT guaranteed to be in the cache.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Optional<Message>getMessage()Gets the message from the cache.default Optional<List<MessageAttachment>>getMessageAttachments()Gets a list with all attachments of the event's message.default Optional<MessageAuthor>getMessageAuthor()Gets the author of the event's message.default Optional<String>getMessageContent()Gets the content of the event's message.default Optional<String>getReadableMessageContent()Gets the readable content of the event's message.-
Methods inherited from interface org.javacord.api.event.message.MessageEvent
addReactionsToMessage, addReactionsToMessage, addReactionToMessage, addReactionToMessage, deleteMessage, deleteMessage, editMessage, editMessage, editMessage, getMessageId, getServer, pinMessage, removeAllReactionsFromMessage, removeOwnReactionByEmojiFromMessage, removeOwnReactionByEmojiFromMessage, removeOwnReactionsByEmojiFromMessage, removeOwnReactionsByEmojiFromMessage, removeReactionByEmojiFromMessage, removeReactionByEmojiFromMessage, removeReactionByEmojiFromMessage, removeReactionByEmojiFromMessage, removeReactionsByEmojiFromMessage, removeReactionsByEmojiFromMessage, removeReactionsByEmojiFromMessage, removeReactionsByEmojiFromMessage, unpinMessage
-
Methods inherited from interface org.javacord.api.event.channel.TextChannelEvent
getChannel, getGroupChannel, getPrivateChannel, getServerTextChannel
-
-
-
-
Method Detail
-
getMessage
Optional<Message> getMessage()
Gets the message from the cache.- Returns:
- The message from the cache.
-
getMessageAuthor
default Optional<MessageAuthor> getMessageAuthor()
Gets the author of the event's message.- Returns:
- The author of the event's message.
- See Also:
Message.getAuthor()
-
getMessageAttachments
default Optional<List<MessageAttachment>> getMessageAttachments()
Gets a list with all attachments of the event's message.- Returns:
- A list with all attachments of the event's message.
- See Also:
Message.getAttachments()
-
getMessageContent
default Optional<String> getMessageContent()
Gets the content of the event's message.- Returns:
- The content of the event's message.
- See Also:
Message.getContent()
-
getReadableMessageContent
default Optional<String> getReadableMessageContent()
Gets the readable content of the event's message.- Returns:
- The readable content of the event's message.
- See Also:
Message.getReadableContent()
-
-