Class LegacyGuildEditSpec

  • All Implemented Interfaces:
    LegacyAuditSpec<discord4j.discordjson.json.GuildModifyRequest>, LegacySpec<discord4j.discordjson.json.GuildModifyRequest>

    public class LegacyGuildEditSpec
    extends Object
    implements LegacyAuditSpec<discord4j.discordjson.json.GuildModifyRequest>
    A spec used to selectively modify properties from a Guild.
    See Also:
    Modify Guild
    • Constructor Detail

      • LegacyGuildEditSpec

        public LegacyGuildEditSpec()
    • Method Detail

      • setRegion

        public LegacyGuildEditSpec setRegion​(Region.Id regionId)
        Sets the voice region for the modified Guild.
        Parameters:
        regionId - The voice region for the guild.
        Returns:
        This spec.
      • setRegion

        public LegacyGuildEditSpec setRegion​(@Nullable
                                             String regionId)
        Sets the voice region for the modified Guild, automatic if null.
        Parameters:
        regionId - The voice region for the guild, automatic if null.
        Returns:
        This spec.
      • setVerificationLevel

        public LegacyGuildEditSpec setVerificationLevel​(Guild.VerificationLevel verificationLevel)
        Sets the verification level required before a member can send messages in the modified Guild.
        Parameters:
        verificationLevel - The verification level for the guild.
        Returns:
        This spec.
      • setDefaultMessageNotificationsLevel

        public LegacyGuildEditSpec setDefaultMessageNotificationsLevel​(Guild.NotificationLevel notificationsLevel)
        Sets the default message notification level for the modified Guild.
        Parameters:
        notificationsLevel - The default notification level for the guild.
        Returns:
        This spec.
      • setExplicitContentFilter

        public LegacyGuildEditSpec setExplicitContentFilter​(Guild.ContentFilterLevel level)
        Sets the explicit content filter level for the modified Guild.
        Parameters:
        level - The explicit content filter level for the guild.
        Returns:
        This spec.
      • setAfkChannelId

        public LegacyGuildEditSpec setAfkChannelId​(@Nullable
                                                   Snowflake afkChannelId)
        Sets the Snowflake identifier for the channel designated as AFK channel in this Guild.
        Parameters:
        afkChannelId - The identifier for the AFK channel.
        Returns:
        This spec.
      • setAfkTimeout

        public LegacyGuildEditSpec setAfkTimeout​(int afkTimeout)
        Sets the AFK timeout, in seconds, for this Guild.
        Parameters:
        afkTimeout - The AFK timeout, in seconds.
        Returns:
        This spec.
      • setIcon

        public LegacyGuildEditSpec setIcon​(@Nullable
                                           Image icon)
        Sets the image icon to display for the modified Guild.
        Parameters:
        icon - The icon for the guild.
        Returns:
        This spec.
      • setOwnerId

        public LegacyGuildEditSpec setOwnerId​(Snowflake ownerId)
        Sets the new owner ID for this Guild. Used to transfer guild ownership if this client is the owner.
        Parameters:
        ownerId - The identifier for the new guild owner.
        Returns:
        This spec.
      • setSplash

        public LegacyGuildEditSpec setSplash​(@Nullable
                                             Image splash)
        Sets the image for the guild splash (when the server has the INVITE_SPLASH feature).
        Parameters:
        splash - The image for the guild splash.
        Returns:
        This spec.
      • setDiscoverySplash

        public LegacyGuildEditSpec setDiscoverySplash​(@Nullable
                                                      Image discoverySplash)
        Sets the image for the guild discovery splash (when the server has the DISCOVERABLE feature).
        Parameters:
        discoverySplash - The image for the guild discovery splash.
        Returns:
        This spec.
      • setBanner

        public LegacyGuildEditSpec setBanner​(@Nullable
                                             Image banner)
        Sets the image for the guild banner (when the server has the BANNER feature).
        Parameters:
        banner - The image for the guild banner.
        Returns:
        This spec.
      • setSystemChannelId

        public LegacyGuildEditSpec setSystemChannelId​(@Nullable
                                                      Snowflake systemChannelId)
        Sets the id of the channel where guild notices such as welcome messages and boost events are posted.
        Parameters:
        systemChannelId - The id of the channel where guild notices such as welcome messages and boost events are posted.
        Returns:
        This spec.
      • setRulesChannelId

        public LegacyGuildEditSpec setRulesChannelId​(@Nullable
                                                     Snowflake rulesChannelId)
        Sets the id of the channel where Community guilds display rules and/or guidelines.
        Parameters:
        rulesChannelId - The id of the channel where Community guilds display rules and/or guidelines.
        Returns:
        This spec.
      • setPublicUpdatesChannelId

        public LegacyGuildEditSpec setPublicUpdatesChannelId​(@Nullable
                                                             Snowflake publicUpdatesChannelId)
        Sets the id of the channel where admins and moderators of Community guilds receive notices from Discord.
        Parameters:
        publicUpdatesChannelId - The id of the channel where admins and moderators of Community guilds receive notices from Discord.
        Returns:
        This spec.
      • setPreferredLocale

        public LegacyGuildEditSpec setPreferredLocale​(@Nullable
                                                      Locale preferredLocale)
        Sets the preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US".
        Parameters:
        preferredLocale - The preferred locale of a Community guild used in server discovery and notices from Discord.
        Returns:
        This spec.
      • setFeatures

        public LegacyGuildEditSpec setFeatures​(Set<String> features)
        Sets the enabled guild features.
        You can see the available guild features
        Parameters:
        features - Enabled guild features.
        Returns:
        This spec.
      • setDescription

        public LegacyGuildEditSpec setDescription​(@Nullable
                                                  String description)
        Sets the description for the guild, if the guild is discoverable.
        Parameters:
        description - The description for the guild.
        Returns:
        This spec.
      • getReason

        @Nullable
        public String getReason()
        Description copied from interface: LegacyAuditSpec
        Returns the current audit log reason set on the spec.
        Specified by:
        getReason in interface LegacyAuditSpec<discord4j.discordjson.json.GuildModifyRequest>
        Returns:
        The current audit log reason.
      • asRequest

        public discord4j.discordjson.json.GuildModifyRequest asRequest()
        Specified by:
        asRequest in interface LegacySpec<discord4j.discordjson.json.GuildModifyRequest>