Package discord4j.core.spec.legacy
Class LegacyWebhookEditSpec
- java.lang.Object
-
- discord4j.core.spec.legacy.LegacyWebhookEditSpec
-
- All Implemented Interfaces:
LegacyAuditSpec<discord4j.discordjson.json.WebhookModifyRequest>,LegacySpec<discord4j.discordjson.json.WebhookModifyRequest>
public class LegacyWebhookEditSpec extends Object implements LegacyAuditSpec<discord4j.discordjson.json.WebhookModifyRequest>
LegacySpec to modify aWebhookentity.- See Also:
- Modify Webhook
-
-
Constructor Summary
Constructors Constructor Description LegacyWebhookEditSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description discord4j.discordjson.json.WebhookModifyRequestasRequest()StringgetReason()Returns the current audit log reason set on the spec.LegacyWebhookEditSpecsetAvatar(Image avatar)Sets the image of the modifiedWebhook.LegacyWebhookEditSpecsetChannel(Snowflake id)Sets the channel ID of the modifiedWebhook.LegacyWebhookEditSpecsetName(String name)Sets the name of the modifiedWebhook.LegacyWebhookEditSpecsetReason(String reason)Sets the reason to show in the audit logs when the spec is built.
-
-
-
Method Detail
-
setName
public LegacyWebhookEditSpec setName(String name)
Sets the name of the modifiedWebhook.- Parameters:
name- The webhook name.- Returns:
- This spec.
-
setAvatar
public LegacyWebhookEditSpec setAvatar(@Nullable Image avatar)
Sets the image of the modifiedWebhook.- Parameters:
avatar- The webhook image.- Returns:
- This spec.
-
setChannel
public LegacyWebhookEditSpec 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 LegacyWebhookEditSpec setReason(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.WebhookModifyRequest>- 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.WebhookModifyRequest>- Returns:
- The current audit log reason.
-
asRequest
public discord4j.discordjson.json.WebhookModifyRequest asRequest()
- Specified by:
asRequestin interfaceLegacySpec<discord4j.discordjson.json.WebhookModifyRequest>
-
-