Class DiscordWebhook
- java.lang.Object
-
- net.eternalclient.api.utilities.discord.DiscordWebhook
-
public class DiscordWebhook extends java.lang.ObjectThis class represents a Discord webhook object used to send messages with various customization options.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDiscordWebhook.EmbedObjectThis class represents an object used to create an embed message for a bot, with methods to set various properties such as title, description, and color.
-
Constructor Summary
Constructors Constructor Description DiscordWebhook(java.lang.String url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DiscordWebhookaddEmbed(DiscordWebhook.EmbedObject embed)DiscordWebhookaddFile(java.awt.image.BufferedImage bufferedImage)DiscordWebhookaddFile(java.io.File file)voidexecute()java.lang.StringgetAvatarUrl()java.awt.image.BufferedImagegetBufferedImage()java.lang.StringgetContent()java.util.List<DiscordWebhook.EmbedObject>getEmbeds()java.io.FilegetFile()java.lang.StringgetUrl()java.lang.StringgetUsername()booleanisTts()DiscordWebhooksetAvatarUrl(java.lang.String avatarUrl)DiscordWebhooksetContent(java.lang.String content)DiscordWebhooksetTts(boolean tts)DiscordWebhooksetUsername(java.lang.String username)
-
-
-
Method Detail
-
setContent
public DiscordWebhook setContent(java.lang.String content)
-
setUsername
public DiscordWebhook setUsername(java.lang.String username)
-
setAvatarUrl
public DiscordWebhook setAvatarUrl(java.lang.String avatarUrl)
-
setTts
public DiscordWebhook setTts(boolean tts)
-
addEmbed
public DiscordWebhook addEmbed(DiscordWebhook.EmbedObject embed)
-
addFile
public DiscordWebhook addFile(java.io.File file)
-
addFile
public DiscordWebhook addFile(java.awt.image.BufferedImage bufferedImage)
-
execute
public void execute() throws java.io.IOException- Throws:
java.io.IOException
-
getUrl
public java.lang.String getUrl()
-
getEmbeds
public java.util.List<DiscordWebhook.EmbedObject> getEmbeds()
-
getContent
public java.lang.String getContent()
-
getUsername
public java.lang.String getUsername()
-
getAvatarUrl
public java.lang.String getAvatarUrl()
-
getFile
public java.io.File getFile()
-
isTts
public boolean isTts()
-
getBufferedImage
public java.awt.image.BufferedImage getBufferedImage()
-
-