public class Webhook
extends java.lang.Object
| Constructor and Description |
|---|
Webhook(java.lang.String webookUrl,
java.lang.String userAgent)
Creates an object that represents a Discord Webhook for a Discord channel.
|
Webhook(java.lang.String webookUrl,
java.lang.String userAgent,
boolean debugMode)
Creates an object that represents a Discord Webhook for a Discord channel.
|
| Modifier and Type | Method and Description |
|---|---|
Response |
sendMessage(Message message)
Sends a message to Discord using your webhook.
|
Response |
sendMessageUnsafely(Message message)
Sends a message to Discord using your webhook.
|
public Webhook(java.lang.String webookUrl,
java.lang.String userAgent)
webookUrl - The URL of your webhook.userAgent - The user agent to use when sending your requests.public Webhook(java.lang.String webookUrl,
java.lang.String userAgent,
boolean debugMode)
webookUrl - The URL of your webhook.userAgent - The user agent to use when sending your requests.debugMode - Should debug mode be enabled.@Nullable public Response sendMessageUnsafely(Message message)
message - The message to send.@Nullable public Response sendMessage(Message message) throws java.io.IOException
message - The message to send.java.io.IOException - This will happen if the request can not be sent properly.