View Source Nostrum.Cache.GuildCache.ETS (Nostrum v0.6.1)

An ETS-based cache for guilds.

The supervisor defined by this module will set up the ETS table associated with it.

The default table name under which guilds are cached is nostrum_guilds. In addition to the cache behaviour implementations provided by this module, you can also call regular ETS table methods on it, such as :ets.info.

Note that users should not call the functions not related to this specific implementation of the cache directly. Instead, call the functions of Nostrum.Cache.GuildCache directly, which will dispatch to the configured cache.

Link to this section Summary

Functions

Retrieve all guilds from the cache.

Create the given channel for the given guild in the cache.

Delete the channel from the given guild in the cache.

Update the channel on the given guild in the cache.

Returns a specification to start this module under a supervisor.

Create the given guild in the cache.

Delete the given guild from the cache.

Update the emoji list for the given guild in the cache.

Retrieve a guild from the cache by ID.

Get a guild from the cache using the given selectors.

Set up the cache's ETS table.

Add the given member to the given guild in the cache.

Create a chunk of members for the given guild in the cache.

Remove the given member from the given guild in the cache.

Update the given member for the given guild in the cache.

Create the given role in the given guild in the cache.

Delete the given role from the given guild in the cache.

Update the given role in the given guild in the cache.

Select values from the guild with the matching ID.

Retrieve all guilds matching the given selector from the cache.

Select values using a selector for a guild that matches the given clauses.

Start the supervisor.

Retrieve the ETS table name used for the cache.

Update the given guild in the cache.

Update guild voice states with the given voice state in the cache.

Link to this section Functions

Specs

all() :: Enum.t()

Retrieve all guilds from the cache.

Link to this function

channel_create(guild_id, channel)

View Source

Specs

Create the given channel for the given guild in the cache.

Link to this function

channel_delete(guild_id, channel_id)

View Source

Specs

Delete the channel from the given guild in the cache.

Link to this function

channel_update(guild_id, channel)

View Source

Specs

Update the channel on the given guild in the cache.

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

create(Nostrum.Struct.Guild.t()) :: true

Create the given guild in the cache.

Specs

Delete the given guild from the cache.

Link to this function

emoji_update(guild_id, emojis)

View Source

Specs

Update the emoji list for the given guild in the cache.

Specs

Retrieve a guild from the cache by ID.

Specs

Get a guild from the cache using the given selectors.

Set up the cache's ETS table.

Link to this function

member_add(guild_id, payload)

View Source

Specs

Add the given member to the given guild in the cache.

Link to this function

member_chunk(guild_id, member_chunk)

View Source

Create a chunk of members for the given guild in the cache.

Link to this function

member_remove(guild_id, user)

View Source

Specs

Remove the given member from the given guild in the cache.

Link to this function

member_update(guild_id, member)

View Source

Specs

Update the given member for the given guild in the cache.

Link to this function

role_create(guild_id, role)

View Source

Specs

Create the given role in the given guild in the cache.

Link to this function

role_delete(guild_id, role_id)

View Source

Specs

Delete the given role from the given guild in the cache.

Link to this function

role_update(guild_id, role)

View Source

Specs

Update the given role in the given guild in the cache.

Specs

Select values from the guild with the matching ID.

Specs

Retrieve all guilds matching the given selector from the cache.

Link to this function

select_by(clauses, selector)

View Source

Specs

Select values using a selector for a guild that matches the given clauses.

Start the supervisor.

Specs

tabname() :: atom()

Retrieve the ETS table name used for the cache.

Specs

Update the given guild in the cache.

Link to this function

voice_state_update(guild_id, payload)

View Source

Specs

voice_state_update(Nostrum.Struct.Guild.id(), map()) ::
  {Nostrum.Struct.Guild.id(), [map()]}

Update guild voice states with the given voice state in the cache.