Package discord4j.core.spec
Class WebhookEditSpec
- java.lang.Object
-
- discord4j.core.spec.WebhookEditSpec
-
- All Implemented Interfaces:
AuditSpec<discord4j.discordjson.json.WebhookModifyRequest>
,Spec<discord4j.discordjson.json.WebhookModifyRequest>
public class WebhookEditSpec extends Object implements AuditSpec<discord4j.discordjson.json.WebhookModifyRequest>
Spec to modify aWebhook
entity.- See Also:
- Modify Webhook
-
-
Constructor Summary
Constructors Constructor Description WebhookEditSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description discord4j.discordjson.json.WebhookModifyRequest
asRequest()
String
getReason()
Returns the current audit log reason set on the spec.WebhookEditSpec
setAvatar(Image avatar)
Sets the image of the modifiedWebhook
.WebhookEditSpec
setChannel(Snowflake id)
Sets the channel ID of the modifiedWebhook
.WebhookEditSpec
setName(String name)
Sets the name of the modifiedWebhook
.WebhookEditSpec
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.
-
-
-
Method Detail
-
setName
public WebhookEditSpec setName(String name)
Sets the name of the modifiedWebhook
.- Parameters:
name
- The webhook name.- Returns:
- This spec.
-
setAvatar
public WebhookEditSpec setAvatar(@Nullable Image avatar)
Sets the image of the modifiedWebhook
.- Parameters:
avatar
- The webhook image.- Returns:
- This spec.
-
setChannel
public WebhookEditSpec setChannel(@Nullable Snowflake id)
Sets the channel ID of the modifiedWebhook
.- Parameters:
id
- the new channel id this webhook should be moved to- Returns:
- This spec.
-
setReason
public WebhookEditSpec setReason(String reason)
Description copied from interface:AuditSpec
Sets the reason to show in the audit logs when the spec is built.
-
getReason
@Nullable public String getReason()
Description copied from interface:AuditSpec
Returns the current audit log reason set on the spec.
-
-