Interface GuildManager

  • All Superinterfaces:
    AuditableRestAction<java.lang.Void>, Manager<GuildManager>, RestAction<java.lang.Void>

    public interface GuildManager
    extends Manager<GuildManager>
    Manager providing functionality to update one or more fields for a Guild.

    Example

    
     manager.setName("Official JDA Guild")
            .setIcon(null)
            .queue();
     manager.reset(GuildManager.NAME | GuildManager.ICON)
            .setName("Minn's Meme Den")
            .setExplicitContentLevel(Guild.ExplicitContentLevel.HIGH)
            .queue();
     
    See Also:
    Guild.getManager()
    • Field Detail

      • AFK_CHANNEL

        static final long AFK_CHANNEL
        Used to reset the afk channel field
        See Also:
        Constant Field Values
      • AFK_TIMEOUT

        static final long AFK_TIMEOUT
        Used to reset the afk timeout field
        See Also:
        Constant Field Values
      • SYSTEM_CHANNEL

        static final long SYSTEM_CHANNEL
        Used to reset the system channel field
        See Also:
        Constant Field Values
      • MFA_LEVEL

        static final long MFA_LEVEL
        Used to reset the mfa level field
        See Also:
        Constant Field Values
      • NOTIFICATION_LEVEL

        static final long NOTIFICATION_LEVEL
        Used to reset the default notification level field
        See Also:
        Constant Field Values
      • EXPLICIT_CONTENT_LEVEL

        static final long EXPLICIT_CONTENT_LEVEL
        Used to reset the explicit content level field
        See Also:
        Constant Field Values
      • VERIFICATION_LEVEL

        static final long VERIFICATION_LEVEL
        Used to reset the verification level field
        See Also:
        Constant Field Values
      • VANITY_URL

        static final long VANITY_URL
        Used to reset the vanity code field
        See Also:
        Constant Field Values
      • DESCRIPTION

        static final long DESCRIPTION
        Used to reset the description field
        See Also:
        Constant Field Values
      • RULES_CHANNEL

        static final long RULES_CHANNEL
        Used to reset the rules channel field
        See Also:
        Constant Field Values
      • COMMUNITY_UPDATES_CHANNEL

        static final long COMMUNITY_UPDATES_CHANNEL
        Used to reset the community updates channel field
        See Also:
        Constant Field Values
    • Method Detail

      • getGuild

        @Nonnull
        Guild getGuild()
        The Guild object of this Manager. Useful if this Manager was returned via a create function
        Returns:
        The Guild of this Manager
      • setName

        @Nonnull
        @CheckReturnValue
        GuildManager setName​(@Nonnull
                             java.lang.String name)
        Sets the name of this Guild.
        Parameters:
        name - The new name for this Guild
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided name is null or not between 2-100 characters long
      • setIcon

        @Nonnull
        @CheckReturnValue
        GuildManager setIcon​(@Nullable
                             Icon icon)
        Sets the Icon of this Guild.
        Parameters:
        icon - The new icon for this Guild or null to reset
        Returns:
        GuildManager for chaining convenience
      • setSplash

        @Nonnull
        @CheckReturnValue
        GuildManager setSplash​(@Nullable
                               Icon splash)
        Sets the Splash Icon of this Guild.
        Parameters:
        splash - The new splash for this Guild or null to reset
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalStateException - If the guild's features do not include INVITE_SPLASH
      • setAfkChannel

        @Nonnull
        @CheckReturnValue
        GuildManager setAfkChannel​(@Nullable
                                   VoiceChannel afkChannel)
        Sets the AFK VoiceChannel of this Guild.
        Parameters:
        afkChannel - The new afk channel for this Guild or null to reset
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided channel is not from this guild
      • setSystemChannel

        @Nonnull
        @CheckReturnValue
        GuildManager setSystemChannel​(@Nullable
                                      TextChannel systemChannel)
        Sets the system TextChannel of this Guild.
        Parameters:
        systemChannel - The new system channel for this Guild or null to reset
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided channel is not from this guild
      • setRulesChannel

        @Nonnull
        @CheckReturnValue
        GuildManager setRulesChannel​(@Nullable
                                     TextChannel rulesChannel)
        Sets the rules TextChannel of this Guild.
        Parameters:
        rulesChannel - The new rules channel for this Guild or null to reset
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided channel is not from this guild
      • setCommunityUpdatesChannel

        @Nonnull
        @CheckReturnValue
        GuildManager setCommunityUpdatesChannel​(@Nullable
                                                TextChannel communityUpdatesChannel)
        Sets the community updates TextChannel of this Guild.
        Parameters:
        communityUpdatesChannel - The new community updates channel for this Guild or null to reset
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided channel is not from this guild
      • setAfkTimeout

        @Nonnull
        @CheckReturnValue
        GuildManager setAfkTimeout​(@Nonnull
                                   Guild.Timeout timeout)
        Sets the afk Timeout of this Guild.
        Parameters:
        timeout - The new afk timeout for this Guild
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided timeout is null
      • setVerificationLevel

        @Nonnull
        @CheckReturnValue
        GuildManager setVerificationLevel​(@Nonnull
                                          Guild.VerificationLevel level)
        Sets the Verification Level of this Guild.
        Parameters:
        level - The new Verification Level for this Guild
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided level is null or UNKNOWN
      • setDefaultNotificationLevel

        @Nonnull
        @CheckReturnValue
        GuildManager setDefaultNotificationLevel​(@Nonnull
                                                 Guild.NotificationLevel level)
        Sets the Notification Level of this Guild.
        Parameters:
        level - The new Notification Level for this Guild
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided level is null or UNKNOWN
      • setRequiredMFALevel

        @Nonnull
        @CheckReturnValue
        GuildManager setRequiredMFALevel​(@Nonnull
                                         Guild.MFALevel level)
        Sets the MFA Level of this Guild.
        Parameters:
        level - The new MFA Level for this Guild
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided level is null or UNKNOWN
      • setExplicitContentLevel

        @Nonnull
        @CheckReturnValue
        GuildManager setExplicitContentLevel​(@Nonnull
                                             Guild.ExplicitContentLevel level)
        Sets the Explicit Content Level of this Guild.
        Parameters:
        level - The new MFA Level for this Guild
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If the provided level is null or UNKNOWN
      • setBanner

        @Nonnull
        @CheckReturnValue
        GuildManager setBanner​(@Nullable
                               Icon banner)
        Sets the Banner Icon of this Guild.
        Parameters:
        banner - The new banner for this Guild or null to reset
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalStateException - If the guild's features do not include BANNER
      • setVanityCode

        @Nonnull
        @CheckReturnValue
        GuildManager setVanityCode​(@Nullable
                                   java.lang.String code)
        Sets the Vanity Code Icon of this Guild.
        Parameters:
        code - The new vanity code for this Guild or null to reset
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalStateException - If the guild's features do not include VANITY_URL
      • setDescription

        @Nonnull
        @CheckReturnValue
        GuildManager setDescription​(@Nullable
                                    java.lang.String description)
        Sets the Description Icon of this Guild.
        Parameters:
        description - The new description for this Guild or null to reset
        Returns:
        GuildManager for chaining convenience
        Throws:
        java.lang.IllegalStateException - If the guild's features do not include VERIFIED