public class WebhookMessage
extends java.lang.Object
WebhookClient
.
username
and avatar_url
which override
the default username and avatar of a Webhook message.
This message can send multiple embeds at once!
Modifier and Type | Method and Description |
---|---|
static WebhookMessage |
from(Message message)
Creates a new WebhookMessage instance with the provided
Message
This does not copy the attachments of the provided message! |
boolean |
isFile()
Whether this message contains an attachment
|
static WebhookMessage |
of(java.util.Collection<MessageEmbed> embeds)
Creates a new WebhookMessage instance with the provided
MessageEmbeds |
static WebhookMessage |
of(MessageEmbed... embeds)
Creates a new WebhookMessage instance with the provided
MessageEmbeds |
public static WebhookMessage of(MessageEmbed... embeds)
MessageEmbeds
embeds
- The embeds to use for this messagejava.lang.IllegalArgumentException
- If any of the provided embeds is null
or exceeds the maximum total character count of MessageEmbed.EMBED_MAX_LENGTH_BOT
public static WebhookMessage of(java.util.Collection<MessageEmbed> embeds)
MessageEmbeds
embeds
- The embeds to use for this messagejava.lang.IllegalArgumentException
- If any of the provided embeds is null
or exceeds the maximum total character count of MessageEmbed.EMBED_MAX_LENGTH_BOT
public static WebhookMessage from(Message message)
Message
message
- The message to use for this messagejava.lang.IllegalArgumentException
- If the provided message is null
public boolean isFile()