Package discord4j.core.object.entity
Interface GuildChannel
-
- All Superinterfaces:
Channel
,DiscordObject
,Entity
- All Known Implementing Classes:
Category
,TextChannel
,VoiceChannel
public interface GuildChannel extends Channel
A Discord channel associated to aGuild
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface discord4j.core.object.entity.Channel
Channel.Type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default reactor.core.publisher.Mono<Void>
addMemberOverwrite(Snowflake memberId, PermissionOverwrite overwrite)
Requests to add a permission overwrite for the given member.reactor.core.publisher.Mono<Void>
addMemberOverwrite(Snowflake memberId, PermissionOverwrite overwrite, String reason)
Requests to add a permission overwrite for the given member while optionally specifying a reason.default reactor.core.publisher.Mono<Void>
addRoleOverwrite(Snowflake roleId, PermissionOverwrite overwrite)
Requests to add a permission overwrite for the given role.reactor.core.publisher.Mono<Void>
addRoleOverwrite(Snowflake roleId, PermissionOverwrite overwrite, String reason)
Requests to add a permission overwrite for the given role while optionally specifying a reason.reactor.core.publisher.Mono<PermissionSet>
getEffectivePermissions(Snowflake memberId)
Gets the permissions for the given member, taking into account permission overwrites in this channel.reactor.core.publisher.Mono<Guild>
getGuild()
Requests to retrieve the guild this channel is associated to.Snowflake
getGuildId()
Gets the ID of the guild this channel is associated to.String
getName()
Gets the name of the channel.Optional<ExtendedPermissionOverwrite>
getOverwriteForMember(Snowflake memberId)
Gets the permission overwrite targeting the given member.Optional<ExtendedPermissionOverwrite>
getOverwriteForRole(Snowflake roleId)
Gets the permission overwrite targeting the given role.Set<ExtendedPermissionOverwrite>
getPermissionOverwrites()
Gets the permission overwrites for this channel.reactor.core.publisher.Mono<Integer>
getPosition()
Requests to retrieve the position of the channel relative to other channels in the guild.int
getRawPosition()
Gets the raw position of the channel as exposed by Discord.-
Methods inherited from interface discord4j.core.object.entity.Channel
delete, delete, getMention, getType
-
Methods inherited from interface discord4j.core.object.DiscordObject
getClient
-
-
-
-
Method Detail
-
getGuildId
Snowflake getGuildId()
Gets the ID of the guild this channel is associated to.- Returns:
- The ID of the guild this channel is associated to.
-
getGuild
reactor.core.publisher.Mono<Guild> getGuild()
Requests to retrieve the guild this channel is associated to.- Returns:
- A
Mono
where, upon successful completion, emits theguild
this channel is associated to. If an error is received, it is emitted through theMono
.
-
getPermissionOverwrites
Set<ExtendedPermissionOverwrite> getPermissionOverwrites()
Gets the permission overwrites for this channel.- Returns:
- The permission overwrites for this channel.
-
getOverwriteForMember
Optional<ExtendedPermissionOverwrite> getOverwriteForMember(Snowflake memberId)
Gets the permission overwrite targeting the given member.- Parameters:
memberId
- The ID of the member to get the overwrite for.- Returns:
- The permission overwrite targeting the given member.
-
getOverwriteForRole
Optional<ExtendedPermissionOverwrite> getOverwriteForRole(Snowflake roleId)
Gets the permission overwrite targeting the given role.- Parameters:
roleId
- The ID of the role to get the overwrite for.- Returns:
- The permission overwrite targeting the given role.
-
getEffectivePermissions
reactor.core.publisher.Mono<PermissionSet> getEffectivePermissions(Snowflake memberId)
Gets the permissions for the given member, taking into account permission overwrites in this channel.- Parameters:
memberId
- The ID of the member to get permissions for.- Returns:
- The permissions for the given member.
-
getName
String getName()
Gets the name of the channel.- Returns:
- The name of the channel.
-
getRawPosition
int getRawPosition()
Gets the raw position of the channel as exposed by Discord. This may or may not be accurate with relativity to other channels in the guild.- Returns:
- The raw position of the channel.
-
getPosition
reactor.core.publisher.Mono<Integer> getPosition()
Requests to retrieve the position of the channel relative to other channels in the guild.- Returns:
- A
Mono
where, upon successful completion, emits the position of the channel. If an error is received, it is emitted through theMono
.
-
addMemberOverwrite
default reactor.core.publisher.Mono<Void> addMemberOverwrite(Snowflake memberId, PermissionOverwrite overwrite)
Requests to add a permission overwrite for the given member.- Parameters:
memberId
- The ID of the member to add the overwrite for.overwrite
- The overwrite to add.- Returns:
- A
Mono
where, upon successful completion, emits nothing; indicating the guild has been deleted. If an error is received, it is emitted through theMono
.
-
addMemberOverwrite
reactor.core.publisher.Mono<Void> addMemberOverwrite(Snowflake memberId, PermissionOverwrite overwrite, @Nullable String reason)
Requests to add a permission overwrite for the given member while optionally specifying a reason.- Parameters:
memberId
- The ID of the member to add the overwrite for.overwrite
- The overwrite to add.reason
- The reason, if present.- Returns:
- A
Mono
where, upon successful completion, emits nothing; indicating the guild has been deleted. If an error is received, it is emitted through theMono
.
-
addRoleOverwrite
default reactor.core.publisher.Mono<Void> addRoleOverwrite(Snowflake roleId, PermissionOverwrite overwrite)
Requests to add a permission overwrite for the given role.- Parameters:
roleId
- The ID of the role to add the overwrite for.overwrite
- The overwrite to add.- Returns:
- A
Mono
where, upon successful completion, emits nothing; indicating the guild has been deleted. If an error is received, it is emitted through theMono
.
-
addRoleOverwrite
reactor.core.publisher.Mono<Void> addRoleOverwrite(Snowflake roleId, PermissionOverwrite overwrite, @Nullable String reason)
Requests to add a permission overwrite for the given role while optionally specifying a reason.- Parameters:
roleId
- The ID of the role to add the overwrite for.overwrite
- The overwrite to add.reason
- The reason, if present.- Returns:
- A
Mono
where, upon successful completion, emits nothing; indicating the guild has been deleted. If an error is received, it is emitted through theMono
.
-
-