Modifier and Type | Class and Description |
---|---|
static class |
DiscordWebhook.DiscordWebhookRequest
Class used to execute Discord Webhooks
|
Constructor and Description |
---|
DiscordWebhook(Configuration config) |
Modifier and Type | Method and Description |
---|---|
void |
addToQueue(WebhookMessage msg)
Add message to queue of given webhook
|
void |
clean(Player p)
Clean all data for the given player.
|
void |
close()
Close webhook
|
long |
getCooldown(Player p,
WebhookMessage.WebhookMessageType type) |
String |
getWebhookName()
Get the webhook name
|
boolean |
hasCooldown(Player p,
WebhookMessage.WebhookMessageType type) |
boolean |
ping(String asker)
Send test message to webhook
|
void |
runQueue()
Run queue each seconds.
|
void |
send(WebhookMessage msg)
Send the given message with adapted style to own webhook
|
void |
setCooldown(Player p,
WebhookMessage.WebhookMessageType type) |
public DiscordWebhook(Configuration config)
public long getCooldown(Player p, WebhookMessage.WebhookMessageType type)
public boolean hasCooldown(Player p, WebhookMessage.WebhookMessageType type)
public void setCooldown(Player p, WebhookMessage.WebhookMessageType type)
public void close()
Webhook
public String getWebhookName()
Webhook
getWebhookName
in interface Webhook
public void clean(Player p)
Webhook
public void addToQueue(WebhookMessage msg)
Webhook
addToQueue
in interface Webhook
msg
- the message to sendpublic void runQueue()
Webhook
public void send(WebhookMessage msg)
Webhook