public class WebhookAction extends AuditableRestAction<Webhook>
Webhook
Builder system created as an extension of RestAction
Webhooks
.AuditableRestAction.EmptyRestAction<T>, AuditableRestAction.FailedRestAction<T>
DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG
Constructor and Description |
---|
WebhookAction(JDA api,
net.dv8tion.jda.core.requests.Route.CompiledRoute route,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
okhttp3.RequestBody |
finalizeData() |
WebhookAction |
setAvatar(Icon icon)
Sets the Avatar for the custom Webhook User
|
WebhookAction |
setName(java.lang.String name)
Sets the Name for the custom Webhook User
|
reason
complete, complete, completeAfter, getJDA, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter
public WebhookAction(JDA api, net.dv8tion.jda.core.requests.Route.CompiledRoute route, java.lang.String name)
@CheckReturnValue public WebhookAction setName(java.lang.String name)
name
- A not-null String name for the new Webhook user.java.lang.IllegalArgumentException
- If the specified name is not in the range of 2-100.@CheckReturnValue public WebhookAction setAvatar(Icon icon)
icon
- An Icon
for the new avatar.
Or null to use default avatar.public okhttp3.RequestBody finalizeData()