ETS-based cache for Discord voice states.
Tracks which users are in which voice channels, along with their
mute/deaf state. Keyed by {guild_id, user_id} for O(1) lookups.
Automatically populated from GUILD_CREATE and VOICE_STATE_UPDATE events. When a user leaves voice (channel_id is nil), their entry is removed.
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns the total number of cached voice states.
Removes all voice states for a guild.
Gets all voice states for a specific voice channel in a guild.
Gets all voice states for a guild.
Gets a user's voice state in a guild.
Creates or updates a voice state. If channel_id is nil, removes the entry.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec count() :: non_neg_integer()
Returns the total number of cached voice states.
Removes all voice states for a guild.
Gets all voice states for a specific voice channel in a guild.
Gets all voice states for a guild.
Gets a user's voice state in a guild.
Creates or updates a voice state. If channel_id is nil, removes the entry.