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 a
Webhook
entity.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondiscord4j.discordjson.json.WebhookModifyRequest
Returns the current audit log reason set on the spec.Sets the image of the modifiedWebhook
.setChannel
(Snowflake id) Sets the channel ID of the modifiedWebhook
.Sets the name of the modifiedWebhook
.Sets the reason to show in the audit logs when the spec is built.
-
Constructor Details
-
LegacyWebhookEditSpec
public LegacyWebhookEditSpec()
-
-
Method Details
-
setName
Sets the name of the modifiedWebhook
.- Parameters:
name
- The webhook name.- Returns:
- This spec.
-
setAvatar
Sets the image of the modifiedWebhook
.- Parameters:
avatar
- The webhook image.- Returns:
- This spec.
-
setChannel
Sets the channel ID of the modifiedWebhook
.- Parameters:
id
- the new channel id this webhook should be moved to- Returns:
- This spec.
-
setReason
Description copied from interface:LegacyAuditSpec
Sets the reason to show in the audit logs when the spec is built.- Specified by:
setReason
in interfaceLegacyAuditSpec<discord4j.discordjson.json.WebhookModifyRequest>
- Parameters:
reason
- The audit log reason.- Returns:
- This spec.
-
getReason
Description copied from interface:LegacyAuditSpec
Returns the current audit log reason set on the spec.- Specified by:
getReason
in interfaceLegacyAuditSpec<discord4j.discordjson.json.WebhookModifyRequest>
- Returns:
- The current audit log reason.
-
asRequest
public discord4j.discordjson.json.WebhookModifyRequest asRequest()- Specified by:
asRequest
in interfaceLegacySpec<discord4j.discordjson.json.WebhookModifyRequest>
-