Class Category
java.lang.Object
discord4j.core.object.entity.channel.Category
- All Implemented Interfaces:
DiscordObject
,Channel
,GuildChannel
,TopLevelGuildChannel
,Entity
A Discord category.
-
Nested Class Summary
Nested classes/interfaces inherited from interface discord4j.core.object.entity.channel.Channel
Channel.Flag, Channel.Type
-
Constructor Summary
ConstructorDescriptionCategory
(GatewayDiscordClient gateway, discord4j.discordjson.json.ChannelData data) Constructs anCategory
with an associatedGatewayDiscordClient
and Discord data. -
Method Summary
Modifier and TypeMethodDescriptiondiscord4j.core.spec.CategoryEditMono
edit()
Requests to edit this category.edit
(discord4j.core.spec.CategoryEditSpec spec) Requests to edit this category.edit
(Consumer<? super LegacyCategoryEditSpec> spec) Deprecated.final boolean
Requests to retrieve the channels residing in this category.getChannels
(EntityRetrievalStrategy retrievalStrategy) Requests to retrieve the channels residing in this category, using the given retrieval strategy.final GatewayDiscordClient
Returns theGatewayDiscordClient
that created this object.final discord4j.discordjson.json.ChannelData
getData()
Gets the raw data as represented by Discord.getEffectivePermissions
(Snowflake memberId) Gets the permissions for the given member, taking into account permission overwrites in this channel.getEffectivePermissions
(Member member) Gets the permissions for the given member, taking into account permission overwrites in this channel.final RestChannel
Return aRestChannel
handle to execute REST API operations on this entity.final int
hashCode()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface discord4j.core.object.entity.channel.Channel
delete, delete, getData, getId, getMention, getRestChannel, getType
Methods inherited from interface discord4j.core.object.DiscordObject
getClient
Methods inherited from interface discord4j.core.object.entity.channel.GuildChannel
getGuild, getGuild, getGuildId, getName
Methods inherited from interface discord4j.core.object.entity.channel.TopLevelGuildChannel
addMemberOverwrite, addMemberOverwrite, addRoleOverwrite, addRoleOverwrite, getOverwriteForMember, getOverwriteForRole, getPermissionOverwrites, getPosition, getRawPosition
-
Constructor Details
-
Category
Constructs anCategory
with an associatedGatewayDiscordClient
and Discord data.- Parameters:
gateway
- TheGatewayDiscordClient
associated to this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.
-
-
Method Details
-
getChannels
Requests to retrieve the channels residing in this category. -
getChannels
Requests to retrieve the channels residing in this category, using the given retrieval strategy. -
edit
Deprecated.useedit(CategoryEditSpec)
oredit()
which offer an immutable approach to build specsRequests to edit this category.- Parameters:
spec
- AConsumer
that provides a "blank"LegacyCategoryEditSpec
to be operated on.- Returns:
- A
Mono
where, upon successful completion, emits the editedCategory
. If an error is received, it is emitted through theMono
.
-
edit
public discord4j.core.spec.CategoryEditMono edit()Requests to edit this category. Properties specifying how to edit this category can be set via thewithXxx
methods of the returnedCategoryEditMono
.- Returns:
- A
CategoryEditMono
where, upon successful completion, emits the editedCategory
. If an error is received, it is emitted through theCategoryEditMono
.
-
edit
Requests to edit this category. -
toString
-
getEffectivePermissions
Description copied from interface:GuildChannel
Gets the permissions for the given member, taking into account permission overwrites in this channel.- Specified by:
getEffectivePermissions
in interfaceGuildChannel
- Parameters:
memberId
- The ID of the member to get permissions for.- Returns:
- The permissions for the given member.
-
getEffectivePermissions
Description copied from interface:GuildChannel
Gets the permissions for the given member, taking into account permission overwrites in this channel.- Specified by:
getEffectivePermissions
in interfaceGuildChannel
- Parameters:
member
- The member to get permissions for.- Returns:
- The permissions for the given member.
-
getClient
Description copied from interface:DiscordObject
Returns theGatewayDiscordClient
that created this object. Methods in it are exclusively based on the entity cache orStore
in use. Refer to callinggetClient().rest()
to access aDiscordClient
that is capable of requesting entities directly from the REST API.- Specified by:
getClient
in interfaceDiscordObject
- Returns:
- The
GatewayDiscordClient
associated to this object.
-
getRestChannel
Description copied from interface:Channel
Return aRestChannel
handle to execute REST API operations on this entity.- Specified by:
getRestChannel
in interfaceChannel
-
getData
public final discord4j.discordjson.json.ChannelData getData()Description copied from interface:Channel
Gets the raw data as represented by Discord. -
equals
-
hashCode
public final int hashCode()
-
edit(CategoryEditSpec)
oredit()
which offer an immutable approach to build specs