Package discord4j.core.object
Class ExtendedPermissionOverwrite
java.lang.Object
discord4j.core.object.PermissionOverwrite
discord4j.core.object.ExtendedPermissionOverwrite
- All Implemented Interfaces:
DiscordObject
A Discord permission overwrite.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class discord4j.core.object.PermissionOverwrite
PermissionOverwrite.Type
-
Constructor Summary
ConstructorDescriptionExtendedPermissionOverwrite
(GatewayDiscordClient gateway, discord4j.discordjson.json.OverwriteData data, long guildId, long channelId) Constructs aExtendedPermissionOverwrite
with an associatedGatewayDiscordClient
and Discord data. -
Method Summary
Modifier and TypeMethodDescriptiondelete()
Requests to delete this permission overwrite.Requests to delete this permission overwrite while optionally specifying a reason.Requests to retrieve the channel associated to this overwrite.getChannel
(EntityRetrievalStrategy retrievalStrategy) Requests to retrieve the channel associated to this overwrite, using the given retrieval strategy.Gets the ID of the channel associated to this overwrite.Returns theGatewayDiscordClient
that created this object.getGuild()
Requests to retrieve the guild associated to this overwrite.getGuild
(EntityRetrievalStrategy retrievalStrategy) Requests to retrieve the guild associated to this overwrite, using the given retrieval strategy.Gets the ID of the guild associated to this overwrite.getRole()
Requests to retrieve the role this overwrite is associated to, if present.getRole
(EntityRetrievalStrategy retrievalStrategy) Requests to retrieve the role this overwrite is associated to, if present, using the given retrieval strategy.getUser()
Requests to retrieve the user this overwrite is associated to, if present.getUser
(EntityRetrievalStrategy retrievalStrategy) Requests to retrieve the user this overwrite is associated to, if present, using the given retrieval strategy.Methods inherited from class discord4j.core.object.PermissionOverwrite
forMember, forRole, getAllowed, getData, getDenied, getMemberId, getRoleId, getTargetId, getType, toString
-
Constructor Details
-
ExtendedPermissionOverwrite
public ExtendedPermissionOverwrite(GatewayDiscordClient gateway, discord4j.discordjson.json.OverwriteData data, long guildId, long channelId) Constructs aExtendedPermissionOverwrite
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.guildId
- The ID of the guild associated to this overwrite.channelId
- The ID of the channel associated to this overwrite.
-
-
Method Details
-
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.
-
getRole
Requests to retrieve the role this overwrite is associated to, if present. -
getRole
Requests to retrieve the role this overwrite is associated to, if present, using the given retrieval strategy. -
getUser
Requests to retrieve the user this overwrite is associated to, if present. -
getUser
Requests to retrieve the user this overwrite is associated to, if present, using the given retrieval strategy. -
getGuildId
Gets the ID of the guild associated to this overwrite.- Returns:
- The ID of the guild associated to this overwrite.
-
getGuild
Requests to retrieve the guild associated to this overwrite. -
getGuild
Requests to retrieve the guild associated to this overwrite, using the given retrieval strategy. -
getChannelId
Gets the ID of the channel associated to this overwrite.- Returns:
- The ID of the channel associated to this overwrite.
-
getChannel
Requests to retrieve the channel associated to this overwrite.- Returns:
- A
Mono
where, upon successful completion, emits theGuildChannel
associated to this overwrite. If an error is received, it is emitted through theMono
.
-
getChannel
Requests to retrieve the channel associated to this overwrite, using the given retrieval strategy.- Parameters:
retrievalStrategy
- the strategy to use to get the channel- Returns:
- A
Mono
where, upon successful completion, emits theGuildChannel
associated to this overwrite. If an error is received, it is emitted through theMono
.
-
delete
Requests to delete this permission overwrite.- Returns:
- A
Mono
where, upon successful completion, emits nothing; indicating the permission overwrite has been deleted. If an error is received, it is emitted through theMono
.
-
delete
Requests to delete this permission overwrite while optionally specifying a reason.- Parameters:
reason
- The reason, if present.- Returns:
- A
Mono
where, upon successful completion, emits nothing; indicating the permission overwrite has been deleted. If an error is received, it is emitted through theMono
.
-