Package discord4j.core.spec.legacy
Class LegacyWebhookCreateSpec
- java.lang.Object
-
- discord4j.core.spec.legacy.LegacyWebhookCreateSpec
-
- All Implemented Interfaces:
LegacyAuditSpec<discord4j.discordjson.json.WebhookCreateRequest>,LegacySpec<discord4j.discordjson.json.WebhookCreateRequest>
public class LegacyWebhookCreateSpec extends Object implements LegacyAuditSpec<discord4j.discordjson.json.WebhookCreateRequest>
LegacySpec used to create aWebhookentity.- See Also:
- Create Webhook
-
-
Constructor Summary
Constructors Constructor Description LegacyWebhookCreateSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description discord4j.discordjson.json.WebhookCreateRequestasRequest()StringgetReason()Returns the current audit log reason set on the spec.LegacyWebhookCreateSpecsetAvatar(Image avatar)Sets the image of the createdWebhook.LegacyWebhookCreateSpecsetName(String name)Sets the name of the createdWebhook.LegacyWebhookCreateSpecsetReason(String reason)Sets the reason to show in the audit logs when the spec is built.
-
-
-
Method Detail
-
setName
public LegacyWebhookCreateSpec setName(String name)
Sets the name of the createdWebhook.- Parameters:
name- The webhook name.- Returns:
- This spec.
-
setAvatar
public LegacyWebhookCreateSpec setAvatar(@Nullable Image avatar)
Sets the image of the createdWebhook.- Parameters:
avatar- The webhook image.- Returns:
- This spec.
-
setReason
public LegacyWebhookCreateSpec setReason(@Nullable String reason)
Description copied from interface:LegacyAuditSpecSets the reason to show in the audit logs when the spec is built.- Specified by:
setReasonin interfaceLegacyAuditSpec<discord4j.discordjson.json.WebhookCreateRequest>- Parameters:
reason- The audit log reason.- Returns:
- This spec.
-
getReason
@Nullable public String getReason()
Description copied from interface:LegacyAuditSpecReturns the current audit log reason set on the spec.- Specified by:
getReasonin interfaceLegacyAuditSpec<discord4j.discordjson.json.WebhookCreateRequest>- Returns:
- The current audit log reason.
-
asRequest
public discord4j.discordjson.json.WebhookCreateRequest asRequest()
- Specified by:
asRequestin interfaceLegacySpec<discord4j.discordjson.json.WebhookCreateRequest>
-
-