Package-level declarations

Types

Link copied to clipboard

EntitySupplier that uses a DataCache to resolve entities.

Link copied to clipboard
interface EntitySupplier

An abstraction that allows for requesting Discord entities.

Link copied to clipboard

A supplier that accepts a Kord instance and returns an EntitySupplier of type T.

Link copied to clipboard

EntitySupplier that uses a RestClient to resolve entities.

Link copied to clipboard
class StoreEntitySupplier(supplier: EntitySupplier, cache: DataCache) : EntitySupplier

EntitySupplier that delegates to another EntitySupplier to resolve entities.

Functions

Link copied to clipboard
inline suspend fun <T : Channel> EntitySupplier.getChannelOf(id: Snowflake): T

Requests the Channel with the given id as type T.

Link copied to clipboard
inline suspend fun <T : Channel> EntitySupplier.getChannelOfOrNull(id: Snowflake): T?

Requests the Channel with the given id as type T, returns null if the channel isn't present or if the channel is not of type T.

Link copied to clipboard

Requests the GlobalApplicationCommand with the given id as type T.

Link copied to clipboard

Requests the GuildApplicationCommand with the given id as type T, returns null if the command application isn't present or if the channel is not of type T.

Link copied to clipboard

Requests the GlobalApplicationCommand with the given id as type T.

Link copied to clipboard

Requests the GlobalApplicationCommand with the given id as type T, returns null if the command application isn't present or if the channel is not of type T.

Link copied to clipboard

Requests the GuildApplicationCommand with the given id as type T.

Link copied to clipboard

Requests the GuildApplicationCommand with the given id as type T, returns null if the command application isn't present or if the channel is not of type T.

Link copied to clipboard

Creates supplier providing a strategy which will first operate on this supplier. When an entity is not present from the first supplier it will be fetched from other instead. Operations that return flows will only fall back to other when the returned flow contained no elements.