MemberCache

interface MemberCache(source)

Discord's Member do not have a unique ID, so we need to use a combination of the user id

Inheritors

Functions

Link copied to clipboard
abstract fun clear()

Clears the cache

Link copied to clipboard
abstract fun contains(guildId: String, userId: String): Boolean

Check's if this properties exists in the cache and value exists

Link copied to clipboard
abstract operator fun get(guildId: String, userId: String): Member?

Gets an item from the cache

Link copied to clipboard
abstract fun getOrPut(value: Member): Member

Gets an item from the cache but adds it if it doesn't exist

Link copied to clipboard
abstract fun remove(guildId: String, userId: String)

Removes an item from the cache

Link copied to clipboard
abstract operator fun set(guildId: String, userId: String, value: Member)

Adds a new item to the cache

Link copied to clipboard
abstract fun updateVoiceState(member: Member, voiceState: VoiceState, add: Boolean)

updates the member's voice state

Link copied to clipboard
abstract fun values(): List<Member>

Gets a list of members in the cache