Interface WebhookManager

    • Method Detail

      • reset

        @Nonnull
        WebhookManager reset​(long fields)
        Resets the fields specified by the provided bit-flag pattern. You can specify a combination by using a bitwise OR concat of the flag constants.
        Example: manager.reset(WebhookManager.CHANNEL | WebhookManager.NAME);

        Flag Constants:

        Specified by:
        reset in interface Manager<WebhookManager>
        Parameters:
        fields - Integer value containing the flags to reset.
        Returns:
        WebhookManager for chaining convenience
      • reset

        @Nonnull
        WebhookManager reset​(long... fields)
        Resets the fields specified by the provided bit-flag patterns. You can specify a combination by using a bitwise OR concat of the flag constants.
        Example: manager.reset(WebhookManager.CHANNEL, WebhookManager.NAME);

        Flag Constants:

        Specified by:
        reset in interface Manager<WebhookManager>
        Parameters:
        fields - Integer values containing the flags to reset.
        Returns:
        WebhookManager for chaining convenience
      • getWebhook

        @Nonnull
        Webhook getWebhook()
        The target Webhook that will be modified by this manager
        Returns:
        The target Webhook
      • getGuild

        @Nonnull
        default Guild getGuild()
        The Guild this Manager's Webhook is in.
        This is logically the same as calling getWebhook().getGuild()
        Returns:
        The parent Guild
      • setName

        @Nonnull
        @CheckReturnValue
        WebhookManager setName​(@Nonnull
                               java.lang.String name)
        Sets the default name of the selected Webhook.

        A webhook name must not be null or blank!

        Parameters:
        name - The new default name for the selected Webhook
        Returns:
        WebhookManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided name is null or blank
      • setAvatar

        @Nonnull
        @CheckReturnValue
        WebhookManager setAvatar​(@Nullable
                                 Icon icon)
        Sets the default avatar of the selected Webhook.
        Parameters:
        icon - The new default avatar Icon for the selected Webhook or null to reset
        Returns:
        WebhookManager for chaining convenience
      • setChannel

        @Nonnull
        @CheckReturnValue
        WebhookManager setChannel​(@Nonnull
                                  TextChannel channel)
        Sets the TextChannel of the selected Webhook.

        A webhook channel must not be null and must be in the same Guild!

        Parameters:
        channel - The new TextChannel for the selected Webhook
        Returns:
        WebhookManager for chaining convenience
        Throws:
        InsufficientPermissionException - If the currently logged in account does not have the Permission MANAGE_WEBHOOKS in the specified TextChannel
        java.lang.IllegalArgumentException - If the provided channel is null or from a different Guild