public final class ExtendedPermissionOverwrite extends PermissionOverwrite implements DiscordObject
PermissionOverwrite.Type
Constructor and Description |
---|
ExtendedPermissionOverwrite(ServiceMediator serviceMediator,
PermissionOverwriteBean data,
long guildId,
long channelId)
Constructs a
ExtendedPermissionOverwrite with an associated ServiceMediator and Discord data. |
Modifier and Type | Method and Description |
---|---|
Mono<Void> |
delete()
Requests to delete this permission overwrite.
|
Mono<Void> |
delete(String reason)
Requests to delete this permission overwrite while optionally specifying a reason.
|
Mono<GuildChannel> |
getChannel()
Requests to retrieve the channel associated to this overwrite.
|
Snowflake |
getChannelId()
Gets the ID of the channel associated to this overwrite.
|
DiscordClient |
getClient()
Gets the DiscordClient associated to this object.
|
Mono<Guild> |
getGuild()
Requests to retrieve the guild associated to this overwrite.
|
Snowflake |
getGuildId()
Gets the ID of the guild associated to this overwrite.
|
Mono<Role> |
getRole()
Requests to retrieve the role this overwrite is associated to, if present.
|
Mono<User> |
getUser()
Requests to retrieve the user this overwrite is associated to, if present.
|
forMember, forRole, getAllowed, getDenied, getMemberId, getRoleId, getTargetId, getType, toString
public ExtendedPermissionOverwrite(ServiceMediator serviceMediator, PermissionOverwriteBean data, long guildId, long channelId)
ExtendedPermissionOverwrite
with an associated ServiceMediator and Discord data.serviceMediator
- The ServiceMediator 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.public DiscordClient getClient()
DiscordObject
getClient
in interface DiscordObject
public Mono<Role> getRole()
public Mono<User> getUser()
public Snowflake getGuildId()
public Snowflake getChannelId()
public Mono<GuildChannel> getChannel()
Mono
where, upon successful completion, emits the GuildChannel
associated to this
overwrite. If an error is received, it is emitted through the Mono
.public Mono<Void> delete()
Mono
where, upon successful completion, emits nothing; indicating the permission overwrite has
been deleted. If an error is received, it is emitted through the Mono
.public Mono<Void> delete(@Nullable String reason)
reason
- The reason, if present.Mono
where, upon successful completion, emits nothing; indicating the permission overwrite has
been deleted. If an error is received, it is emitted through the Mono
.