Class WebhookAction

    • Constructor Detail

      • WebhookAction

        public WebhookAction​(JDA api,
                             net.dv8tion.jda.core.requests.Route.CompiledRoute route,
                             java.lang.String name)
    • Method Detail

      • setName

        @CheckReturnValue
        public WebhookAction setName​(java.lang.String name)
        Sets the Name for the custom Webhook User
        Parameters:
        name - A not-null String name for the new Webhook user.
        Returns:
        The current WebhookAction for chaining convenience.
        Throws:
        java.lang.IllegalArgumentException - If the specified name is not in the range of 2-100.
      • setCheck

        public WebhookAction setCheck​(java.util.function.BooleanSupplier checks)
        Description copied from class: RestAction
        Sets the last-second checks before finally executing the http request in the queue.
        If the provided supplier evaluates to false or throws an exception this will not be finished. When an exception is thrown from the supplier it will be provided to the failure callback.
        Overrides:
        setCheck in class AuditableRestAction<Webhook>
        Parameters:
        checks - The checks to run before executing the request, or null to run no checks
        Returns:
        The current RestAction for chaining convenience
      • setAvatar

        @CheckReturnValue
        public WebhookAction setAvatar​(Icon icon)
        Sets the Avatar for the custom Webhook User
        Parameters:
        icon - An Icon for the new avatar. Or null to use default avatar.
        Returns:
        The current WebhookAction for chaining convenience.
      • finalizeData

        public okhttp3.RequestBody finalizeData()