Class ExtendedPermissionOverwrite

    • Constructor Detail

      • ExtendedPermissionOverwrite

        public ExtendedPermissionOverwrite​(GatewayDiscordClient gateway,
                                           discord4j.discordjson.json.OverwriteData data,
                                           long guildId,
                                           long channelId)
        Constructs a ExtendedPermissionOverwrite with an associated GatewayDiscordClient and Discord data.
        Parameters:
        gateway - The GatewayDiscordClient 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 Detail

      • getRole

        public Mono<Role> getRole()
        Requests to retrieve the role this overwrite is associated to, if present.
        Returns:
        A Mono where, upon successful completion, emits the Role this overwrite is associated to, if present. If an error is received, it is emitted through the Mono.
      • getRole

        public Mono<Role> getRole​(EntityRetrievalStrategy retrievalStrategy)
        Requests to retrieve the role this overwrite is associated to, if present, using the given retrieval strategy.
        Parameters:
        retrievalStrategy - the strategy to use to get the role
        Returns:
        A Mono where, upon successful completion, emits the Role this overwrite is associated to, if present. If an error is received, it is emitted through the Mono.
      • getUser

        public Mono<User> getUser()
        Requests to retrieve the user this overwrite is associated to, if present.
        Returns:
        A Mono where, upon successful completion, emits the User this overwrite is associated to, if present. If an error is received, it is emitted through the Mono.
      • getUser

        public Mono<User> getUser​(EntityRetrievalStrategy retrievalStrategy)
        Requests to retrieve the user this overwrite is associated to, if present, using the given retrieval strategy.
        Parameters:
        retrievalStrategy - the strategy to use to get the user
        Returns:
        A Mono where, upon successful completion, emits the User this overwrite is associated to, if present. If an error is received, it is emitted through the Mono.
      • getGuildId

        public Snowflake getGuildId()
        Gets the ID of the guild associated to this overwrite.
        Returns:
        The ID of the guild associated to this overwrite.
      • getGuild

        public Mono<Guild> getGuild()
        Requests to retrieve the guild associated to this overwrite.
        Returns:
        A Mono where, upon successful completion, emits the Guild associated to this overwrite. If an error is received, it is emitted through the Mono.
      • getGuild

        public Mono<Guild> getGuild​(EntityRetrievalStrategy retrievalStrategy)
        Requests to retrieve the guild associated to this overwrite, using the given retrieval strategy.
        Parameters:
        retrievalStrategy - the strategy to use to get the guild
        Returns:
        A Mono where, upon successful completion, emits the Guild associated to this overwrite. If an error is received, it is emitted through the Mono.
      • getChannelId

        public Snowflake getChannelId()
        Gets the ID of the channel associated to this overwrite.
        Returns:
        The ID of the channel associated to this overwrite.
      • getChannel

        public Mono<GuildChannel> getChannel()
        Requests to retrieve the channel associated to this overwrite.
        Returns:
        A Mono where, upon successful completion, emits the GuildChannel associated to this overwrite. If an error is received, it is emitted through the Mono.
      • getChannel

        public Mono<GuildChannel> getChannel​(EntityRetrievalStrategy retrievalStrategy)
        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 the GuildChannel associated to this overwrite. If an error is received, it is emitted through the Mono.
      • delete

        public Mono<Void> 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 the Mono.
      • delete

        public Mono<Void> delete​(@Nullable
                                 String reason)
        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 the Mono.