WebhookMessage
One message for a DiscordWebhook: text, up to 10 embeds, and the name and picture it is posted under.
Final classRLPlugins API
public final class WebhookMessageEvery method returns the message, so calls can be chained.
Members
Constructors
- newWebhookMessage()
Creates a WebhookMessage.
Methods
- WebhookMessageavatarUrl(String)
A picture for the poster, as an http or https image URL.
- WebhookMessageembed(WebhookEmbed)
Adds an embed.
- WebhookMessagetext(String)
The text above the embeds, at most 2000 characters.
- WebhookMessageusername(String)
The name the message is posted under, at most 80 characters.
WebhookMessage()
public WebhookMessage()Creates a WebhookMessage.
avatarUrl(String)
public WebhookMessage avatarUrl(String avatarUrl)A picture for the poster, as an http or https image URL.
Left out, Discord uses the webhook's own picture.
Parameters
avatarUrl- Avatar url.
embed(WebhookEmbed)
public WebhookMessage embed(WebhookEmbed embed)Adds an embed.
A message holds at most 10 embeds with 6000 characters in total; the rest is cut off.
Parameters
embed- Embed.
text(String)
public WebhookMessage text(String text)The text above the embeds, at most 2000 characters.
Discord markdown works.
Parameters
text- Text.
username(String)
public WebhookMessage username(String username)The name the message is posted under, at most 80 characters.
Left out, Discord uses the webhook's own name. Discord refuses names with "discord" or "clyde" in them; those are left out.
Parameters
username- Username.
Also allowed
Every class has these, as in plain Java.
equals, toString