Interface MessageData
- All Known Subinterfaces:
ForumPostAction
,MessageCreateAction
,MessageCreateRequest<R>
,MessageEditAction
,MessageEditCallbackAction
,MessageEditRequest<R>
,MessageRequest<R>
,ReplyCallbackAction
,WebhookMessageCreateAction<T>
,WebhookMessageEditAction<T>
- All Known Implementing Classes:
AbstractMessageBuilder
,MessageCreateBuilder
,MessageCreateData
,MessageEditBuilder
,MessageEditData
public interface MessageData
Represents data relevant to all message requests.
-
Method Summary
Modifier and TypeMethodDescriptionThe mention types which are whitelisted.List<? extends AttachedFile>
The configured message attachments asAttachedFile
, this is the opposite ofMessageRequest.setFiles(Collection)
and only returns what was set using that setter.The configured message components, this is the opposite ofMessageRequest.setComponents(Collection)
and only returns what was set using that setter.The configured message content, this is the opposite forMessageRequest.setContent(String)
and only returns what was set using that setter.The configured message embeds, this is the opposite ofMessageRequest.setEmbeds(Collection)
and only returns what was set using that setter.The IDs for roles which are allowed to be mentioned, or an empty list.The IDs for users which are allowed to be mentioned, or an empty list.boolean
Whether this message would mention a user, if it is sent as a reply.boolean
Whether embeds will be suppressed on this message.
-
Method Details
-
getContent
The configured message content, this is the opposite forMessageRequest.setContent(String)
and only returns what was set using that setter.For message edit requests, this will not be the current content of the message.
- Returns:
- The currently configured content, or an empty string if none was set yet
- See Also:
-
getEmbeds
The configured message embeds, this is the opposite ofMessageRequest.setEmbeds(Collection)
and only returns what was set using that setter.For message edit requests, this will not be the current embeds of the message.
- Returns:
- The currently configured embeds, or an empty list if none were set yet
- See Also:
-
getComponents
The configured message components, this is the opposite ofMessageRequest.setComponents(Collection)
and only returns what was set using that setter.For message edit requests, this will not be the current components of the message.
- Returns:
- The currently configured components, or an empty list if none were set yet
- See Also:
-
getAttachments
The configured message attachments asAttachedFile
, this is the opposite ofMessageRequest.setFiles(Collection)
and only returns what was set using that setter.For message edit requests, this will not be the current file attachments of the message.
- Returns:
- The currently configured attachments, or an empty list if none were set yet
- See Also:
-
isSuppressEmbeds
boolean isSuppressEmbeds()Whether embeds will be suppressed on this message.- Returns:
- True, if embeds are suppressed
-
getMentionedUsers
The IDs for users which are allowed to be mentioned, or an empty list.- Returns:
- The user IDs which are mention whitelisted
-
getMentionedRoles
The IDs for roles which are allowed to be mentioned, or an empty list.- Returns:
- The role IDs which are mention whitelisted
-
getAllowedMentions
The mention types which are whitelisted.- Returns:
- The mention types which can be mentioned by this message
-
isMentionRepliedUser
boolean isMentionRepliedUser()Whether this message would mention a user, if it is sent as a reply.- Returns:
- True, if this would mention with the reply
-