public class RestWebhook extends Object
| Modifier and Type | Method and Description |
|---|---|
static RestWebhook |
create(RestClient restClient,
Snowflake id)
Create a
RestWebhook for a given ID. |
Mono<Void> |
delete(String reason)
Delete a webhook permanently.
|
Mono<discord4j.discordjson.json.WebhookData> |
getData()
Retrieve this webhook's data upon subscription.
|
Mono<discord4j.discordjson.json.WebhookData> |
modify(discord4j.discordjson.json.WebhookModifyRequest request,
String reason)
Modify a webhook.
|
public static RestWebhook create(RestClient restClient, Snowflake id)
RestWebhook for a given ID. This method does not perform any API request.restClient - the client to make API requestsid - the ID of this entityRestWebhook represented by this id.public Mono<discord4j.discordjson.json.WebhookData> getData()
Mono where, upon successful completion, emits the WebhookData belonging to this entity.
If an error is received, it is emitted through the Mono.public Mono<discord4j.discordjson.json.WebhookData> modify(discord4j.discordjson.json.WebhookModifyRequest request, @Nullable String reason)
Permission.MANAGE_WEBHOOKS permission. Returns the updated webhook
object on success.request - a request to modify the webhookreason - an optional reason for the audit logMono where, upon subscription, emits the updated WebhookData on success. If an error
is received, it is emitted through the Mono.public Mono<Void> delete(@Nullable String reason)
Permission.MANAGE_WEBHOOKS permission. Returns empty on
success.reason - an optional reason for the audit logMono where, upon subscription, emits a complete signal on success. If an error is received, it
is emitted through the Mono.