public class ReadonlyMessage
extends java.lang.Object
implements org.json.JSONString
WebhookClient send methods.toWebhookMessage()| Constructor and Description |
|---|
ReadonlyMessage(long id,
long channelId,
boolean mentionsEveryone,
boolean tts,
int flags,
@NotNull ReadonlyUser author,
@NotNull java.lang.String content,
@NotNull java.util.List<ReadonlyEmbed> embeds,
@NotNull java.util.List<ReadonlyAttachment> attachments,
@NotNull java.util.List<ReadonlyUser> mentionedUsers,
@NotNull java.util.List<java.lang.Long> mentionedRoles) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.util.List<ReadonlyAttachment> |
getAttachments()
The attachments of this message.
|
@NotNull ReadonlyUser |
getAuthor()
The author of this message, represented by a
ReadonlyUser instance. |
long |
getChannelId()
The channel id for the channel this message was sent in
|
@NotNull java.lang.String |
getContent()
The content of this message, this is displayed above embeds and attachments.
|
@NotNull java.util.List<ReadonlyEmbed> |
getEmbeds()
The embeds in this message, a webhook can send up to 10 embeds
in one message.
|
int |
getFlags()
The flags for this message.
|
long |
getId()
The id of this message
|
@NotNull java.util.List<java.lang.Long> |
getMentionedRoles()
List of mentioned role ids
|
@NotNull java.util.List<ReadonlyUser> |
getMentionedUsers()
Users mentioned by this message.
|
boolean |
isMentionsEveryone()
Whether this message mentioned everyone/here
|
boolean |
isTTS()
Whether this message used Text-to-Speech (TTS)
|
java.lang.String |
toJSONString() |
java.lang.String |
toString()
JSON representation of this provider
|
@NotNull WebhookMessage |
toWebhookMessage()
Converts this message to a reduced webhook message.
|
public ReadonlyMessage(long id,
long channelId,
boolean mentionsEveryone,
boolean tts,
int flags,
@NotNull
@NotNull ReadonlyUser author,
@NotNull
@NotNull java.lang.String content,
@NotNull
@NotNull java.util.List<ReadonlyEmbed> embeds,
@NotNull
@NotNull java.util.List<ReadonlyAttachment> attachments,
@NotNull
@NotNull java.util.List<ReadonlyUser> mentionedUsers,
@NotNull
@NotNull java.util.List<java.lang.Long> mentionedRoles)
public long getId()
public long getChannelId()
public boolean isMentionsEveryone()
public boolean isTTS()
public int getFlags()
MessageFlags to determine which flags are set.@NotNull public @NotNull ReadonlyUser getAuthor()
ReadonlyUser instance.@NotNull public @NotNull java.lang.String getContent()
@NotNull public @NotNull java.util.List<ReadonlyEmbed> getEmbeds()
@NotNull public @NotNull java.util.List<ReadonlyAttachment> getAttachments()
WebhookMessageBuilder.addFile(java.io.File).
@NotNull public @NotNull java.util.List<ReadonlyUser> getMentionedUsers()
@NotNull public @NotNull java.util.List<java.lang.Long> getMentionedRoles()
@NotNull public @NotNull WebhookMessage toWebhookMessage()
WebhookMessagepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toJSONString()
toJSONString in interface org.json.JSONString