Package discord4j.core.spec.legacy
Class LegacyGuildEditSpec
- java.lang.Object
-
- discord4j.core.spec.legacy.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 aGuild.- See Also:
- Modify Guild
-
-
Constructor Summary
Constructors Constructor Description LegacyGuildEditSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description discord4j.discordjson.json.GuildModifyRequestasRequest()StringgetReason()Returns the current audit log reason set on the spec.LegacyGuildEditSpecsetAfkChannelId(Snowflake afkChannelId)LegacyGuildEditSpecsetAfkTimeout(int afkTimeout)Sets the AFK timeout, in seconds, for thisGuild.LegacyGuildEditSpecsetBanner(Image banner)Sets the image for the guild banner (when the server has the BANNER feature).LegacyGuildEditSpecsetDefaultMessageNotificationsLevel(Guild.NotificationLevel notificationsLevel)Sets the default message notification level for the modifiedGuild.LegacyGuildEditSpecsetDescription(String description)Sets the description for the guild, if the guild is discoverable.LegacyGuildEditSpecsetDiscoverySplash(Image discoverySplash)Sets the image for the guild discovery splash (when the server has the DISCOVERABLE feature).LegacyGuildEditSpecsetExplicitContentFilter(Guild.ContentFilterLevel level)Sets the explicit content filter level for the modifiedGuild.LegacyGuildEditSpecsetFeatures(Set<String> features)Sets the enabled guild features.LegacyGuildEditSpecsetIcon(Image icon)Sets the image icon to display for the modifiedGuild.LegacyGuildEditSpecsetName(String name)Sets the modifiedGuildname.LegacyGuildEditSpecsetOwnerId(Snowflake ownerId)Sets the new owner ID for thisGuild.LegacyGuildEditSpecsetPreferredLocale(Locale preferredLocale)Sets the preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US".LegacyGuildEditSpecsetPublicUpdatesChannelId(Snowflake publicUpdatesChannelId)Sets the id of the channel where admins and moderators of Community guilds receive notices from Discord.LegacyGuildEditSpecsetReason(String reason)Sets the reason to show in the audit logs when the spec is built.LegacyGuildEditSpecsetRegion(Region.Id regionId)Sets the voice region for the modifiedGuild.LegacyGuildEditSpecsetRegion(String regionId)Sets the voice region for the modifiedGuild, automatic if null.LegacyGuildEditSpecsetRulesChannelId(Snowflake rulesChannelId)Sets the id of the channel where Community guilds display rules and/or guidelines.LegacyGuildEditSpecsetSplash(Image splash)Sets the image for the guild splash (when the server has the INVITE_SPLASH feature).LegacyGuildEditSpecsetSystemChannelFlags(Guild.SystemChannelFlag flag)Deprecated.LegacyGuildEditSpecsetSystemChannelFlags(Guild.SystemChannelFlag... flags)Sets the system channel flags.LegacyGuildEditSpecsetSystemChannelId(Snowflake systemChannelId)Sets the id of the channel where guild notices such as welcome messages and boost events are posted.LegacyGuildEditSpecsetVerificationLevel(Guild.VerificationLevel verificationLevel)Sets the verification level required before a member can send messages in the modifiedGuild.
-
-
-
Method Detail
-
setName
public LegacyGuildEditSpec setName(String name)
Sets the modifiedGuildname.- Parameters:
name- the guild name- Returns:
- this spec
-
setRegion
public LegacyGuildEditSpec setRegion(Region.Id regionId)
Sets the voice region for the modifiedGuild.- Parameters:
regionId- The voice region for the guild.- Returns:
- This spec.
-
setRegion
public LegacyGuildEditSpec setRegion(@Nullable String regionId)
Sets the voice region for the modifiedGuild, 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 modifiedGuild.- 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 modifiedGuild.- 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 modifiedGuild.- Parameters:
level- The explicit content filter level for the guild.- Returns:
- This spec.
-
setAfkChannelId
public LegacyGuildEditSpec setAfkChannelId(@Nullable Snowflake afkChannelId)
- Parameters:
afkChannelId- The identifier for the AFK channel.- Returns:
- This spec.
-
setAfkTimeout
public LegacyGuildEditSpec setAfkTimeout(int afkTimeout)
Sets the AFK timeout, in seconds, for thisGuild.- 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 modifiedGuild.- Parameters:
icon- The icon for the guild.- Returns:
- This spec.
-
setOwnerId
public LegacyGuildEditSpec setOwnerId(Snowflake ownerId)
Sets the new owner ID for thisGuild. 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.
-
setSystemChannelFlags
@Deprecated public LegacyGuildEditSpec setSystemChannelFlags(@Nullable Guild.SystemChannelFlag flag)
Deprecated.Sets the system channel flags.- Parameters:
flag- The system channel flags.- Returns:
- This spec.
-
setSystemChannelFlags
public LegacyGuildEditSpec setSystemChannelFlags(@Nullable Guild.SystemChannelFlag... flags)
Sets the system channel flags.- Parameters:
flags- The system channel flags.- 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.
-
setReason
public LegacyGuildEditSpec setReason(@Nullable String reason)
Description copied from interface:LegacyAuditSpecSets the reason to show in the audit logs when the spec is built.- Specified by:
setReasonin interfaceLegacyAuditSpec<discord4j.discordjson.json.GuildModifyRequest>- Parameters:
reason- The audit log reason.- Returns:
- This spec.
-
getReason
@Nullable public String getReason()
Description copied from interface:LegacyAuditSpecReturns the current audit log reason set on the spec.- Specified by:
getReasonin interfaceLegacyAuditSpec<discord4j.discordjson.json.GuildModifyRequest>- Returns:
- The current audit log reason.
-
asRequest
public discord4j.discordjson.json.GuildModifyRequest asRequest()
- Specified by:
asRequestin interfaceLegacySpec<discord4j.discordjson.json.GuildModifyRequest>
-
-