Class 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 a Webhook entity.
    See Also:
    Modify Webhook
    • Constructor Detail

      • WebhookEditSpec

        public WebhookEditSpec()
    • Method Detail

      • setName

        public WebhookEditSpec setName​(String name)
        Sets the name of the modified Webhook.
        Parameters:
        name - The webhook name.
        Returns:
        This spec.
      • setChannel

        public WebhookEditSpec setChannel​(@Nullable
                                          Snowflake id)
        Sets the channel ID of the modified Webhook.
        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.
        Specified by:
        setReason in interface AuditSpec<discord4j.discordjson.json.WebhookModifyRequest>
        Parameters:
        reason - The audit log reason.
        Returns:
        This spec.
      • getReason

        @Nullable
        public String getReason()
        Description copied from interface: AuditSpec
        Returns the current audit log reason set on the spec.
        Specified by:
        getReason in interface AuditSpec<discord4j.discordjson.json.WebhookModifyRequest>
        Returns:
        The current audit log reason.
      • asRequest

        public discord4j.discordjson.json.WebhookModifyRequest asRequest()
        Specified by:
        asRequest in interface Spec<discord4j.discordjson.json.WebhookModifyRequest>