Nostrum.Cache.ChannelGuildMapping.ETS (nostrum v0.11.0-dev)

View Source

Maps channels to guilds via :ets.

Please use the function table/0 for retrieving a reference to the table used by nostrum.

Summary

Functions

Returns a specification to start this module under a supervisor.

Create a mapping of the given channel to the given guild.

Remove any mapping associated with the given channel.

Retrieve the guild ID for the given channel ID, if present.

Set up the ETS table.

Start the supervisor.

Retrieve the table used by this module.

Functions

child_spec(init_arg)

(since 0.8.0)

Returns a specification to start this module under a supervisor.

See Supervisor.

create(channel_id, guild_id)

(since 0.8.0)

Create a mapping of the given channel to the given guild.

delete(channel_id)

(since 0.8.0)
@spec delete(Nostrum.Struct.Channel.id()) :: true

Remove any mapping associated with the given channel.

get(channel_id)

(since 0.8.0)

Retrieve the guild ID for the given channel ID, if present.

init(opts)

(since 0.8.0)

Set up the ETS table.

start_link(opts)

(since 0.8.0)

Start the supervisor.

table()

(since 0.8.0)
@spec table() :: :ets.table()

Retrieve the table used by this module.