Package discord4j.core.object.entity
Class Guild
- java.lang.Object
-
- discord4j.core.object.entity.Guild
-
- All Implemented Interfaces:
DiscordObject,Entity
public final class Guild extends Object implements Entity
A Discord guild.- See Also:
- Guild Resource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGuild.ContentFilterLevelAutomatically scan and delete messages sent in the server that contain explicit content.static classGuild.MfaLevelPrevent potentially dangerous administrative actions for users without two-factor authentication enabled.static classGuild.NotificationLevelDetermines whetherMemberswho have not explicitly set their notification settings receive a notification for every message sent in the server or not.static classGuild.NsfwLevelstatic classGuild.PremiumTierRepresent the server Premium Tier (aka boost level) of theGuild.static classGuild.SystemChannelFlagDescribes system channel flags.static classGuild.VerificationLevelMembersof the server must meet the following criteria before they can send messages in text channels or initiate a direct message conversation.
-
Constructor Summary
Constructors Constructor Description Guild(GatewayDiscordClient gateway, discord4j.discordjson.json.GuildData data)Constructs aGuildwith an associatedGatewayDiscordClientand Discord data.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description discord4j.core.spec.GuildBanQueryMonoban(Snowflake userId)Requests to ban the specified user.Mono<Void>ban(Snowflake userId, discord4j.core.spec.BanQuerySpec spec)Requests to ban the specified user.Mono<Void>ban(Snowflake userId, Consumer<? super LegacyBanQuerySpec> spec)Deprecated.useban(Snowflake, BanQuerySpec)orban(Snowflake)which offer an immutable approach to build specsMono<String>changeSelfNickname(String nickname)Requests to change the bot user's nickname in this guild.Mono<Category>createCategory(discord4j.core.spec.CategoryCreateSpec spec)Requests to create a category.discord4j.core.spec.CategoryCreateMonocreateCategory(String name)Requests to create a category.Mono<Category>createCategory(Consumer<? super LegacyCategoryCreateSpec> spec)Deprecated.usecreateCategory(CategoryCreateSpec)orcreateCategory(String)which offer an immutable approach to build specsMono<GuildEmoji>createEmoji(discord4j.core.spec.GuildEmojiCreateSpec spec)Requests to create an emoji.discord4j.core.spec.GuildEmojiCreateMonocreateEmoji(String name, Image image)Requests to create an emoji.Mono<GuildEmoji>createEmoji(Consumer<? super LegacyGuildEmojiCreateSpec> spec)Deprecated.usecreateEmoji(GuildEmojiCreateSpec)orcreateEmoji(String, Image)which offer an immutable approach to build specsMono<NewsChannel>createNewsChannel(discord4j.core.spec.NewsChannelCreateSpec spec)Requests to create a news channel.discord4j.core.spec.NewsChannelCreateMonocreateNewsChannel(String name)Requests to create a news channel.Mono<NewsChannel>createNewsChannel(Consumer<? super LegacyNewsChannelCreateSpec> spec)Deprecated.usecreateNewsChannel(NewsChannelCreateSpec)orcreateNewsChannel(String)which offer an immutable approach to build specsdiscord4j.core.spec.RoleCreateMonocreateRole()Requests to create a role.Mono<Role>createRole(discord4j.core.spec.RoleCreateSpec spec)Requests to create a role.Mono<Role>createRole(Consumer<? super LegacyRoleCreateSpec> spec)Deprecated.usecreateRole(RoleCreateSpec)orcreateRole()which offer an immutable approach to build specsMono<GuildTemplate>createTemplate(discord4j.core.spec.GuildTemplateCreateSpec spec)Requests to create a template based on this guild.discord4j.core.spec.GuildTemplateCreateMonocreateTemplate(String name)Requests to create a template based on this guild.Mono<GuildTemplate>createTemplate(Consumer<? super LegacyGuildTemplateCreateSpec> spec)Deprecated.usecreateTemplate(GuildTemplateCreateSpec)orcreateTemplate(String)which offer an immutable approach to build specsMono<TextChannel>createTextChannel(discord4j.core.spec.TextChannelCreateSpec spec)Requests to create a text channel.discord4j.core.spec.TextChannelCreateMonocreateTextChannel(String name)Requests to create a text channel.Mono<TextChannel>createTextChannel(Consumer<? super LegacyTextChannelCreateSpec> spec)Deprecated.usecreateTextChannel(TextChannelCreateSpec)orcreateTextChannel(String)which offer an immutable approach to build specsMono<VoiceChannel>createVoiceChannel(discord4j.core.spec.VoiceChannelCreateSpec spec)Requests to create a voice channel.discord4j.core.spec.VoiceChannelCreateMonocreateVoiceChannel(String name)Requests to create a voice channel.Mono<VoiceChannel>createVoiceChannel(Consumer<? super LegacyVoiceChannelCreateSpec> spec)Deprecated.usecreateVoiceChannel(VoiceChannelCreateSpec)orcreateVoiceChannel(String)which offer an immutable approach to build specsMono<Void>delete()Requests to delete this guild.discord4j.core.spec.GuildEditMonoedit()Requests to edit this guild.Mono<Guild>edit(discord4j.core.spec.GuildEditSpec spec)Requests to edit this guild.Mono<Guild>edit(Consumer<? super LegacyGuildEditSpec> spec)Deprecated.useedit(GuildEditSpec)oredit()which offer an immutable approach to build specsbooleanequals(Object obj)Mono<VoiceChannel>getAfkChannel()Requests to retrieve the AFK channel, if present.Mono<VoiceChannel>getAfkChannel(EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the AFK channel, if present, using the given retrieval strategy.Optional<Snowflake>getAfkChannelId()Gets the ID of the AFK channel, if present.intgetAfkTimeout()Gets the AFK timeout in seconds.Optional<Snowflake>getApplicationId()Gets the application ID of the guild creator if it is bot-created.discord4j.core.spec.AuditLogQueryFluxgetAuditLog()Requests to retrieve the audit log for this guild.Flux<AuditLogPart>getAuditLog(discord4j.core.spec.AuditLogQuerySpec spec)Requests to retrieve the audit log for this guild.Flux<AuditLogPart>getAuditLog(Consumer<? super LegacyAuditLogQuerySpec> spec)Deprecated.usegetAuditLog(AuditLogQuerySpec)orgetAuditLog()which offer an immutable approach to build specsMono<Ban>getBan(Snowflake userId)Requests to retrieve the ban for the specified user for this guild.Mono<Image>getBanner(Image.Format format)Gets the banner of the guild.Optional<String>getBannerUrl(Image.Format format)Gets the banner URL of the guild, if present.Flux<Ban>getBans()Requests to retrieve all the bans for this guild.Mono<GuildChannel>getChannelById(Snowflake id)Requests to retrieve the channel as represented by the supplied ID.Mono<GuildChannel>getChannelById(Snowflake id, EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the channel as represented by the supplied ID, using the given retrieval strategy.Flux<GuildChannel>getChannels()Requests to retrieve the guild's channels.Flux<GuildChannel>getChannels(EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the guild's channels, using the given retrieval strategy.GatewayDiscordClientgetClient()Returns theGatewayDiscordClientthat created this object.Guild.ContentFilterLevelgetContentFilterLevel()Gets the default explicit content filter level.discord4j.discordjson.json.GuildDatagetData()Gets the data of the guild.Optional<String>getDescription()Gets the description of the guild, if present.Mono<Image>getDiscoverySplash(Image.Format format)Gets the discovery splash of the guild.Optional<String>getDiscoverySplashUrl(Image.Format format)Gets the discovery splash URL of the guild, if present.Set<Snowflake>getEmojiIds()Gets the guild's emoji's IDs.Flux<GuildEmoji>getEmojis()Requests to retrieve the guild's emojis.Flux<GuildEmoji>getEmojis(EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the guild's emojis, using the given retrieval strategy.Mono<Role>getEveryoneRole()Requests to retrieve the guild's @everyoneRole.Mono<Role>getEveryoneRole(EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the guild's @everyoneRole, using the given retrieval strategy.Set<String>getFeatures()Gets the enabled guild features.Mono<GuildEmoji>getGuildEmojiById(Snowflake id)Requests to retrieve the guild emoji as represented by the supplied ID.Mono<GuildEmoji>getGuildEmojiById(Snowflake id, EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the guild emoji as represented by the supplied ID, using the given retrieval strategy.Mono<Image>getIcon(Image.Format format)Gets the icon of the guild.Optional<String>getIconUrl(Image.Format format)Gets the icon URL of the guild, if present.SnowflakegetId()Gets the Snowflake that uniquely identifies this entity.Flux<ExtendedInvite>getInvites()Requests to retrieve the invites of the guild.InstantgetJoinTime()Gets when this guild was joined at.OptionalIntgetMaxMembers()Gets the maximum amount of members of the guild, if present.intgetMaxPresences()Gets the maximum amount of presences of the guild.Optional<Integer>getMaxVideoChannelUsers()Gets the maximum amount of users in a video channel, if present.Mono<Member>getMemberById(Snowflake id)Requests to retrieve the member as represented by the supplied ID.Mono<Member>getMemberById(Snowflake id, EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the member as represented by the supplied ID, using the given retrieval strategy.intgetMemberCount()Gets the total number of members in the guild.Flux<Member>getMembers()Requests to retrieve the members of the guild.Flux<Member>getMembers(EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the members of the guild, using the given retrieval strategy.Guild.MfaLevelgetMfaLevel()Gets the required MFA level for the guild.StringgetName()Gets the guild name.Guild.NotificationLevelgetNotificationLevel()Gets the default message notification level..Guild.NsfwLevelgetNsfwLevel()Gets the guild NSFW level.Mono<Member>getOwner()Requests to retrieve the owner of the guild.SnowflakegetOwnerId()Gets the ID of the owner of the guild.LocalegetPreferredLocale()Gets the preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US".OptionalIntgetPremiumSubscriptionCount()Gets the number of boosts this server currently has, if present.Guild.PremiumTiergetPremiumTier()Gets the Premium Tier (Server Boost level) for the guild.Flux<Presence>getPresences()Requests to retrieve the presences of the guild.discord4j.core.spec.GuildPruneCountMonogetPruneCount(int days)Requests to retrieve the number of users that will be pruned.Mono<Integer>getPruneCount(discord4j.core.spec.GuildPruneCountSpec spec)Requests to retrieve the number of users that will be pruned.Mono<Integer>getPruneCount(Consumer<? super LegacyGuildPruneCountSpec> spec)Deprecated.usegetPruneCount(GuildPruneCountSpec)orgetPruneCount(int)which offer an immutable approach to build specsMono<TextChannel>getPublicUpdatesChannel()Requests to retrieve the channel where admins and moderators of Community guilds receive notices from Discord, if present.Mono<TextChannel>getPublicUpdatesChannel(EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the channel where admins and moderators of Community guilds receive notices from Discord, if present, using the given retrieval strategy.Optional<Snowflake>getPublicUpdatesChannelId()Gets the id of the channel where admins and moderators of Community guilds receive notices from Discord, if present.Mono<Region>getRegion()Deprecated.Voice regions are now specific to voice channels.Region.IdgetRegionId()Deprecated.Voice region are now specific to voice channels.Flux<Region>getRegions()Requests to retrieve the voice regions for the guild.Mono<Role>getRoleById(Snowflake id)Requests to retrieve the role as represented by the supplied ID.Mono<Role>getRoleById(Snowflake id, EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the role as represented by the supplied ID, using the given retrieval strategy.Set<Snowflake>getRoleIds()Gets the guild's roles' IDs.Flux<Role>getRoles()Requests to retrieve the guild's roles.Flux<Role>getRoles(EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the guild's roles, using the given retrieval strategy.Mono<TextChannel>getRulesChannel()Requests to retrieve the channel where Community guilds display rules and/or guidelines, if present.Mono<TextChannel>getRulesChannel(EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the channel where Community guilds display rules and/or guidelines, if present, using the given retrieval strategy.Optional<Snowflake>getRulesChannelId()Gets the id of the channel where Community guilds display rules and/or guidelines, if present.Mono<Member>getSelfMember()Requests to retrieve the member as represented by the bot user's ID.Mono<Image>getSplash(Image.Format format)Gets the splash of the guild.Optional<String>getSplashUrl(Image.Format format)Gets the splash URL of the guild, if present.Mono<TextChannel>getSystemChannel()Requests to retrieve the channel to which system messages are sent, if present.Mono<TextChannel>getSystemChannel(EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the channel to which system messages are sent, if present, using the given retrieval strategy.EnumSet<Guild.SystemChannelFlag>getSystemChannelFlags()Returns the flags of the systemchannel.Optional<Snowflake>getSystemChannelId()Gets the ID of the channel where guild notices such as welcome messages and boost events are posted, if present.Flux<GuildTemplate>getTemplates()Requests to retrieve the templates of the guild.Optional<String>getVanityUrlCode()Gets the vanity url code of the guild, if present.Guild.VerificationLevelgetVerificationLevel()Gets the level of verification required for the guild.Mono<VoiceConnection>getVoiceConnection()Returns the current voice connection registered for this guild.Flux<VoiceState>getVoiceStates()Requests to retrieve the voice states of the guild.Flux<Webhook>getWebhooks()Requests to retrieve the webhooks of the guild.Mono<GuildChannel>getWidgetChannel()Requests to retrieve the channel for the server widget, if present.Mono<GuildChannel>getWidgetChannel(EntityRetrievalStrategy retrievalStrategy)Requests to retrieve the channel for the server widget, if present, using the given retrieval strategy.Optional<Snowflake>getWidgetChannelId()Gets the channel ID that the widget will generate an invite to, if present.inthashCode()booleanisEmbedEnabled()Deprecated.UseGuild#isWidgetEnabledinsteadbooleanisLarge()Gets whether this guild is considered large.booleanisNsfw()Deprecated.UsegetNsfwLevel()insteadbooleanisUnavailable()Gets whether this guild is unavailable.booleanisWidgetEnabled()Gets whether or not the server widget is enabled.Mono<Void>kick(Snowflake userId)Requests to kick the specified user from this guild.Mono<Void>kick(Snowflake userId, String reason)Requests to kick the specified user from this guild while optionally specifying a reason.Mono<Void>leave()Requests to leave this guild.discord4j.core.spec.GuildPruneMonoprune(int days)Requests to prune users.Mono<Integer>prune(discord4j.core.spec.GuildPruneSpec spec)Requests to prune users while customizing parameters.Mono<Integer>prune(Consumer<? super LegacyGuildPruneSpec> spec)Deprecated.useprune(GuildPruneSpec)orprune(int)which offer an immutable approach to build specsFlux<Member>requestMembers()Flux<Member>requestMembers(Set<Snowflake> userIds)Return a set ofmembersfrom this guild using the current Gateway connection.Flux<Member>searchMembers(String username, int limit)Returns a list ofmemberswhose username or nickname starts with the provided username.StringtoString()Mono<Void>unban(Snowflake userId)Requests to unban the specified user.Mono<Void>unban(Snowflake userId, String reason)Requests to unban the specified user while optionally specifying a reason.
-
-
-
Constructor Detail
-
Guild
public Guild(GatewayDiscordClient gateway, discord4j.discordjson.json.GuildData data)
Constructs aGuildwith an associatedGatewayDiscordClientand Discord data.- Parameters:
gateway- TheGatewayDiscordClientassociated to this object, must be non-null.data- The raw data as represented by Discord, must be non-null.
-
-
Method Detail
-
getClient
public GatewayDiscordClient getClient()
Description copied from interface:DiscordObjectReturns theGatewayDiscordClientthat created this object. Methods in it are exclusively based on the entity cache orStorein use. Refer to callinggetClient().rest()to access aDiscordClientthat is capable of requesting entities directly from the REST API.- Specified by:
getClientin interfaceDiscordObject- Returns:
- The
GatewayDiscordClientassociated to this object.
-
getId
public Snowflake getId()
Description copied from interface:EntityGets the Snowflake that uniquely identifies this entity.
-
getData
public discord4j.discordjson.json.GuildData getData()
Gets the data of the guild.- Returns:
- The data of the guild.
-
getName
public String getName()
Gets the guild name.- Returns:
- The guild name.
-
getIconUrl
public Optional<String> getIconUrl(Image.Format format)
Gets the icon URL of the guild, if present.- Parameters:
format- The format for the URL.- Returns:
- The icon URL of the guild, if present.
-
getIcon
public Mono<Image> getIcon(Image.Format format)
Gets the icon of the guild.
-
getSplashUrl
public Optional<String> getSplashUrl(Image.Format format)
Gets the splash URL of the guild, if present.- Parameters:
format- The format for the URL.- Returns:
- The splash URL of the guild, if present.
-
getSplash
public Mono<Image> getSplash(Image.Format format)
Gets the splash of the guild.
-
getDiscoverySplashUrl
public Optional<String> getDiscoverySplashUrl(Image.Format format)
Gets the discovery splash URL of the guild, if present.- Parameters:
format- The format for the URL.- Returns:
- The discovery splash URL of the guild, if present.
-
getDiscoverySplash
public Mono<Image> getDiscoverySplash(Image.Format format)
Gets the discovery splash of the guild.- Parameters:
format- The format in which to get the image.- Returns:
- A
Monowhere, upon successful completion, emits thediscovery splashof the guild. If an error is received, it is emitted through theMono.
-
getBannerUrl
public Optional<String> getBannerUrl(Image.Format format)
Gets the banner URL of the guild, if present.- Parameters:
format- The format for the URL.- Returns:
- The banner URL of the guild, if present.
-
getBanner
public Mono<Image> getBanner(Image.Format format)
Gets the banner of the guild.
-
getOwnerId
public Snowflake getOwnerId()
Gets the ID of the owner of the guild.- Returns:
- The ID of the owner of the guild.
-
getRegionId
@Deprecated public Region.Id getRegionId()
Deprecated.Voice region are now specific to voice channels. UseVoiceChannel#getRtcRegioninstead.Gets the voice region ID for the guild.- Returns:
- The voice region ID for the guild.
-
getRegion
@Deprecated public Mono<Region> getRegion()
Deprecated.Voice regions are now specific to voice channels. UseVoiceChannel#getRtcRegioninstead.Requests to retrieve the voice region for the guild.
-
getRegions
public Flux<Region> getRegions()
Requests to retrieve the voice regions for the guild.- Returns:
- A
Fluxthat continually emits the guild'svoice regions. If an error is received, it is emitted through theFlux.
-
getAfkChannelId
public Optional<Snowflake> getAfkChannelId()
Gets the ID of the AFK channel, if present.- Returns:
- The ID of the AFK channel, if present.
-
getAfkChannel
public Mono<VoiceChannel> getAfkChannel()
Requests to retrieve the AFK channel, if present.
-
getAfkChannel
public Mono<VoiceChannel> getAfkChannel(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the AFK channel, if present, using the given retrieval strategy.
-
getAfkTimeout
public int getAfkTimeout()
Gets the AFK timeout in seconds.- Returns:
- The AFK timeout in seconds.
-
getPremiumTier
public Guild.PremiumTier getPremiumTier()
Gets the Premium Tier (Server Boost level) for the guild.- Returns:
- The Premium Tier (Server Boost level) for the guild.
-
getPremiumSubscriptionCount
public OptionalInt getPremiumSubscriptionCount()
Gets the number of boosts this server currently has, if present.- Returns:
- The number of boosts this server currently has, if present.
-
getPreferredLocale
public Locale getPreferredLocale()
Gets the preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US".- Returns:
- The preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US".
-
getVerificationLevel
public Guild.VerificationLevel getVerificationLevel()
Gets the level of verification required for the guild.- Returns:
- The level of verification required for the guild.
-
getNotificationLevel
public Guild.NotificationLevel getNotificationLevel()
Gets the default message notification level..- Returns:
- The default message notification level.
-
getContentFilterLevel
public Guild.ContentFilterLevel getContentFilterLevel()
Gets the default explicit content filter level.- Returns:
- The default explicit content filter level.
-
getRoleIds
public Set<Snowflake> getRoleIds()
Gets the guild's roles' IDs.- Returns:
- The guild's roles' IDs.
-
getRoles
public Flux<Role> getRoles()
Requests to retrieve the guild's roles.The order of items emitted by the returned
Fluxis unspecified. UseOrderUtil.orderRoles(Flux)to consistently order roles.
-
getRoles
public Flux<Role> getRoles(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the guild's roles, using the given retrieval strategy.The order of items emitted by the returned
Fluxis unspecified. UseOrderUtil.orderRoles(Flux)to consistently order roles.
-
getRoleById
public Mono<Role> getRoleById(Snowflake id)
Requests to retrieve the role as represented by the supplied ID.
-
getRoleById
public Mono<Role> getRoleById(Snowflake id, EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the role as represented by the supplied ID, using the given retrieval strategy.
-
getEveryoneRole
public Mono<Role> getEveryoneRole()
Requests to retrieve the guild's @everyoneRole.
-
getEveryoneRole
public Mono<Role> getEveryoneRole(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the guild's @everyoneRole, using the given retrieval strategy.
-
getEmojiIds
public Set<Snowflake> getEmojiIds()
Gets the guild's emoji's IDs.- Returns:
- The guild's emoji's IDs.
-
getEmojis
public Flux<GuildEmoji> getEmojis()
Requests to retrieve the guild's emojis.
-
getEmojis
public Flux<GuildEmoji> getEmojis(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the guild's emojis, using the given retrieval strategy.
-
getGuildEmojiById
public Mono<GuildEmoji> getGuildEmojiById(Snowflake id)
Requests to retrieve the guild emoji as represented by the supplied ID.- Parameters:
id- The ID of the guild emoji.- Returns:
- A
Monowhere, upon successful completion, emits theGuildEmojias represented by the supplied ID. If an error is received, it is emitted through theMono.
-
getGuildEmojiById
public Mono<GuildEmoji> getGuildEmojiById(Snowflake id, EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the guild emoji as represented by the supplied ID, using the given retrieval strategy.- Parameters:
id- The ID of the guild emoji.retrievalStrategy- the strategy to use to get the guild emoji- Returns:
- A
Monowhere, upon successful completion, emits theGuildEmojias represented by the supplied ID. If an error is received, it is emitted through theMono.
-
getFeatures
public Set<String> getFeatures()
Gets the enabled guild features.
You can see the available guild features- Returns:
- The enabled guild features.
-
getMfaLevel
public Guild.MfaLevel getMfaLevel()
Gets the required MFA level for the guild.- Returns:
- The required MFA level for the guild.
-
getApplicationId
public Optional<Snowflake> getApplicationId()
Gets the application ID of the guild creator if it is bot-created.- Returns:
- The application ID of the guild creator if it is bot-created.
-
isWidgetEnabled
public boolean isWidgetEnabled()
Gets whether or not the server widget is enabled.- Returns:
- Whether or not the server widget is enabled.
-
getWidgetChannelId
public Optional<Snowflake> getWidgetChannelId()
Gets the channel ID that the widget will generate an invite to, if present.- Returns:
- The channel ID that the widget will generate an invite to, if present.
-
getWidgetChannel
public Mono<GuildChannel> getWidgetChannel()
Requests to retrieve the channel for the server widget, if present.
-
getWidgetChannel
public Mono<GuildChannel> getWidgetChannel(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the channel for the server widget, if present, using the given retrieval strategy.
-
getSystemChannelId
public Optional<Snowflake> getSystemChannelId()
Gets the ID of the channel where guild notices such as welcome messages and boost events are posted, if present.- Returns:
- The ID of the channel where guild notices such as welcome messages and boost events are posted, if present.
-
getSystemChannel
public Mono<TextChannel> getSystemChannel()
Requests to retrieve the channel to which system messages are sent, if present.
-
getSystemChannel
public Mono<TextChannel> getSystemChannel(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the channel to which system messages are sent, if present, using the given retrieval strategy.
-
getSystemChannelFlags
public EnumSet<Guild.SystemChannelFlag> getSystemChannelFlags()
Returns the flags of the systemchannel.- Returns:
- A
EnumSetwith the flags of the systemchannel.
-
getRulesChannelId
public Optional<Snowflake> getRulesChannelId()
Gets the id of the channel where Community guilds display rules and/or guidelines, if present.- Returns:
- The id of the channel where Community guilds display rules and/or guidelines, if present.
-
getRulesChannel
public Mono<TextChannel> getRulesChannel()
Requests to retrieve the channel where Community guilds display rules and/or guidelines, if present.
-
getRulesChannel
public Mono<TextChannel> getRulesChannel(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the channel where Community guilds display rules and/or guidelines, if present, using the given retrieval strategy.
-
getPublicUpdatesChannelId
public Optional<Snowflake> getPublicUpdatesChannelId()
Gets the id of the channel where admins and moderators of Community guilds receive notices from Discord, if present.- Returns:
- The id of the channel where admins and moderators of Community guilds receive notices from Discord, if present.
-
getPublicUpdatesChannel
public Mono<TextChannel> getPublicUpdatesChannel()
Requests to retrieve the channel where admins and moderators of Community guilds receive notices from Discord, if present.
-
getPublicUpdatesChannel
public Mono<TextChannel> getPublicUpdatesChannel(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the channel where admins and moderators of Community guilds receive notices from Discord, if present, using the given retrieval strategy.
-
getMaxVideoChannelUsers
public Optional<Integer> getMaxVideoChannelUsers()
Gets the maximum amount of users in a video channel, if present.- Returns:
- The maximum amount of users in a video channel, if present.
-
getJoinTime
public Instant getJoinTime()
Gets when this guild was joined at. If thisGuildobject wasretrievedusing REST API, then calling this method will throwDateTimeParseException.- Returns:
- When this guild was joined at.
-
isLarge
public boolean isLarge()
Gets whether this guild is considered large. If thisGuildobject wasretrievedusing REST API, then calling this method will always returnfalse.- Returns:
- If present,
trueif the guild is considered large,falseotherwise.
-
isUnavailable
public boolean isUnavailable()
Gets whether this guild is unavailable.- Returns:
- If present,
trueif the guild is unavailable,falseotherwise.
-
isEmbedEnabled
@Deprecated public boolean isEmbedEnabled()
Deprecated.UseGuild#isWidgetEnabledinsteadGets whether this guild is embeddable (e.g. widget).- Returns:
- Whether this guild is embeddable (e.g. widget).
-
getMemberCount
public int getMemberCount()
Gets the total number of members in the guild. If thisGuildobject wasretrievedusing REST API, then calling this method will always return the same value.- Returns:
- The total number of members in the guild.
-
isNsfw
@Deprecated public boolean isNsfw()
Deprecated.UsegetNsfwLevel()insteadGets whether this guild is designated as NSFW.- Returns:
- Whether this guild is designated as NSFW.
-
getNsfwLevel
public Guild.NsfwLevel getNsfwLevel()
Gets the guild NSFW level.- Returns:
- The guild NSFW level.
-
getVoiceStates
public Flux<VoiceState> getVoiceStates()
Requests to retrieve the voice states of the guild.- Returns:
- A
Fluxthat continually emits thevoice statesof the guild. If an error is received, it is emitted through theFlux.
-
getMembers
public Flux<Member> getMembers(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the members of the guild, using the given retrieval strategy.
-
requestMembers
public Flux<Member> requestMembers(Set<Snowflake> userIds)
Return a set ofmembersfrom this guild using the current Gateway connection. This method performs a check to validate whether the given guild's data can be obtained from thisGatewayDiscordClient.
-
searchMembers
public Flux<Member> searchMembers(String username, int limit)
Returns a list ofmemberswhose username or nickname starts with the provided username.
-
getMemberById
public Mono<Member> getMemberById(Snowflake id)
Requests to retrieve the member as represented by the supplied ID.
-
getMemberById
public Mono<Member> getMemberById(Snowflake id, EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the member as represented by the supplied ID, using the given retrieval strategy.
-
getSelfMember
public Mono<Member> getSelfMember()
Requests to retrieve the member as represented by the bot user's ID.
-
getChannels
public Flux<GuildChannel> getChannels()
Requests to retrieve the guild's channels.The order of items emitted by the returned
Fluxis unspecified. UseOrderUtil.orderGuildChannels(Flux)to consistently order channels.
-
getChannels
public Flux<GuildChannel> getChannels(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the guild's channels, using the given retrieval strategy.The order of items emitted by the returned
Fluxis unspecified. UseOrderUtil.orderGuildChannels(Flux)to consistently order channels.
-
getChannelById
public Mono<GuildChannel> getChannelById(Snowflake id)
Requests to retrieve the channel as represented by the supplied ID.- Parameters:
id- The ID of the channel.- Returns:
- A
Monowhere, upon successful completion, emits theGuildChannelas represented by the supplied ID. If an error is received, it is emitted through theMono.
-
getChannelById
public Mono<GuildChannel> getChannelById(Snowflake id, EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the channel as represented by the supplied ID, using the given retrieval strategy.- Parameters:
id- The ID of the channel.retrievalStrategy- the strategy to use to get the channel- Returns:
- A
Monowhere, upon successful completion, emits theGuildChannelas represented by the supplied ID. If an error is received, it is emitted through theMono.
-
getVanityUrlCode
public Optional<String> getVanityUrlCode()
Gets the vanity url code of the guild, if present.- Returns:
- The vanity url code of the guild, if present.
-
getDescription
public Optional<String> getDescription()
Gets the description of the guild, if present.- Returns:
- The description of the guild, if present.
-
getMaxPresences
public int getMaxPresences()
Gets the maximum amount of presences of the guild.- Returns:
- The maximum amount of presences for the guild.
-
getMaxMembers
public OptionalInt getMaxMembers()
Gets the maximum amount of members of the guild, if present.- Returns:
- The maximum amount of members for the guild, if present.
-
edit
@Deprecated public Mono<Guild> edit(Consumer<? super LegacyGuildEditSpec> spec)
Deprecated.useedit(GuildEditSpec)oredit()which offer an immutable approach to build specsRequests to edit this guild.- Parameters:
spec- AConsumerthat provides a "blank"LegacyGuildEditSpecto be operated on.- Returns:
- A
Monowhere, upon successful completion, emits the editedGuild. If an error is received, it is emitted through theMono.
-
edit
public discord4j.core.spec.GuildEditMono edit()
Requests to edit this guild. Properties specifying how to edit this guild can be set via thewithXxxmethods of the returnedGuildEditMono.- Returns:
- A
GuildEditMonowhere, upon successful completion, emits the editedGuild. If an error is received, it is emitted through theGuildEditMono.
-
createEmoji
@Deprecated public Mono<GuildEmoji> createEmoji(Consumer<? super LegacyGuildEmojiCreateSpec> spec)
Deprecated.usecreateEmoji(GuildEmojiCreateSpec)orcreateEmoji(String, Image)which offer an immutable approach to build specsRequests to create an emoji.- Parameters:
spec- AConsumerthat provides a "blank"LegacyGuildEmojiCreateSpecto be operated on.- Returns:
- A
Monowhere, upon successful completion, emits the createdGuildEmoji. If an error is received, it is emitted through theMono.
-
createEmoji
public discord4j.core.spec.GuildEmojiCreateMono createEmoji(String name, Image image)
Requests to create an emoji. Properties specifying how to create an emoji can be set via thewithXxxmethods of the returnedGuildEmojiCreateMono.- Parameters:
name- the name of the emoji to createimage- the image of the emoji to create- Returns:
- A
GuildEmojiCreateMonowhere, upon successful completion, emits the createdGuildEmoji. If an error is received, it is emitted through theGuildEmojiCreateMono.
-
createEmoji
public Mono<GuildEmoji> createEmoji(discord4j.core.spec.GuildEmojiCreateSpec spec)
Requests to create an emoji.- Parameters:
spec- an immutable object that specifies how to create the emoji- Returns:
- A
Monowhere, upon successful completion, emits the createdGuildEmoji. If an error is received, it is emitted through theMono.
-
createTemplate
@Deprecated public Mono<GuildTemplate> createTemplate(Consumer<? super LegacyGuildTemplateCreateSpec> spec)
Deprecated.usecreateTemplate(GuildTemplateCreateSpec)orcreateTemplate(String)which offer an immutable approach to build specsRequests to create a template based on this guild.- Parameters:
spec- AConsumerthat provides a "blank"LegacyGuildTemplateCreateSpecto be operated on.- Returns:
- A
Monowhere, upon subscription, emits the createdGuildTemplateon success. If an error is received, it is emitted through theMono.
-
createTemplate
public discord4j.core.spec.GuildTemplateCreateMono createTemplate(String name)
Requests to create a template based on this guild. A description for this template can be set via theGuildTemplateCreateMono.withDescriptionOrNull(String)method of the returnedGuildTemplateCreateMono.- Parameters:
name- the name of the template to create- Returns:
- A
Monowhere, upon subscription, emits the createdGuildTemplateon success. If an error is received, it is emitted through theMono.
-
createTemplate
public Mono<GuildTemplate> createTemplate(discord4j.core.spec.GuildTemplateCreateSpec spec)
Requests to create a template based on this guild.- Parameters:
spec- an immutable object that specifies how to create a template for this guild- Returns:
- A
Monowhere, upon subscription, emits the createdGuildTemplateon success. If an error is received, it is emitted through theMono.
-
createRole
@Deprecated public Mono<Role> createRole(Consumer<? super LegacyRoleCreateSpec> spec)
Deprecated.usecreateRole(RoleCreateSpec)orcreateRole()which offer an immutable approach to build specsRequests to create a role.- Parameters:
spec- AConsumerthat provides a "blank"LegacyRoleCreateSpecto be operated on.- Returns:
- A
Monowhere, upon successful completion, emits the createdRole. If an error is received, it is emitted through theMono.
-
createRole
public discord4j.core.spec.RoleCreateMono createRole()
Requests to create a role. Properties specifying how to create the role can be set via thewithXxxmethods of the returnedRoleCreateMono.- Returns:
- A
RoleCreateMonowhere, upon successful completion, emits the createdRole. If an error is received, it is emitted through theRoleCreateMono.
-
createRole
public Mono<Role> createRole(discord4j.core.spec.RoleCreateSpec spec)
Requests to create a role.
-
createNewsChannel
@Deprecated public Mono<NewsChannel> createNewsChannel(Consumer<? super LegacyNewsChannelCreateSpec> spec)
Deprecated.usecreateNewsChannel(NewsChannelCreateSpec)orcreateNewsChannel(String)which offer an immutable approach to build specsRequests to create a news channel.- Parameters:
spec- AConsumerthat provides a "blank"LegacyNewsChannelCreateSpecto be operated on.- Returns:
- A
Monowhere, upon successful completion, emits the createdNewsChannel. If an error is received, it is emitted through theMono.
-
createNewsChannel
public discord4j.core.spec.NewsChannelCreateMono createNewsChannel(String name)
Requests to create a news channel. Properties specifying how to create the news channel can be set via thewithXxxmethods of the returnedNewsChannelCreateMono.- Parameters:
name- the name of the news channel to create- Returns:
- A
NewsChannelCreateMonowhere, upon successful completion, emits the createdNewsChannel. If an error is received, it is emitted through theNewsChannelCreateMono.
-
createNewsChannel
public Mono<NewsChannel> createNewsChannel(discord4j.core.spec.NewsChannelCreateSpec spec)
Requests to create a news channel.- Parameters:
spec- an immutable object that specifies how to create the news channel- Returns:
- A
Monowhere, upon successful completion, emits the createdNewsChannel. If an error is received, it is emitted through theMono.
-
createCategory
@Deprecated public Mono<Category> createCategory(Consumer<? super LegacyCategoryCreateSpec> spec)
Deprecated.usecreateCategory(CategoryCreateSpec)orcreateCategory(String)which offer an immutable approach to build specsRequests to create a category.- Parameters:
spec- AConsumerthat provides a "blank"LegacyCategoryCreateSpecto be operated on.- Returns:
- A
Monowhere, upon successful completion, emits the createdCategory. If an error is received, it is emitted through theMono.
-
createCategory
public discord4j.core.spec.CategoryCreateMono createCategory(String name)
Requests to create a category. Properties specifying how to create the category can be set via thewithXxxmethods of the returnedCategoryCreateMono.- Parameters:
name- the name of the category to create- Returns:
- A
CategoryCreateMonowhere, upon successful completion, emits the createdCategory. If an error is received, it is emitted through theCategoryCreateMono.
-
createCategory
public Mono<Category> createCategory(discord4j.core.spec.CategoryCreateSpec spec)
Requests to create a category.
-
createTextChannel
@Deprecated public Mono<TextChannel> createTextChannel(Consumer<? super LegacyTextChannelCreateSpec> spec)
Deprecated.usecreateTextChannel(TextChannelCreateSpec)orcreateTextChannel(String)which offer an immutable approach to build specsRequests to create a text channel.- Parameters:
spec- AConsumerthat provides a "blank"LegacyTextChannelCreateSpecto be operated on.- Returns:
- A
Monowhere, upon successful completion, emits the createdTextChannel. If an error is received, it is emitted through theMono.
-
createTextChannel
public discord4j.core.spec.TextChannelCreateMono createTextChannel(String name)
Requests to create a text channel. Properties specifying how to create the text channel can be set via thewithXxxmethods of the returnedTextChannelCreateMono.- Parameters:
name- the name of the text channel to create- Returns:
- A
TextChannelCreateMonowhere, upon successful completion, emits the createdTextChannel. If an error is received, it is emitted through theTextChannelCreateMono.
-
createTextChannel
public Mono<TextChannel> createTextChannel(discord4j.core.spec.TextChannelCreateSpec spec)
Requests to create a text channel.- Parameters:
spec- an immutable object that specifies how to create the text channel- Returns:
- A
Monowhere, upon successful completion, emits the createdTextChannel. If an error is received, it is emitted through theMono.
-
createVoiceChannel
@Deprecated public Mono<VoiceChannel> createVoiceChannel(Consumer<? super LegacyVoiceChannelCreateSpec> spec)
Deprecated.usecreateVoiceChannel(VoiceChannelCreateSpec)orcreateVoiceChannel(String)which offer an immutable approach to build specsRequests to create a voice channel.- Parameters:
spec- AConsumerthat provides a "blank"LegacyVoiceChannelCreateSpecto be operated on.- Returns:
- A
Monowhere, upon successful completion, emits the createdVoiceChannel. If an error is received, it is emitted through theMono.
-
createVoiceChannel
public discord4j.core.spec.VoiceChannelCreateMono createVoiceChannel(String name)
Requests to create a voice channel. Properties specifying how to create the voice channel can be set via thewithXxxmethods of the returnedVoiceChannelCreateMono.- Parameters:
name- the name of the voice channel to create- Returns:
- A
VoiceChannelCreateMonowhere, upon successful completion, emits the createdVoiceChannel. If an error is received, it is emitted through theVoiceChannelCreateMono.
-
createVoiceChannel
public Mono<VoiceChannel> createVoiceChannel(discord4j.core.spec.VoiceChannelCreateSpec spec)
Requests to create a voice channel.- Parameters:
spec- an immutable object that specifies how to create the voice channel- Returns:
- A
Monowhere, upon successful completion, emits the createdVoiceChannel. If an error is received, it is emitted through theMono.
-
delete
public Mono<Void> delete()
Requests to delete this guild.- Returns:
- A
Monowhere, upon successful completion, emits nothing; indicating the guild has been deleted. If an error is received, it is emitted through theMono.
-
kick
public Mono<Void> kick(Snowflake userId)
Requests to kick the specified user from this guild.- Parameters:
userId- The ID of the user to kick from this guild.- Returns:
- A
Monowhere, upon successful completion, emits nothing; indicating the specified user was kicked from this guild. If an error is received, it is emitted through theMono.
-
kick
public Mono<Void> kick(Snowflake userId, @Nullable String reason)
Requests to kick the specified user from this guild while optionally specifying a reason.- Parameters:
userId- The ID of the user to kick from this guild.reason- The reason, if present.- Returns:
- A
Monowhere, upon successful completion, emits nothing; indicating the specified user was kicked from this guild. If an error is received, it is emitted through theMono.
-
getBan
public Mono<Ban> getBan(Snowflake userId)
Requests to retrieve the ban for the specified user for this guild.
-
ban
@Deprecated public Mono<Void> ban(Snowflake userId, Consumer<? super LegacyBanQuerySpec> spec)
Deprecated.useban(Snowflake, BanQuerySpec)orban(Snowflake)which offer an immutable approach to build specsRequests to ban the specified user.- Parameters:
userId- The ID of the user to ban.spec- AConsumerthat provides a "blank"LegacyBanQuerySpecto be operated on.- Returns:
- A
Monowhere, upon successful completion, emits nothing; indicating the specified user was banned. If an error is received, it is emitted through theMono.
-
ban
public discord4j.core.spec.GuildBanQueryMono ban(Snowflake userId)
Requests to ban the specified user. Properties specifying how to ban the user can be set via thewithXxxmethods of the returnedGuildBanQueryMono.- Parameters:
userId- The ID of the user to ban.- Returns:
- A
GuildBanQueryMonowhere, upon successful completion, emits nothing; indicating the specified user was banned. If an error is received, it is emitted through theGuildBanQueryMono.
-
ban
public Mono<Void> ban(Snowflake userId, discord4j.core.spec.BanQuerySpec spec)
Requests to ban the specified user.- Parameters:
userId- The ID of the user to ban.spec- an immutable object that specifies how to ban the user- Returns:
- A
Monowhere, upon successful completion, emits nothing; indicating the specified user was banned. If an error is received, it is emitted through theMono.
-
unban
public Mono<Void> unban(Snowflake userId)
Requests to unban the specified user.- Parameters:
userId- The ID of the user to unban.- Returns:
- A
Monowhere, upon successful completion, emits nothing; indicating the specified user was unbanned. If an error is received, it is emitted through theMono.
-
unban
public Mono<Void> unban(Snowflake userId, @Nullable String reason)
Requests to unban the specified user while optionally specifying a reason.- Parameters:
userId- The ID of the user to unban.reason- The reason, if present.- Returns:
- A
Monowhere, upon successful completion, emits nothing; indicating the specified user was unbanned. If an error is received, it is emitted through theMono.
-
getPruneCount
@Deprecated public Mono<Integer> getPruneCount(Consumer<? super LegacyGuildPruneCountSpec> spec)
Deprecated.usegetPruneCount(GuildPruneCountSpec)orgetPruneCount(int)which offer an immutable approach to build specsRequests to retrieve the number of users that will be pruned. Users are pruned if they have not been seen within the past specified amount of days, with roles optionally included in the prune count if specified throughLegacyGuildPruneCountSpec.addRole(Snowflake)orLegacyGuildPruneCountSpec.addRoles(Collection).
-
getPruneCount
public discord4j.core.spec.GuildPruneCountMono getPruneCount(int days)
Requests to retrieve the number of users that will be pruned. Users are pruned if they have not been seen within the past specified amount of days. Included roles can be set via theGuildPruneCountMono.withRoles(Snowflake...)method of the returnedGuildPruneCountMono.- Parameters:
days- The number of days since an user must have been seen to avoid being kicked.- Returns:
- A
GuildPruneCountMonowhere, upon successful completion, emits the number of users that will be pruned. If an error is received, it is emitted through theGuildPruneCountMono.
-
getPruneCount
public Mono<Integer> getPruneCount(discord4j.core.spec.GuildPruneCountSpec spec)
Requests to retrieve the number of users that will be pruned. Users are pruned if they have not been seen within the past specified amount of days, with roles optionally included in the prune count if specified throughGuildPruneCountSpec.roles().- Parameters:
spec- an immutable object that specifies how to get prune count- Returns:
- A
Monowhere, upon successful completion, emits the number of users that will be pruned. If an error is received, it is emitted through theMono.
-
prune
@Deprecated public Mono<Integer> prune(Consumer<? super LegacyGuildPruneSpec> spec)
Deprecated.useprune(GuildPruneSpec)orprune(int)which offer an immutable approach to build specsRequests to prune users while customizing parameters. Users are pruned if they have not been seen within the past specified amount of days, with roles optionally included in the prune request if specified throughLegacyGuildPruneSpec.addRole(Snowflake)orLegacyGuildPruneSpec.addRoles(Collection).- Parameters:
spec- AConsumerthat provides a "blank"LegacyGuildPruneSpecto be operated on.- Returns:
- A
Monowhere, upon successful completion, may emit the number of users who were pruned ifLegacyGuildPruneSpec.setComputePruneCount(boolean)istrue(default), otherwise it would emit an emptyMono. If an error is received, it is emitted through theMono.
-
prune
public discord4j.core.spec.GuildPruneMono prune(int days)
Requests to prune users. Users are pruned if they have not been seen within the past specified amount of days. Included roles can be set via theGuildPruneMono.withRoles(Snowflake...)method of the returnedGuildPruneMono.- Parameters:
days- The number of days since an user must have been seen to avoid being kicked.- Returns:
- A
Monowhere, upon successful completion, may emit the number of users who were pruned ifGuildPruneMono.withComputePruneCount(Boolean)istrue(default), otherwise it would emit an emptyMono. If an error is received, it is emitted through theMono.
-
prune
public Mono<Integer> prune(discord4j.core.spec.GuildPruneSpec spec)
Requests to prune users while customizing parameters. Users are pruned if they have not been seen within the past specified amount of days, with roles optionally included in the prune request if specified throughGuildPruneSpec.roles().- Parameters:
spec- an immutable object that specifies how to prune users of this guild- Returns:
- A
Monowhere, upon successful completion, may emit the number of users who were pruned ifGuildPruneSpec.computePruneCount()istrue(default), otherwise it would emit an emptyMono. If an error is received, it is emitted through theMono.
-
leave
public Mono<Void> leave()
Requests to leave this guild.- Returns:
- A
Monowhere, upon successful completion, emits nothing; indicating this guild has been left. If an error is received, it is emitted through theMono.
-
getAuditLog
@Deprecated public Flux<AuditLogPart> getAuditLog(Consumer<? super LegacyAuditLogQuerySpec> spec)
Deprecated.usegetAuditLog(AuditLogQuerySpec)orgetAuditLog()which offer an immutable approach to build specsRequests to retrieve the audit log for this guild.The audit log parts can be
combinedfor easier querying. For example,guild.getAuditLog() .take(10) .reduce(AuditLogPart::combine)- Parameters:
spec- AConsumerthat provides a "blank"LegacyAuditLogQuerySpecto be operated on.- Returns:
- A
Fluxthat continually parts of this guild's audit log. If an error is received, it is emitted through theFlux.
-
getAuditLog
public discord4j.core.spec.AuditLogQueryFlux getAuditLog()
Requests to retrieve the audit log for this guild. Properties specifying how to query audit log can be set viawithXxxmethods of the returnedAuditLogQueryFlux.The audit log parts can be
combinedfor easier querying. For example,guild.getAuditLog() .take(10) .reduce(AuditLogPart::combine)- Returns:
- A
AuditLogQueryFluxthat continually emits parts of this guild's audit log. If an error is received, it is emitted through theFlux.
-
getAuditLog
public Flux<AuditLogPart> getAuditLog(discord4j.core.spec.AuditLogQuerySpec spec)
Requests to retrieve the audit log for this guild.The audit log parts can be
combinedfor easier querying. For example,guild.getAuditLog() .take(10) .reduce(AuditLogPart::combine)- Parameters:
spec- an immutable object that specifies how to query audit log- Returns:
- A
Fluxthat continually emits parts of this guild's audit log. If an error is received, it is emitted through theFlux.
-
getWebhooks
public Flux<Webhook> getWebhooks()
Requests to retrieve the webhooks of the guild. Requires the MANAGE_WEBHOOKS permission.
-
getInvites
public Flux<ExtendedInvite> getInvites()
Requests to retrieve the invites of the guild.
-
getTemplates
public Flux<GuildTemplate> getTemplates()
Requests to retrieve the templates of the guild.
-
changeSelfNickname
public Mono<String> changeSelfNickname(@Nullable String nickname)
Requests to change the bot user's nickname in this guild.- Parameters:
nickname- The new nickname for the bot user in this guild, ornullto remove it.- Returns:
- A
Monowhere, upon successful completion, emits the bot user's new nickname in this guild. If the nickname was set tonull, then thisMonowill complete empty. If an error is received, it is emitted through theMono.
-
getVoiceConnection
public Mono<VoiceConnection> getVoiceConnection()
Returns the current voice connection registered for this guild.- Returns:
- A
MonoofVoiceConnectionfor this guild if present, or empty otherwise.
-
-