public interface Webhook extends ISnowflake
Modifier and Type | Method and Description |
---|---|
AuditableRestAction<java.lang.Void> |
delete()
Deletes this Webhook.
|
TextChannel |
getChannel()
The
TextChannel instance
this Webhook is attached to. |
User |
getDefaultUser()
The default User for this Webhook.
|
Guild |
getGuild()
The
Guild instance
for this Webhook. |
JDA |
getJDA()
The JDA instance of this Webhook.
|
WebhookManager |
getManager()
The
Manager
for this Webhook. |
WebhookManagerUpdatable |
getManagerUpdatable()
The
Manager
for this Webhook. |
java.lang.String |
getName()
The name of this Webhook.
|
Member |
getOwner()
The owner of this Webhook.
|
java.lang.String |
getToken()
The execute token for this Webhook.
|
java.lang.String |
getUrl()
The
POST route for this Webhook. |
WebhookClientBuilder |
newClient()
Creates a new
WebhookClientBuilder instance
for this Webhook instance. |
getCreationTime, getId, getIdLong
JDA getJDA()
Guild getGuild()
TextChannel getChannel()
TextChannel
instance
this Webhook is attached to.Member getOwner()
Member
instance
representing the owner of this WebhookUser getDefaultUser()
The User
returned is always fake
.
This User is used for all messages posted to the Webhook route (found in getUrl()
),
it holds the default references for the message authors of messages by this Webhook.
When POST
ing to a Webhook route the name/avatar of this default user
can be overridden.
User
instance
representing the default webhook user.java.lang.String getName()
This is a shortcut for
.getDefaultUser()
.getName()
java.lang.String getToken()
java.lang.String getUrl()
POST
route for this Webhook.
token
and id
of this Webhook.
The route returned by this method does not need permission checks
to be executed.
It is implied that Webhook messages always have all permissions
including mentioning everyone
.
Webhook executions are limited with 5 requests per second. The response contains rate limit headers that should be handled by execution frameworks. (Learn More)
@CheckReturnValue AuditableRestAction<java.lang.Void> delete()
AuditableRestAction
WebhookManager getManager()
Manager
for this Webhook.
WebhookManager
for this WebhookWebhookManagerUpdatable getManagerUpdatable()
Manager
for this Webhook.
fields
of this Webhook which can be modified and updated.WebhookManagerUpdatable
for this WebhookWebhookClientBuilder newClient()
WebhookClientBuilder
instance
for this Webhook instance.
Remember to close the WebhookClient once you don't need it anymore to free resources!