Class GuildManager


  • public class GuildManager
    extends net.dv8tion.jda.core.managers.impl.ManagerBase
    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

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

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

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

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

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

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

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

      • GuildManager

        public GuildManager​(Guild guild)
    • Method Detail

      • getGuild

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

        @CheckReturnValue
        public GuildManager reset()
        Resets all fields for this manager.
        Returns:
        GuildManager for chaining convenience
      • setName

        @CheckReturnValue
        public GuildManager setName​(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

        @CheckReturnValue
        public GuildManager setIcon​(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

        @CheckReturnValue
        public GuildManager setSplash​(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.IllegalArgumentException - If the guild's features does not include INVITE_SPLASH
      • setAfkChannel

        @CheckReturnValue
        public GuildManager setAfkChannel​(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

        @CheckReturnValue
        public GuildManager setSystemChannel​(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
      • setAfkTimeout

        @CheckReturnValue
        public GuildManager setAfkTimeout​(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

        @CheckReturnValue
        public GuildManager setVerificationLevel​(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

        @CheckReturnValue
        public GuildManager setDefaultNotificationLevel​(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

        @CheckReturnValue
        public GuildManager setRequiredMFALevel​(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

        @CheckReturnValue
        public GuildManager setExplicitContentLevel​(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