Interface Guild

  • All Superinterfaces:
    ISnowflake

    public interface Guild
    extends ISnowflake
    Represents a Discord Guild. This should contain all information provided from Discord about a Guild.
    • Method Detail

      • retrieveRegions

        @CheckReturnValue
        default RestAction<java.util.EnumSet<Region>> retrieveRegions()
        Retrieves the available regions for this Guild
        Shortcut for retrieveRegions(true)
        This will include deprecated voice regions by default.
        Returns:
        RestAction - Type EnumSet
      • retrieveRegions

        @CheckReturnValue
        RestAction<java.util.EnumSet<Region>> retrieveRegions​(boolean includeDeprecated)
        Retrieves the available regions for this Guild
        Parameters:
        includeDeprecated - Whether to include deprecated regions
        Returns:
        RestAction - Type EnumSet
      • addMember

        @CheckReturnValue
        MemberAction addMember​(java.lang.String accessToken,
                               java.lang.String userId)
        Adds the user represented by the provided id to this guild.
        This requires an OAuth2 Access Token with the scope guilds.join.
        Parameters:
        accessToken - The access token
        userId - The user id
        Returns:
        MemberAction
        Throws:
        java.lang.IllegalArgumentException - If the user id or access token is blank, empty, or null, or if the provided user is already in this guild
        InsufficientPermissionException - If the currently logged in account does not have Permission.CREATE_INSTANT_INVITE
        Since:
        3.7.0
        See Also:
        Discord OAuth2 Documentation
      • addMember

        @CheckReturnValue
        default MemberAction addMember​(java.lang.String accessToken,
                                       User user)
        Adds the provided user to this guild.
        This requires an OAuth2 Access Token with the scope guilds.join.
        Parameters:
        accessToken - The access token
        user - The user
        Returns:
        MemberAction
        Throws:
        java.lang.IllegalArgumentException - If the user or access token is blank, empty, or null, or if the provided user is already in this guild
        InsufficientPermissionException - If the currently logged in account does not have Permission.CREATE_INSTANT_INVITE
        Since:
        3.7.0
        See Also:
        Discord OAuth2 Documentation
      • addMember

        @CheckReturnValue
        default MemberAction addMember​(java.lang.String accessToken,
                                       long userId)
        Adds the user represented by the provided id to this guild.
        This requires an OAuth2 Access Token with the scope guilds.join.
        Parameters:
        accessToken - The access token
        userId - The user id
        Returns:
        MemberAction
        Throws:
        java.lang.IllegalArgumentException - If the user id or access token is blank, empty, or null, or if the provided user is already in this guild
        InsufficientPermissionException - If the currently logged in account does not have Permission.CREATE_INSTANT_INVITE
        Since:
        3.7.0
        See Also:
        Discord OAuth2 Documentation
      • getName

        java.lang.String getName()
        The human readable name of the Guild.

        This value can be modified using GuildManager.setName(String).

        Returns:
        Never-null String containing the Guild's name.
      • getIconId

        java.lang.String getIconId()
        The Discord hash-id of the Guild icon image. If no icon has been set, this returns null.

        The Guild icon can be modified using GuildManager.setIcon(Icon).

        Returns:
        Possibly-null String containing the Guild's icon hash-id.
      • getIconUrl

        java.lang.String getIconUrl()
        The URL of the Guild icon image. If no icon has been set, this returns null.

        The Guild icon can be modified using GuildManager.setIcon(Icon).

        Returns:
        Possibly-null String containing the Guild's icon URL.
      • getFeatures

        java.util.Set<java.lang.String> getFeatures()
        The Features of the Guild.

        Possible known features:

        • VIP_REGIONS - Guild has VIP voice regions
        • VANITY_URL - Guild a vanity URL (custom invite link). See getVanityUrl()
        • INVITE_SPLASH - Guild has custom invite splash. See getSplashId() and getSplashUrl()
        • VERIFIED - Guild is "verified"
        • MORE_EMOJI - Guild is able to use more than 50 emoji
        Returns:
        Never-null, unmodifiable Set containing all of the Guild's features.
      • getSplashId

        java.lang.String getSplashId()
        The Discord hash-id of the splash image for this Guild. A Splash image is an image displayed when viewing a Discord Guild Invite on the web or in client just before accepting or declining the invite. If no splash has been set, this returns null.
        Splash images are VIP/Partner Guild only.

        The Guild splash can be modified using GuildManager.setSplash(Icon).

        Returns:
        Possibly-null String containing the Guild's splash hash-id
      • getSplashUrl

        java.lang.String getSplashUrl()
        The URL of the splash image for this Guild. A Splash image is an image displayed when viewing a Discord Guild Invite on the web or in client just before accepting or declining the invite. If no splash has been set, this returns null.
        Splash images are VIP/Partner Guild only.

        The Guild splash can be modified using GuildManager.setSplash(Icon).

        Returns:
        Possibly-null String containing the Guild's splash URL.
      • getVanityUrl

        @CheckReturnValue
        RestAction<java.lang.String> getVanityUrl()
        Gets the vanity url for this Guild. The vanity url is the custom invite code of partnered / official Guilds. The returned String will be the code that can be provided to discord.gg/{code} to get the invite link.
        You can check getFeatures() to see if this Guild has a vanity url

        This action requires the MANAGE_SERVER permission.

        Possible ErrorResponses caused by the returned RestAction include the following:

        Returns:
        RestAction - Type: String
        The vanity url of this server
        Throws:
        InsufficientPermissionException - If the logged in account does not have the MANAGE_SERVER permission.
        java.lang.IllegalStateException - If the guild doesn't have the VANITY_URL feature
        See Also:
        getFeatures()
      • getOwnerIdLong

        long getOwnerIdLong()
        The ID for the current owner of this guild.
        This is useful for debugging purposes or as a shortcut.
        Returns:
        The ID for the current owner
        See Also:
        getOwner()
      • getOwnerId

        default java.lang.String getOwnerId()
        The ID for the current owner of this guild.
        This is useful for debugging purposes or as a shortcut.
        Returns:
        The ID for the current owner
        See Also:
        getOwner()
      • getRegion

        default Region getRegion()
        The Voice Region that this Guild is using for audio connections.
        If the Region is not recognized, returns UNKNOWN but you can still use the getRegionRaw() to retrieve the raw name this region has.

        This value can be modified using GuildManager.setRegion(net.dv8tion.jda.core.Region).

        Returns:
        The the audio Region this Guild is using for audio connections. Can return Region.UNKNOWN.
      • isMember

        boolean isMember​(User user)
        Used to determine if the provided User is a member of this Guild.
        Parameters:
        user - The user to determine whether or not they are a member of this guild.
        Returns:
        True - if this user is present in this guild.
      • getSelfMember

        Member getSelfMember()
        Gets the Member object of the currently logged in account in this guild.
        This is basically JDA.getSelfUser() being provided to getMember(User).
        Returns:
        The Member object of the currently logged in account.
      • getMember

        Member getMember​(User user)
        Gets the Guild specific Member object for the provided User.
        If the user is not in this guild, null is returned.
        Parameters:
        user - The User which to retrieve a related Member object for.
        Returns:
        Possibly-null Member for the related User.
      • getMemberById

        default Member getMemberById​(java.lang.String userId)
        Gets a Member object via the id of the user. The id relates to ISnowflake.getId(), and this method is similar to JDA.getUserById(String)
        This is more efficient that using JDA.getUserById(String) and getMember(User).
        If no Member in this Guild has the userId provided, this returns null.
        Parameters:
        userId - The Discord id of the User for which a Member object is requested.
        Returns:
        Possibly-null Member with the related userId.
        Throws:
        java.lang.NumberFormatException - If the provided id cannot be parsed by Long.parseLong(String)
      • getMemberById

        default Member getMemberById​(long userId)
        Gets a Member object via the id of the user. The id relates to ISnowflake.getIdLong(), and this method is similar to JDA.getUserById(long)
        This is more efficient that using JDA.getUserById(long) and getMember(User).
        If no Member in this Guild has the userId provided, this returns null.
        Parameters:
        userId - The Discord id of the User for which a Member object is requested.
        Returns:
        Possibly-null Member with the related userId.
      • getMembers

        default java.util.List<Member> getMembers()
        A list of all Members in this Guild.
        The Members are not provided in any particular order.
        Returns:
        Immutable list of all members in this Guild.
      • getMembersByName

        default java.util.List<Member> getMembersByName​(java.lang.String name,
                                                        boolean ignoreCase)
        Gets a list of all Members who have the same name as the one provided.
        This compares against Member.getUser().getName()
        If there are no Members with the provided name, then this returns an empty list.
        Parameters:
        name - The name used to filter the returned Members.
        ignoreCase - Determines if the comparison ignores case when comparing. True - case insensitive.
        Returns:
        Possibly-empty immutable list of all Members with the same name as the name provided.
      • getMembersByNickname

        default java.util.List<Member> getMembersByNickname​(java.lang.String nickname,
                                                            boolean ignoreCase)
        Gets a list of all Members who have the same nickname as the one provided.
        This compares against Member.getNickname(). If a Member does not have a nickname, the comparison results as false.
        If there are no Members with the provided name, then this returns an empty list.
        Parameters:
        nickname - The nickname used to filter the returned Members.
        ignoreCase - Determines if the comparison ignores case when comparing. True - case insensitive.
        Returns:
        Possibly-empty immutable list of all Members with the same nickname as the nickname provided.
      • getMembersByEffectiveName

        default java.util.List<Member> getMembersByEffectiveName​(java.lang.String name,
                                                                 boolean ignoreCase)
        Gets a list of all Members who have the same effective name as the one provided.
        This compares against Member.getEffectiveName()}.
        If there are no Members with the provided name, then this returns an empty list.
        Parameters:
        name - The name used to filter the returned Members.
        ignoreCase - Determines if the comparison ignores case when comparing. True - case insensitive.
        Returns:
        Possibly-empty immutable list of all Members with the same effective name as the name provided.
      • getMembersWithRoles

        default java.util.List<Member> getMembersWithRoles​(Role... roles)
        Gets a list of Members that have all Roles provided.
        If there are no Members with all provided roles, then this returns an empty list.
        Parameters:
        roles - The Roles that a Member must have to be included in the returned list.
        Returns:
        Possibly-empty immutable list of Members with all provided Roles.
        Throws:
        java.lang.IllegalArgumentException - If a provided Role is from a different guild or null.
      • getMembersWithRoles

        default java.util.List<Member> getMembersWithRoles​(java.util.Collection<Role> roles)
        Gets a list of Members that have all provided Roles.
        If there are no Members with all provided roles, then this returns an empty list.
        Parameters:
        roles - The Roles that a Member must have to be included in the returned list.
        Returns:
        Possibly-empty immutable list of Members with all provided Roles.
        Throws:
        java.lang.IllegalArgumentException - If a provided Role is from a different guild or null.
      • getCategoryById

        default Category getCategoryById​(java.lang.String id)
        Gets the Category from this guild that matches the provided id. This method is similar to JDA.getCategoryById(String), but it only checks in this specific Guild.
        If there is no matching Category this returns null.
        Parameters:
        id - The snowflake ID of the wanted Category
        Returns:
        Possibly-null Category for the provided ID.
        Throws:
        java.lang.IllegalArgumentException - If the provided ID is not a valid long
      • getCategoryById

        default Category getCategoryById​(long id)
        Gets the Category from this guild that matches the provided id. This method is similar to JDA.getCategoryById(String), but it only checks in this specific Guild.
        If there is no matching Category this returns null.
        Parameters:
        id - The snowflake ID of the wanted Category
        Returns:
        Possibly-null Category for the provided ID.
      • getCategories

        default java.util.List<Category> getCategories()
        Gets all Categories in this Guild.
        The returned categories will be sorted according to their position.
        Returns:
        An immutable list of all Categories in this Guild.
      • getCategoriesByName

        default java.util.List<Category> getCategoriesByName​(java.lang.String name,
                                                             boolean ignoreCase)
        Gets a list of all Categories in this Guild that have the same name as the one provided.
        If there are no matching categories this will return an empty list.
        Parameters:
        name - The name to check
        ignoreCase - Whether to ignore case on name checking
        Returns:
        Immutable list of all categories matching the provided name
        Throws:
        java.lang.IllegalArgumentException - If the provided name is null
      • getTextChannelById

        default TextChannel getTextChannelById​(java.lang.String id)
        Gets a TextChannel from this guild that has the same id as the one provided. This method is similar to JDA.getTextChannelById(String), but it only checks this specific Guild for a TextChannel.
        If there is no TextChannel with an id that matches the provided one, then this returns null.
        Parameters:
        id - The id of the TextChannel.
        Returns:
        Possibly-null TextChannel with matching id.
        Throws:
        java.lang.NumberFormatException - If the provided id cannot be parsed by Long.parseLong(String)
      • getTextChannelById

        default TextChannel getTextChannelById​(long id)
        Gets a TextChannel from this guild that has the same id as the one provided. This method is similar to JDA.getTextChannelById(long), but it only checks this specific Guild for a TextChannel.
        If there is no TextChannel with an id that matches the provided one, then this returns null.
        Parameters:
        id - The id of the TextChannel.
        Returns:
        Possibly-null TextChannel with matching id.
      • getTextChannels

        default java.util.List<TextChannel> getTextChannels()
        Gets all TextChannels in this Guild.
        The channels returned will be sorted according to their position.
        Returns:
        An immutable List of all TextChannels in this Guild.
      • getTextChannelsByName

        default java.util.List<TextChannel> getTextChannelsByName​(java.lang.String name,
                                                                  boolean ignoreCase)
        Gets a list of all TextChannels in this Guild that have the same name as the one provided.
        If there are no TextChannels with the provided name, then this returns an empty list.
        Parameters:
        name - The name used to filter the returned TextChannels.
        ignoreCase - Determines if the comparison ignores case when comparing. True - case insensitive.
        Returns:
        Possibly-empty immutable list of all TextChannels names that match the provided name.
      • getVoiceChannelById

        default VoiceChannel getVoiceChannelById​(java.lang.String id)
        Gets a VoiceChannel from this guild that has the same id as the one provided. This method is similar to JDA.getVoiceChannelById(String), but it only checks this specific Guild for a VoiceChannel.
        If there is no VoiceChannel with an id that matches the provided one, then this returns null.
        Parameters:
        id - The id of the VoiceChannel.
        Returns:
        Possibly-null VoiceChannel with matching id.
        Throws:
        java.lang.NumberFormatException - If the provided id cannot be parsed by Long.parseLong(String)
      • getVoiceChannelById

        default VoiceChannel getVoiceChannelById​(long id)
        Gets a VoiceChannel from this guild that has the same id as the one provided. This method is similar to JDA.getVoiceChannelById(long), but it only checks this specific Guild for a VoiceChannel.
        If there is no VoiceChannel with an id that matches the provided one, then this returns null.
        Parameters:
        id - The id of the VoiceChannel.
        Returns:
        Possibly-null VoiceChannel with matching id.
      • getVoiceChannels

        default java.util.List<VoiceChannel> getVoiceChannels()
        Gets all VoiceChannels in this Guild.
        The channels returned will be sorted according to their position.
        Returns:
        An immutable List of VoiceChannels.
      • getVoiceChannelsByName

        default java.util.List<VoiceChannel> getVoiceChannelsByName​(java.lang.String name,
                                                                    boolean ignoreCase)
        Gets a list of all VoiceChannels in this Guild that have the same name as the one provided.
        If there are no VoiceChannels with the provided name, then this returns an empty list.
        Parameters:
        name - The name used to filter the returned VoiceChannels.
        ignoreCase - Determines if the comparison ignores case when comparing. True - case insensitive.
        Returns:
        Possibly-empty immutable list of all VoiceChannel names that match the provided name.
      • getChannels

        default java.util.List<Channel> getChannels()
        Populated list of channels for this guild. This includes all types of channels, such as category/voice/text.
        This includes hidden channels by default.

        The returned list is ordered in the same fashion as it would be by the official discord client.

        1. TextChannel without parent
        2. VoiceChannel without parent
        3. Categories
          1. TextChannel with category as parent
          2. VoiceChannel with category as parent
        Returns:
        Immutable list of channels for this guild
        See Also:
        getChannels(boolean)
      • getChannels

        java.util.List<Channel> getChannels​(boolean includeHidden)
        Populated list of channels for this guild. This includes all types of channels, such as category/voice/text.

        The returned list is ordered in the same fashion as it would be by the official discord client.

        1. TextChannel without parent
        2. VoiceChannel without parent
        3. Categories
          1. TextChannel with category as parent
          2. VoiceChannel with category as parent
        Parameters:
        includeHidden - Whether to include channels with denied View Channel Permission
        Returns:
        Immutable list of channels for this guild
        See Also:
        getChannels()
      • getRoleById

        default Role getRoleById​(java.lang.String id)
        Gets a Role from this guild that has the same id as the one provided.
        If there is no Role with an id that matches the provided one, then this returns null.
        Parameters:
        id - The id of the Role.
        Returns:
        Possibly-null Role with matching id.
        Throws:
        java.lang.NumberFormatException - If the provided id cannot be parsed by Long.parseLong(String)
      • getRoleById

        default Role getRoleById​(long id)
        Gets a Role from this guild that has the same id as the one provided.
        If there is no Role with an id that matches the provided one, then this returns null.
        Parameters:
        id - The id of the Role.
        Returns:
        Possibly-null Role with matching id.
      • getRoles

        default java.util.List<Role> getRoles()
        Gets all Roles in this Guild.
        The roles returned will be sorted according to their position.
        Returns:
        An immutable List of Roles.
      • getRolesByName

        default java.util.List<Role> getRolesByName​(java.lang.String name,
                                                    boolean ignoreCase)
        Gets a list of all Roles in this Guild that have the same name as the one provided.
        If there are no Roles with the provided name, then this returns an empty list.
        Parameters:
        name - The name used to filter the returned Roles.
        ignoreCase - Determines if the comparison ignores case when comparing. True - case insensitive.
        Returns:
        Possibly-empty immutable list of all Role names that match the provided name.
      • getEmoteById

        default Emote getEmoteById​(java.lang.String id)
        Gets an Emote from this guild that has the same id as the one provided.
        If there is no Emote with an id that matches the provided one, then this returns null.
        This will be null if CacheFlag.EMOTE is disabled.

        Unicode emojis are not included as Emote!

        Parameters:
        id - the emote id
        Returns:
        An Emote matching the specified Id.
        Throws:
        java.lang.NumberFormatException - If the provided id cannot be parsed by Long.parseLong(String)
      • getEmoteById

        default Emote getEmoteById​(long id)
        Gets an Emote from this guild that has the same id as the one provided.
        If there is no Emote with an id that matches the provided one, then this returns null.
        This will be null if CacheFlag.EMOTE is disabled.

        Unicode emojis are not included as Emote!

        Parameters:
        id - the emote id
        Returns:
        An Emote matching the specified Id.
      • getEmotes

        default java.util.List<Emote> getEmotes()
        Gets all custom Emotes belonging to this Guild.
        Emotes are not ordered in any specific way in the returned list.

        Unicode emojis are not included as Emote!

        Returns:
        An immutable List of Emotes.
      • getEmotesByName

        default java.util.List<Emote> getEmotesByName​(java.lang.String name,
                                                      boolean ignoreCase)
        Gets a list of all Emotes in this Guild that have the same name as the one provided.
        If there are no Emotes with the provided name, then this returns an empty list.
        This will be empty if CacheFlag.EMOTE is disabled.

        Unicode emojis are not included as Emote!

        Parameters:
        name - The name used to filter the returned Emotes.
        ignoreCase - Determines if the comparison ignores case when comparing. True - case insensitive.
        Returns:
        Possibly-empty immutable list of all Role names that match the provided name.
      • retrieveEmoteById

        @Nonnull
        @CheckReturnValue
        RestAction<ListedEmote> retrieveEmoteById​(@Nonnull
                                                  java.lang.String id)
        Retrieves a listed emote together with its respective creator.
        This does not include unicode emoji.

        Note that ListedEmote.getUser() is only available if the currently logged in account has Permission.MANAGE_EMOTES.

        Possible ErrorResponses caused by the returned RestAction include the following:

        • UNKNOWN_EMOJI
          If the provided id does not correspond to an emote in this guild
        Parameters:
        id - The emote id
        Returns:
        RestAction - Type: ListedEmote
        Throws:
        java.lang.IllegalArgumentException - If the provided id is not a valid snowflake
        Since:
        3.8.0
      • getPrunableMemberCount

        @CheckReturnValue
        RestAction<java.lang.Integer> getPrunableMemberCount​(int days)
        The method calculates the amount of Members that would be pruned if GuildController.prune(int) was executed. Prunability is determined by a Member being offline for at least days days.

        Possible ErrorResponses caused by the returned RestAction include the following:

        Parameters:
        days - Minimum number of days since a member has been offline to get affected.
        Returns:
        RestAction - Type: Integer
        The amount of Members that would be affected.
        Throws:
        InsufficientPermissionException - If the account doesn't have KICK_MEMBER Permission.
        java.lang.IllegalArgumentException - If the provided days are less than 1
      • getPublicRole

        Role getPublicRole()
        The @everyone Role of this Guild.
        This role is special because its position is calculated as -1. All other role positions are 0 or greater. This implies that the public role is always below any custom roles created in this Guild. Additionally, all members of this guild are implied to have this role so it is not included in the list returned by Member.getRoles().
        The ID of this Role is the Guild's ID thus it is equivalent to using getRoleById(getIdLong()).
        Returns:
        The @everyone Role
      • getDefaultChannel

        @Nullable
        TextChannel getDefaultChannel()
        The default TextChannel for a Guild.
        This is the channel that the Discord client will default to opening when a Guild is opened for the first time when accepting an invite that is not directed at a specific TextChannel.

        Note: This channel is the first channel in the guild (ordered by position) that the getPublicRole() has the Permission.MESSAGE_READ in.

        Returns:
        The TextChannel representing the default channel for this guild
      • getController

        GuildController getController()
        Returns the GuildController for this Guild. The controller is used to perform all admin style functions in the Guild. A few include: kicking, banning, changing member roles, changing role and channel positions, and more. Checkout the GuildController class for more info.
        Returns:
        The controller for this Guild.
      • getAuditLogs

        @CheckReturnValue
        AuditLogPaginationAction getAuditLogs()
        A PaginationAction implementation that allows to iterate over all AuditLogEntries of this Guild.
        This iterates from the most recent action to the first logged one. (Limit 90 days into history by discord api)

        Examples

        
         public boolean isLogged(Guild guild, ActionType type, long targetId)
         {
             for (AuditLogEntry entry : guild.getAuditLogs().cache(false))
             {
                 if (entry.getType() == type&& entry.getTargetIdLong() == targetId)
                     return true; // The action is logged
             }
             return false; // nothing found in audit logs
         }
        
         publicList<AuditLogEntry> getActionsBy(Guild guild, User user)
         {
             return guild.getAuditLogs().cache(false).stream()
                 .filter(it-> it.getUser().equals(user))
                 .collect(Collectors.toList()); // collects actions done by user
         }
         
        Returns:
        AuditLogPaginationAction
        Throws:
        InsufficientPermissionException - If the currently logged in account does not have the permission VIEW_AUDIT_LOGS
      • leave

        @CheckReturnValue
        RestAction<java.lang.Void> leave()
        Used to leave a Guild. If the currently logged in account is the owner of this guild (getOwner()) then ownership of the Guild needs to be transferred to a different Member before leaving using GuildController.transferOwnership(Member).
        Returns:
        RestAction - Type: Void
        Throws:
        java.lang.IllegalStateException - Thrown if the currently logged in account is the Owner of this Guild.
      • delete

        @CheckReturnValue
        RestAction<java.lang.Void> delete()
        Used to completely delete a Guild. This can only be done if the currently logged in account is the owner of the Guild.
        If the account has MFA enabled, use delete(String) instead to provide the MFA code.
        Returns:
        RestAction - Type: Void
        Throws:
        PermissionException - Thrown if the currently logged in account is not the owner of this Guild.
        java.lang.IllegalStateException - If the currently logged in account has MFA enabled. (SelfUser.isMfaEnabled()).
      • delete

        @CheckReturnValue
        RestAction<java.lang.Void> delete​(java.lang.String mfaCode)
        Used to completely delete a guild. This can only be done if the currently logged in account is the owner of the Guild.
        This method is specifically used for when MFA is enabled on the logged in account SelfUser.isMfaEnabled(). If MFA is not enabled, use delete().
        Parameters:
        mfaCode - The Multifactor Authentication code generated by an app like Google Authenticator.
        This is not the MFA token given to you by Discord. The code is typically 6 characters long.
        Returns:
        RestAction - Type: Void
        Throws:
        PermissionException - Thrown if the currently logged in account is not the owner of this Guild.
        java.lang.IllegalArgumentException - If the provided mfaCode is null or empty when SelfUser.isMfaEnabled() is true.
      • getAudioManager

        AudioManager getAudioManager()
        The AudioManager that represents the audio connection for this Guild.
        If no AudioManager exists for this Guild, this will create a new one.
        This operation is synchronized on all audio managers for this JDA instance, this means that calling getAudioManager() on any other guild while a thread is accessing this method may be locked.
        Returns:
        The AudioManager for this Guild.
        See Also:
        JDA.getAudioManagerCache()
      • getJDA

        JDA getJDA()
        Returns the JDA instance of this Guild
        Returns:
        the corresponding JDA instance
      • getExplicitContentLevel

        Guild.ExplicitContentLevel getExplicitContentLevel()
        The level of content filtering enabled in this Guild.
        This decides which messages sent by which Members will be scanned for explicit content.
        Returns:
        ExplicitContentLevel for this Guild
      • isAvailable

        boolean isAvailable()
        Returns whether or not this Guild is available. A Guild can be unavailable, if the Discord server has problems.
        If a Guild is unavailable, no actions on it can be performed (Messages, Manager,...)
        Returns:
        If the Guild is available